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 SkillMedev/legacy-modernization --skill dead-code-eliminatorgit clone --depth 1 https://github.com/SkillMedev/legacy-modernizationWrote 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/skillmedev/legacy-modernization/dead-code-eliminator)<a href="https://agentmods.dev/skills/skillmedev/legacy-modernization/dead-code-eliminator"><img src="https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/dead-code-eliminator/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/skillmedev/legacy-modernization/dead-code-eliminator"><img src="https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/dead-code-eliminator.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.00090 | $0.00894 |
| Opus 5.5 | $0.00036 | $0.00358 |
| Sonnet 5.5 | $0.00018 | $0.00179 |
| Haiku 4.5 | $0.00009 | $0.00089 |
Grade A, and why
dead-code-eliminator 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.
This is a copy
100% identical to dead-code-eliminator — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dead Code Eliminator
Delete code only after converging evidence proves it dead, then remove it in reversible slices that include its tests, fixtures, config, and flags.
Workflow
- Scope one cluster. Pick a single symbol, file, or feature to prove dead. Do not batch unrelated removals - a regression must point to one change.
- Gather static evidence. Run the language's dead-code detector (ts-prune or knip for TS/JS, vulture for Python,
deadcodefor Go) and a dependency grapher (madge) or IDE "find usages". Record what each reports unreachable. - Gather runtime evidence. Check production coverage or profiling data over a representative window - at least 30 days for user-facing paths, 90+ days for code tied to monthly or quarterly jobs - and telemetry: was this endpoint, job, or branch hit this quarter? A symbol is a deletion candidate only when static analysis AND runtime evidence agree. One signal alone produces false positives that take down prod.
- Hunt the dynamic callers static tools miss. Grep the symbol name as a string (reflection, string-keyed dispatch, serialization). Check DI containers, registries, ORM hooks, cron/queue workers, and feature-flag config. Search infra repos and other services. Public API surface and library exports are reachable by definition unless you control every consumer.
- Classify the kind of dead, because each is removed differently. Unreachable (no path calls it) → delete. Unused (callable, never called) → delete. Redundant (duplicates a live path) → repoint callers first. Dormant-behind-a-flag (flag off for a cycle) → retire the flag first, then delete its branch.
- Soft-delete risky removals first. Replace the suspect path with log-and-throw, or gate it behind a kill flag while keeping the code, for one full business cycle - 30 days minimum, 90 for anything touching monthly or quarterly processes. If nothing fires the log, proceed. For low-risk leaf code, skip to step 7.
- Delete in a focused PR. Remove the code AND its tests, fixtures, config, flags, and now-orphaned imports. Keep the diff under roughly 400 changed lines so it is reviewable in one sitting; a bigger cluster gets split into multiple PRs. Let CI and the type-checker catch references the search missed. No formatting or refactors in the same diff.
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 Changed · +2 lines · +1 tokens per session 960a4568cb4b
- 1mo ago First seen · 39 lines · 89 tokens per session scan A fa1ad0f4793a
dead-code-eliminator is a skill published in the GitHub repository SkillMedev/legacy-modernization (2 stars, last pushed 21d ago), licensed MIT. It adds 90 tokens to every session and 894 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to dead-code-eliminator, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
Breaking Change Detector
Compares two versions of a codebase or API and flags all breaking changes with migration hints.
Bug Root Cause Analyzer
Systematically diagnoses bugs by tracing execution flow and identifying root causes vs symptoms.
Error Log Summarizer
Parses raw error logs and produces a concise, prioritized summary of unique issues with root cause hints.
Stack Trace Analyzer
Interprets error stack traces to pinpoint root cause, explain what went wrong, and suggest fixes.
code-necromancer
Systematic framework for resurrecting and modernizing legacy codebases through archaeology, resurrection, and rejuvenation phases. Activate on "legacy code", "inherited codebase", "no documentation", "technical debt", "resurrect", "modernize". NOT for greenfield projects or well-documented active codebases.
sentry-setup-tracing
Setup Sentry Tracing (Performance Monitoring) in any project. Use this when asked to add performance monitoring, enable tracing, track transactions/spans, or instrument application performance. Supports JavaScript, TypeScript, Python, Ruby, React, Next.js, and Node.js.