Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Brainy-Builds/ts-inspect-clinpx agentmods add rules/brainy-builds/ts-inspect-cli/_code-rules-typescriptWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/brainy-builds/ts-inspect-cli/_code-rules-typescript)<a href="https://agentmods.dev/rules/brainy-builds/ts-inspect-cli/_code-rules-typescript"><img src="https://agentmods.dev/badge/rules/brainy-builds/ts-inspect-cli/_code-rules-typescript/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/brainy-builds/ts-inspect-cli/_code-rules-typescript"><img src="https://agentmods.dev/badge/rules/brainy-builds/ts-inspect-cli/_code-rules-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.24603 | $0.24603 |
| Opus 5.5 | $0.09841 | $0.09841 |
| Sonnet 5.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 3mo ago.
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.
- 3mo ago 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 (3 stars, last pushed 3mo ago), licensed MIT. It adds 24,603 tokens to every session, about $0.0984 per session on Opus 5.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.
_code-rules-TypeScript compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| _code-rules-TypeScriptBrainy-Builds/ts-inspect-cli | Cursor rule | 3 | 3mo ago | MIT | A | 24,603 | Cursor |
| no-bare-castsprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| sql-types-importsprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| use-ast-factoriesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| type-extraction-from-contractprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| required-key-undefined-fieldsprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| use-if-definedprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |