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 skills/yeaight7/agent-powerups/dead-code-removalnpx skills add yeaight7/agent-powerups --skill dead-code-removalgit clone --depth 1 https://github.com/yeaight7/agent-powerupsWrote 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/yeaight7/agent-powerups/dead-code-removal)<a href="https://agentmods.dev/skills/yeaight7/agent-powerups/dead-code-removal"><img src="https://agentmods.dev/badge/skills/yeaight7/agent-powerups/dead-code-removal.svg" alt="Measured on agentmods" 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 | $0.00024 | $0.00574 |
| Opus 5 | $0.00012 | $0.00287 |
| Sonnet 5 | $0.00005 | $0.00115 |
| Haiku 4.5 | $0.00002 | $0.00057 |
Grade A, and why
dead-code-removal 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 3d 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 — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose
Dead code increases maintenance overhead and confuses developers. Verify a symbol is truly unused across the entire repository, then delete it outright — never comment it out.
When to Use
- A symbol, file, or export looks unused
- A feature removal or migration left orphaned helpers behind
- A coverage or lint report flags unreachable code
Inputs
- The candidate symbols/files to remove
- The repo's test and type-check commands
Workflow
-
Verify unused — search the entire repository. Do not assume code is dead just because the current file doesn't use it:
grep -rn "symbolName" . --include="*.ts" --include="*.tsx" # all references grep -rn "from ['\"].*module-name" src/ # import sites git log -3 --oneline -- path/to/suspect-file # recent touchesEcosystem tools can shortcut the inventory when available (e.g., knip or ts-prune for TypeScript exports, vulture for Python).
-
Check for dynamic invocation. Be wary of dynamically invoked code — reflection, dependency injection by string name, ORM mappers, route tables, config-driven dispatch:
grep -rn "\"symbolName\"\|'symbolName'" . # string-keyed referencesIf there is any doubt, leave it alone or ask the user.
-
Delete aggressively. Once confirmed unused, delete the code. Do not comment it out.
-
Prune dependencies. If you delete the only code that was using an imported module, remove the import statement as well.
-
Run tests. Always run tests and/or type checkers (e.g.,
tsc --noEmit) after removal to ensure you didn't accidentally break a hidden dependency.
Output
- The deletion diff plus, per removed symbol, the search evidence that it was unused
Verification
- Whole-repo search performed per symbol — including string-keyed/dynamic references
- No commented-out code left behind
- Orphaned imports pruned along with the dead code
- Tests and type checker green after removal
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.
- 3d ago First seen · 63 lines · 24 tokens per session scan A b5fa170a06be
dead-code-removal is a skill published in the GitHub repository yeaight7/agent-powerups (6 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 24 tokens to every session and 574 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 skills, from other repositories
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
github-code-review
Review PRs: diffs, inline comments via gh or REST.
plan
Plan mode: write markdown plan, no execution.
simplify-code
Sequential 3-lens cleanup of recent code changes.
skill-authoring
Author SKILL.md: frontmatter, structure, writing principles.
requesting-code-review
Pre-commit review: security scan, quality gates, auto-fix.