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/andronics/claude-plugin-typescript-pro/ts-perfgit clone --depth 1 https://github.com/andronics/claude-plugin-typescript-proWhat 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.00012 | $0.01792 |
| Opus 5 | $0.00006 | $0.00896 |
| Sonnet 5 | $0.00002 | $0.00358 |
| Haiku 4.5 | $0.00001 | $0.00179 |
Grade A, and why
ts-perf 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 — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze TypeScript performance and provide optimization recommendations:
-
Performance Measurement
Type-Checking Performance:
# Measure baseline time npx tsc --noEmit # Extended diagnostics npx tsc --extendedDiagnostics # Generate trace for analysis npx tsc --generateTrace trace-$(date +%s)Capture metrics:
- Total type-checking time
- Files processed count
- Types instantiated count
- I/O time vs computation time
- Memory usage
-
Analyze Trace File
- Generate trace:
npx tsc --generateTrace trace - Parse trace/*.json files
- Identify slowest operations:
- Slow type checks (which types are expensive)
- Slow files (which files take longest)
- Type instantiations (which types are instantiated most)
- Type checking hotspots
Provide instructions:
Upload trace to https://ui.perfetto.dev/ for visual analysis Look for: - Red bars (expensive operations) - Long chains (deep type recursion) - Repeated patterns (type caching opportunities) - Generate trace:
-
Configuration Analysis
Review tsconfig.json for Performance:
Check and suggest optimizations:
{ "compilerOptions": { // ✅ Enable for faster builds "skipLibCheck": true, // Skip .d.ts files "incremental": true, // Cache previous builds "composite": true, // For project references // ⚠️ Disable if not needed "declaration": false, // Only for libraries "declarationMap": false, // Only if debugging types "sourceMap": false, // Only for debugging // ✅ Optimize module resolution "moduleResolution": "bundler", // Faster than "node" // ✅ Exclude unnecessary files "exclude": [ "node_modules", "dist", "**/*.test.ts" ] } } -
Identify Performance Bottlenecks
Overly Complex Types:
// 🔴 Slow: Deep recursion type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; }; // 🟢 Faster: Limit recursion depth type DeepPartial<T, Depth extends number = 3> = Depth extends 0 ? T : { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P], Prev<Depth>> : T[P]; };Expensive Template Literals:
// 🔴 Slow: Generates huge unions type AllPaths = `${string}/${string}/${string}`; // 🟢 Faster: Specific patterns type SpecificPaths = | `/users/${number}` | `/posts/${number}/comments`;Large Union Types:
// 🔴 Slow: 1000+ member union type AllNumbers = 0 | 1 | 2 | ... | 999; // 🟢 Faster: Use branded type type NumberInRange = number & { __brand: 'InRange' }; -
Build Tool Performance
Compare Build Tools:
- Measure current build time
- Compare with faster alternatives:
- tsc: Baseline, slow but complete type checking
- esbuild: 10-100x faster, no type checking
- swc: 20-70x faster, limited type support
- Vite: Fast dev server, esbuild-based
Recommendation Matrix:
Library project → tsup (esbuild + type gen) Web app → Vite (HMR + fast builds) Node service → esbuild + tsc --noEmit Monorepo → Project references + Turborepo -
Monorepo Optimization
Enable Project References:
// Root tsconfig.json { "files": [], "references": [ { "path": "./packages/core" }, { "path": "./packages/ui" } ] } // Package tsconfig.json { "compilerOptions": { "composite": true, "incremental": true } }Benefits:
- Parallel type checking
- Incremental builds
- Better caching
- Faster watch mode
-
File-Level Analysis
Identify slow files:
- Files with most type errors
- Files with complex types
- Large files (>1000 lines)
- Files importing many dependencies
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 · 282 lines · 12 tokens per session scan A 807ff8bad543
ts-perf is a command published in the GitHub repository andronics/claude-plugin-typescript-pro (4 stars, last pushed 10mo ago), licensed MIT. It adds 12 tokens to every session and 1,792 once invoked, about $0.0001 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 commands, from other repositories
build-fix
빌드 에러를 자동으로 분석하고 수정합니다.
test-ts
Run TypeScript tests for Solana frontends and Anchor programs.
types
Debug and fix TypeScript type errors with systematic analysis and expert guidance.
setup-project
Initialize a new Bun + TypeScript backend project with best practices setup (Hono, Prisma, Biome, testing, Docker).
sdk
Create or extract TypeScript SDK.
scaffold-react
Quickly scaffold a new React + TypeScript project with Claude Code configuration.