Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add motlin/claude-code-plugins/plugin install codeWrote 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/skills/motlin/claude-code-plugins/dead-code)<a href="https://agentmods.dev/skills/motlin/claude-code-plugins/dead-code"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/dead-code/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/skills/motlin/claude-code-plugins/dead-code"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/dead-code.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.00081 | $0.01305 |
| Opus 5.5 | $0.00032 | $0.00522 |
| Sonnet 5.5 | $0.00016 | $0.00261 |
| Haiku 4.5 | $0.00008 | $0.00130 |
Grade A, and why
dead-code 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 20d 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 — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dead Code
Delete code nothing uses. Dead code costs reading time, review time and build time, and it misleads: a reader assumes it matters. A wrong deletion costs more than a missed one, so every removal carries evidence, and anything a tool cannot see into stays.
Resolve <plugin-root> first: in Claude Code use ${CLAUDE_PLUGIN_ROOT}; in Codex use the plugin root that contains this skills/dead-code/SKILL.md file. The script below needs Python 3.9 or later.
Arguments
- Scope: a file, a directory, or the whole repo (the default). Only code in scope is removed, but references are always searched across the whole repo.
unattended: passed by callers such asburn. An unattended run asks the user nothing. Every question it would have asked becomes a queued finding instead (see Report).
Detect from the entry points
Analyze reachability from the program's entry points, not one symbol at a time. Whole-graph analysis finds chains of code that only dead code calls; Meta's SCARF removed about 50% more once it switched to it (https://engineering.fb.com/2023/10/24/data-infrastructure/automating-dead-code-cleanup/). Find the detectors the project already has:
python3 <plugin-root>/scripts/dead_code.py --root . detect
detect recognizes these and prints their commands:
- knip, run twice: by default, then with
--production, which also reports code that only tests use; - vulture for Python;
deadcode -testfor Go, with-whyliveto show why a symbol it keeps is alive;- cargo-machete for unused Rust dependencies;
- OpenRewrite's private-only
RemoveUnused*recipes for Java, through the Maven rewrite plugin.
The baseline must pass: if the build or tests fail before any change, stop and report it, because this skill never fixes a broken build. Never install a detector or add it to the project's dependencies: an interactive run asks first, and an unattended run queues the suggestion and falls back to the method below.
Without a detector, list candidates from the language server's find-references, or by reading the scope for definitions, and check each one with a repo-wide grep that includes string matches:
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.
- 20d ago First seen · 79 lines · 81 tokens per session scan A 8ccf503f30a7
dead-code is a skill published in the GitHub repository motlin/claude-code-plugins (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 81 tokens to every session and 1,305 once invoked, about $0.0003 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-11-15.
dead-code compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dead-codemotlin/claude-code-plugins | Skill | 20 | 2d ago | Apache-2.0 | A | 81 | Claude Code |
| systematic-debuggingopen-metadata/OpenMetadata | Skill | 16k | today | Apache-2.0 | A | 37 | Claude Code |
| log-error-digestzebbern/claude-code-guide | Skill | 4.7k | today | MIT | A | 71 | Claude Code, Codex |
| observability-audit-sessionsIBM/mcp-context-forge | Skill | 4.9k | today | Apache-2.0 | A | 64 | Claude Code, Codex |
| cwv-optimizeradobe/skills | Skill | 343 | today | Apache-2.0 | A | 112 | Claude Code |
| performance-verificationvalkor-ai/loom | Skill | 1.6k | 3d ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| loop-engineeringhuytieu/COG-second-brain | Skill | 1.6k | yesterday | MIT | A | 63 | Claude Code |