Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/evilfreelancer/openapi-to-cli/implementation-ordergit clone --depth 1 https://github.com/EvilFreelancer/openapi-to-cliWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00575 |
| Opus 5 | $0.00000 | $0.00287 |
| Sonnet 5 | $0.00000 | $0.00115 |
| Haiku 4.5 | $0.00000 | $0.00057 |
Grade A, and why
implementation-order scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Implementation order (one unit at a time)
Applies when adding or extending modules under src/.
Layer order (lower first)
The architecture in @architecture.mdc defines four layers. New behavior should be added at the lowest layer it can live in, then composed upward:
- Layer 0 - pure (
bm25.ts, type-only files): no I/O, no Node built-ins beyondBuffer/URL/etc. - Layer 1 - I/O wrappers (
config.ts,profile-store.ts,openapi-loader.ts): touchfs, network, or env. - Layer 2 - transform (
openapi-to-commands.ts,command-search.ts): combine Layer 0 + Layer 1 outputs into the CLI command model. - Layer 3 - entry (
cli.ts): wire everything together for yargs and axios.
Forbidden: Layer N importing from Layer M when M > N. If a Layer 1 module suddenly needs a Layer 2 type, that is a sign the type belongs lower.
Steps for a new module or class
- Decide the layer using @architecture.mdc.
- Write a failing test in
tests/<module>.test.tsthat describes the smallest useful behavior (see @testing.mdc and @workflow.mdc). - Add the minimum implementation in
src/<module>.ts. Follow @code-style.mdc for types, naming, and constructor-injected I/O. - Make the test pass.
- Run
npm testto confirm no regressions, thennpm run buildto confirmtscis clean. - Only then integrate the new module into the layer above (typically
cli.ts), guarded by its own test.
Forbidden
- Implementing two unrelated modules in one step before either has tests.
- Wiring a new module into
cli.tsbefore its own tests pass. - Adding optional fields to
Profile,CliCommand, orCliCommandOptionwithout a test that exercises the new field. - Editing real-spec fixtures (
github-api.*,box-api-yaml.*) to "make tests pass" - those represent contracts.
Allowed
- Stub or fake dependencies (mock
HttpClient, in-memoryfs) while a lower layer is incomplete, provided the stub matches the documented contract. - Refactor a passing module to a cleaner shape after the test suite stays green.
- Extending an existing Layer 2 module with a new transformation, as long as it is covered by a new test and does not import upward.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 43 lines · 0 tokens per session scan A d6c8c13e951c
implementation-order is a cursor rule published in the GitHub repository EvilFreelancer/openapi-to-cli (256 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 575 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
deno
You MUST import @std dependencies from jsr You MUST use latest versions of libraries when adding imports You must use type keyword when importing types.
typescript-coding-rule
It allows a subset of JSDoc tags. Most tags must occupy their own line, with the tag at the beginning of the line.
errors
ALWAYS use custom errors from src/errors.ts.
files
File organization and structure rules.
_code-rules-TypeScript
Apply when creating or editing TypeScript (.ts) files or shared TypeScript modules. Enforces typed, modular, readable code with strict formatting, naming, imports, configuration, validation, error handling, async patterns, and separation of concerns.
typescript
// Bad const data: any = JSON.parse(content).