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 skills add jerseycheese/agent-skills --skill dead-code-cleanupgit clone --depth 1 https://github.com/jerseycheese/agent-skillsWrote 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/jerseycheese/agent-skills/dead-code-cleanup)<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/dead-code-cleanup"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/dead-code-cleanup/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/jerseycheese/agent-skills/dead-code-cleanup"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/dead-code-cleanup.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.00060 | $0.01754 |
| Opus 5.5 | $0.00024 | $0.00702 |
| Sonnet 5.5 | $0.00012 | $0.00351 |
| Haiku 4.5 | $0.00006 | $0.00175 |
Grade A, and why
dead-code-cleanup 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 29d 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 — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dead Code Cleanup
Overview
Finds code and files whose subject is gone or that nothing uses, and removes them only after proving nothing depends on them. Validate first, delete second.
This skill works in any language. Commands and names below are examples, so swap in the project's own.
Trivial or weak tests and stories (snapshot-only, renders without crashing, toBeDefined, duplicates, negative reference scans) belong to test-reaper. This skill only removes a test or story when its subject is gone (an orphan).
What Qualifies
- Modules and components never used - nothing imports, loads, or instantiates them
- Unused functions, classes, and constants - no consumers
- Unused types and interfaces - definitions with no references
- Duplicate implementations - several versions of the same functionality
- Empty functions - do nothing or only return a default
- Commented-out code - blocks that have been commented out
- Debug code - debug prints, debug flags, temporary utilities
- Orphans - tests, stories, fixtures, and assets for something deleted or moved
Detection
Phase 1: Find candidates
Start with the project's own tooling. Check its manifest and docs for a dead-code or unused-import check, then consider the usual tool for the stack (knip for JS/TS, vulture for Python, deadcode for Go, the compiler's unused warnings where it has them). These tools report candidates, not proof, so Phase 2 still applies.
Fall back to a search where no tool covers the code:
# References to a candidate, including untracked work in progress (run once per name it goes by)
git grep -nw --untracked "candidate_name"
# Test, story, and fixture files whose subject may be gone (extend for the project's layout)
git ls-files | grep -E '(^|/)(tests?|__tests__|fixtures)/|[._](test|spec|stories)\.|(^|/)test_'
# Everything but test files, by exact name and folder. A loose ':!*test*' or ':!*spec*' also drops
# source like planning_inspector.gd or latest.py. Extend for the project's layout, and exclude vendored code.
SOURCE=(. ':!*.test.*' ':!*.spec.*' ':!*_test.*' ':!*_spec.*' ':(exclude,glob)**/test_*' ':(exclude,glob)**/test/**' ':(exclude,glob)**/tests/**' ':(exclude,glob)**/__tests__/**')
# Debug leftovers. To scope a pass, run it from that directory. A print is often intentional, so read each hit.
# The pattern fits JS and Python, so add the language's own debug calls: GDScript needs print( and a bare
# breakpoint. Keep \b out of them, because git grep -E on macOS silently matches nothing with it.
git grep -nE 'console\.log|debugger|breakpoint\(\)|DEBUG *= *[Tt]rue' -- "${SOURCE[@]}" ':!*.md' ':!*.json'
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.
- 29d ago Changed · -73 lines · +1 tokens per session 4208949da88d
- 1mo ago Changed · +2 lines 258ee79751aa
- 1mo ago Changed · -463 lines · -7 tokens per session 220f463368d8
- 1mo ago Changed · -4 lines · -49 tokens per session 7c925b45766f
- 2mo ago Changed · +13 lines · +10 tokens per session 32360b86e9c8
- 3mo ago First seen · 694 lines · 105 tokens per session scan A 868a8a30d484
dead-code-cleanup is a skill published in the GitHub repository jerseycheese/agent-skills (4 stars, last pushed 4d ago), licensed MIT. It adds 60 tokens to every session and 1,754 once invoked, about $0.0002 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-08-31.
dead-code-cleanup compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dead-code-cleanupjerseycheese/agent-skills | Skill | 4 | 4d ago | MIT | A | 60 | Claude Code |
| chorus-councilvalpere/chorus | Skill | 10 | 6mo ago | MIT | A | 62 | Claude Code, Codex |
| chorus-parallel-reviewvalpere/chorus | Skill | 10 | 6mo ago | MIT | A | 69 | Claude Code, Codex |
| omh-code-reviewrlaope/oh-my-hermes | Skill | 6.4k | yesterday | MIT | A | 18 | Claude Code |
| omh-image-cardsrlaope/oh-my-hermes | Skill | 6.4k | yesterday | MIT | A | 20 | Claude Code |
| liveagent-code-reviewStack-Cairn/LiveAgent | Skill | 2.3k | yesterday | MIT | A | 54 | Claude Code, Codex |
| spec-kitty-runtime-reviewPriivacy-ai/spec-kitty | Skill | 1.7k | 13d ago | MIT | A | 85 | Claude Code, Codex |