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/brainy-builds/ts-inspect-cli/_code-rules-typescriptgit clone --depth 1 https://github.com/Brainy-Builds/ts-inspect-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.24603 | $0.24603 |
| Opus 5 | $0.12301 | $0.12301 |
| Sonnet 5 | $0.04921 | $0.04921 |
| Haiku 4.5 | $0.02460 | $0.02460 |
Grade A, and why
_code-rules-TypeScript 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 — 2,505 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NodeJS / BunJS + TypeScript Code Rules
Principles
These rules enforce five core architectural principles. Every section in this document serves at least one of them.
| Principle | What it means |
|---|---|
| DRY (Do Not Repeat Yourself) | Each piece of knowledge - a constant, a type shape, a guard, a computation - has exactly one authoritative location. Duplication forces parallel edits and risks silent divergence. |
| SoC (Separation of Concerns) | Each module and function owns exactly one concern. Mixing I-O, validation, and transformation in one place makes any of the three harder to change independently. |
| Modularity | Units are small, named, independently testable, and connected by stable typed interfaces. Adding or replacing a module must not require editing unrelated code. |
| Readability | Code communicates intent to the next reader without guesswork. Names, structure, and formatting carry the meaning; comments fill only the gaps that code cannot convey. |
| Iterability | A change to one concern does not cascade unpredictably into unrelated code. This is the natural result of applying DRY, SoC, and Modularity together. |
Code Readability
Consistent Conventions
-
Indentation: Use 1 tab (\t) per indent level. Nested blocks increase indent by one level (1 tab (\t)).
-
String literals: Use double quotes (
"...") for normal string literals. Use template literals (`${expression}`or multi-line`...`) only when you need interpolation or a multi-line string body. Do not use single-quoted ('...') string literals. -
Hyphens / dashes: Always use only a plain hyphen-minus (
-) wherever you need a dash. Never use an en dash (–) or em dash (—). -
Semicolons: Terminate statements with semicolons (
;). Apply semicolons consistently in TypeScript source (imports, exports, declarations, assignments, return statements, and similar statement forms).
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 · 2,505 lines · 24,603 tokens per session scan A 403fb6b11543
_code-rules-TypeScript is a cursor rule published in the GitHub repository Brainy-Builds/ts-inspect-cli (2 stars, last pushed 12d ago), licensed MIT. It adds 24,603 tokens to every session, about $0.1230 per session on Opus 5. 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-31.
Other cursor rules, from other repositories
architecture
Architecture of openapi-to-cli (ocli).
testing
Test conventions for openapi-to-cli (Jest).
code-style
Code style for openapi-to-cli (TypeScript).
workflow
Workflow for openapi-to-cli.
codegraph
CodeGraph MCP usage guide — when to use which tool.
errors
ALWAYS use custom errors from src/errors.ts.