Borrowing it
Nothing to install: this file belongs to mizchi/lsmcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/mizchi/lsmcp/main/.claude/commands/dce-by-tsr.mdgit clone --depth 1 https://github.com/mizchi/lsmcpWrote 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/commands/mizchi/lsmcp/dce-by-tsr)<a href="https://agentmods.dev/commands/mizchi/lsmcp/dce-by-tsr"><img src="https://agentmods.dev/badge/commands/mizchi/lsmcp/dce-by-tsr/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/commands/mizchi/lsmcp/dce-by-tsr"><img src="https://agentmods.dev/badge/commands/mizchi/lsmcp/dce-by-tsr.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.00000 | $0.00327 |
| Opus 5 | $0.00000 | $0.00163 |
| Sonnet 5 | $0.00000 | $0.00065 |
| Haiku 4.5 | $0.00000 | $0.00033 |
Grade A, and why
dce-by-tsr 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 9d 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.
What it actually says
Dead Code Elimination with tsr
このコマンドはtsrを使用して、TypeScript プロジェクトの未使用コードを検出します。
実行方法
npx tsr 'src/mcp/(lsmcp|typescript-mcp|generic-lsp-mcp)\.ts$'
オプション
--write: 検出された未使用コードを自動的に削除します(注意:テストファイルも削除される可能性があります)--recursive: プロジェクトがクリーンになるまで再帰的にチェックします--project <file>: カスタム tsconfig.json のパスを指定します--include-d-ts: .d.ts ファイルの未使用コードもチェックします
注意事項
- tsr はエントリーポイントから到達可能なコードのみを保持します
- テストファイルは通常のエントリーポイントから参照されないため、未使用として検出される可能性があります
--writeオプションを使用する前に、必ず結果を確認してください
このプロジェクトでの使用例
src/mcp/lsmcp.ts- メインの LSP MCP CLI
実行すると、これらのエントリーポイントから到達できないエクスポートやファイルが表示されます。
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.
- 9d ago First seen · 29 lines · 0 tokens per session scan A 1473315fd304
dce-by-tsr is a command published in the GitHub repository mizchi/lsmcp (453 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 327 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-30.
Other commands, from other repositories
types
Debug and fix TypeScript type errors with systematic analysis and expert guidance.
performance
Diagnose or fix Bun/TypeScript performance. Loads the performance skill, then works the task through its workflow.
typescript-fix
Run the project's TypeScript checker, diagnose root causes, apply minimal type-safe fixes, and verify with the same command.
build-fix
Fix build and TypeScript errors with minimal changes.
build-fix
A command that incrementally fixes TypeScript and build errors by running the project build, grouping and explaining errors, applying fixes, and checking the result again.
types
Hostile audit of the static type layer: assume every any, every suppression, and every unchecked cast is hiding a real type error until proven otherwise. The type checker is only as strong as the escape hatches punched through it — this command finds every hole.