_code-rules-TypeScript

_code-rules-TypeScript is a cursor rule for Cursor from Brainy-Builds/ts-inspect-cli. It costs 24,603 tokens per session, scanned A, original, MIT.

A writing rule that removes boilerplate and keeps responses focused on the essential information.

In plain words
What is it for?
Writing concise answers, presenting multi-step instructions, marking uncertainty or destructive actions, and checking references before mentioning files or settings.
Why use it?
It reduces filler, repeated summaries, unnecessary choices, and other wording that makes answers harder to scan.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is // file: ./src/types/valhalla/valhalla-matrix-types.ts (exports matrix + HTTP request shapes).

Good fit Writing concise answers, presenting multi-step instructions, marking uncertainty or destructive actions, and checking references before mentioning files or settings.

Compare 6 cursor rules from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/Brainy-Builds/ts-inspect-cli
agentmods
npx agentmods add rules/brainy-builds/ts-inspect-cli/_code-rules-typescript

Made for: Cursor.

Wrote 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.

agentmods badge for _code-rules-TypeScript

README.md
[![agentmods](https://agentmods.dev/badge/rules/brainy-builds/ts-inspect-cli/_code-rules-typescript/github.svg)](https://agentmods.dev/rules/brainy-builds/ts-inspect-cli/_code-rules-typescript)
Your own site
<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.

agentmods 80×15 button for _code-rules-TypeScript

Your own site · 80×15
<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>
Per session 24,603 This file is loaded in full into every session.
When invoked 24,603 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash 403fb6b11543, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

.cursor/rules/_code-rules-TypeScript.mdc · 2,505 lines

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).

Read the full file on GitHub · 2,505 lines

Changes

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.

  1. 1mo ago First seen · 2,505 lines · 24,603 tokens per session scan A 403fb6b11543

Subscribe to this mod's changes

_code-rules-TypeScript is a cursor rule published in the GitHub repository Brainy-Builds/ts-inspect-cli (3 stars, last pushed 1mo 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.