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 commands/usrrname/cursorrules/typescriptgit clone --depth 1 https://github.com/usrrname/cursorrulesWhat 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.00285 |
| Opus 5 | $0.00000 | $0.00143 |
| Sonnet 5 | $0.00000 | $0.00057 |
| Haiku 4.5 | $0.00000 | $0.00028 |
Grade A, and why
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.
What it actually says
/typescript
Apply TypeScript best practices and coding standards.
Usage
/typescript [file-or-code]
When to Invoke
Use this command when:
- Writing new TypeScript code
- Refactoring JavaScript to TypeScript
- Reviewing TypeScript for quality issues
- Setting up TypeScript configuration
Standards Applied
Type Safety
- Strict mode enforcement
- No implicit any
- Explicit return types
- Proper null checks
Naming
- PascalCase for types/interfaces
- camelCase for functions/variables
- UPPER_SNAKE_CASE for constants
Patterns
- Interface over type for objects
- Discriminated unions for state
- Generics for reusable code
- Readonly for immutability
Examples
Input
function getData(id) {
return fetch('/api/' + id);
}
Output
interface Data {
id: string;
value: number;
}
async function getData(id: string): Promise<Data | null> {
const response = await fetch(`/api/${id}`);
if (!response.ok) return null;
return response.json();
}
Agent
Uses BasicBitch for reliable TypeScript implementation.
Related
/react- React TypeScript patterns/vue3- Vue TypeScript integration
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 · 69 lines · 0 tokens per session scan A 4d114eeec5be
typescript is a command published in the GitHub repository usrrname/cursorrules (10 stars, last pushed 4mo ago), licensed ISC. It costs nothing until one of its globs matches a file; then it loads 285 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 commands, from other repositories
refactor
Systematic refactoring: analyze → split → extract → verify behavior, with no truncation or omitted lines.
auth-flows
Read-only audit of app-layer auth — route×gate matrix, getSession vs getUser, middleware-as-only-gate.
integrity-plan
Data-integrity & destructive-op audit — plan only, no migrations or tokens until approved.
cursor-jr
Обязательно вызови субагента через Task(cursor-jr).
mac 应用规则沉淀
这次解决问题的过程很棒。请你复盘一下:为了让以后类似的问题能直接被解决,或者避免刚才出现的错误,我应该在未来增加哪几条规则才能避免出现类似的情况?请用最精简的逻辑、最简单的语音总结出来,然后录入到我的这个文档当中: 企微SCRM/企微托管/Mac客户端/规则沉淀.md.
document-project
Analyzes and documents brownfield projects by scanning codebase, architecture, and patterns to create comprehensive reference documentation for AI-assisted development.