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/ts-inspectgit 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.00000 | $0.01537 |
| Opus 5 | $0.00000 | $0.00768 |
| Sonnet 5 | $0.00000 | $0.00307 |
| Haiku 4.5 | $0.00000 | $0.00154 |
Grade A, and why
ts-inspect 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 2d 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 — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ts-inspect: Semantic Type Information
When an agent needs compiler-derived TypeScript information, prefer the local read-only ts-inspect CLI over opening many source files, guessing types from call sites, or plain-text grep for semantic questions. It answers compiler-resolved questions through ts-morph and emits compact deterministic JSON to stdout. It never modifies source files.
How to run
npx ts-inspect <command> <symbol|location|file>
The ts-inspect bin also works directly when it is on PATH:
ts-inspect <command> <symbol|location|file>
Prefer npx ts-inspect for portability, since the bin may not be on PATH in every project.
The CLI loads the project from the repository's tsconfig.json (discovered by walking up from the current working directory), so all configured compilerOptions.paths aliases resolve correctly through ts-morph. No manual alias parsing is performed.
Command cheat-sheet
- Function parameters:
npx ts-inspect params handleSubmit - Resolved return type:
npx ts-inspect return fetchUser - Object/interface properties:
npx ts-inspect properties UserConfig - Type of a symbol:
npx ts-inspect type getButtonStyle - Type at a location:
npx ts-inspect type src/path/to/file.ts:4:17 - Signatures (overloads preserved):
npx ts-inspect signature getButtonStyle - Declarations:
npx ts-inspect definition generateSlug - Precise snapshot at a location:
npx ts-inspect at src/hooks/useAuth.ts:10:15 - Module imports:
npx ts-inspect imports src/hooks/useAuth.ts - Module exports:
npx ts-inspect exports src/utils/format.ts
Location syntax
relative/path/to/file.ts:LINE:COLUMN (also .tsx / .mts / .cts). Line and column are 1-based. Example:
npx ts-inspect at src/hooks/useAuth.ts:10:15
Usage hierarchy
Need exact TypeScript type information?
-> ts-inspect
Need function object parameters?
-> ts-inspect params
Need the resolved return type?
-> ts-inspect return
Need object/interface properties?
-> ts-inspect properties
Need the type of a symbol or at a location?
-> ts-inspect type
Need call signatures (overloads preserved)?
-> ts-inspect signature
Need where a symbol is declared?
-> ts-inspect definition
Know an exact file location?
-> ts-inspect at FILE:LINE:COLUMN
Need the imports of a file?
-> ts-inspect imports FILE
Need the exports of a file?
-> ts-inspect exports FILE
Need an AST structural pattern?
-> ast-grep, if installed
Need plain text/string search?
-> ripgrep
Need compiler validation?
-> tsc --noEmit
Need lint/style enforcement?
-> ESLint
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.
- 2d ago First seen · 168 lines · 0 tokens per session scan A 16bc76116463
ts-inspect is a cursor rule published in the GitHub repository Brainy-Builds/ts-inspect-cli (2 stars, last pushed 13d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,537 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-31.
Other cursor rules, from other repositories
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-barrel-files
Avoid barrel files and unnecessary re-exports.
vue-typescript-patterns
Cursor rule "vue-typescript-patterns" from soaring-xiongkulu/easyaiot, covering vue3 + typescript 开发规范, vue 组件规范, vue sfc 组件规范, typescript 规范 and 状态管理.
project-overview
这是一个基于 uniapp + Vue3 + TypeScript + Vite5 + UnoCSS 的跨平台开发框架。.
compose-resource-lifecycles-with-layermerge
Cursor rule "compose-resource-lifecycles-with-layermerge" from PaulJPhilp/EffectPatterns, covering compose resource lifecycles with layer.merge and example.
frontend-patterns
React/TypeScript patterns for src/ code.