audit-dead-code

audit-dead-code is a skill for Claude Code from melodic-software/claude-code-plugins. It costs 99 tokens per session (4,020 once invoked), scanned A, original, MIT.

A repository-wide search for code that appears unused, covering several programming languages and tools, with each result checked for likely false positives.

In plain words
What is it for?
Use it to find unused files, exports, types, functions, classes, variables, and unreachable code for possible removal.
Why use it?
It helps separate genuinely unreachable code from code that static analysis cannot recognize as used, such as dynamically loaded code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

Part of the code-tidying plugin — 5 skills shipped together

Good fit Use it to find unused files, exports, types, functions, classes, variables, and unreachable code for possible removal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/melodic-software/claude-code-plugins/audit-dead-code
Install

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.

Any agent
npx skills add melodic-software/claude-code-plugins --skill audit-dead-code
Clone the repo
git clone --depth 1 https://github.com/melodic-software/claude-code-plugins

Made for: Claude Code.

Or install code-tidying, the plugin that ships this one along with the rest of its 5 skills.

Wrote 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.

agentmods badge for audit-dead-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-dead-code/github.svg)](https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-dead-code)
Your own site
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-dead-code"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-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.

agentmods 80×15 button for audit-dead-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-dead-code"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-dead-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,020 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.04020
Opus 5.5 $0.00040 $0.01608
Sonnet 5.5 $0.00020 $0.00804
Haiku 4.5 $0.00010 $0.00402

Measured 6d ago against content hash cc2b84474de1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-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 6d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (evals/fixtures/dead-and-dynamic.py, evals/fixtures/dead-and-dynamic.sh, evals/fixtures/dead-and-dynamic.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/code-tidying/skills/audit-dead-code/SKILL.md · 244 lines

How it starts

The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Purpose

Find code nothing has touched in a long time, which a rotated tidying lane and a diff-scoped simplification pass cannot see, and answer what here is no longer reachable, and how confident are we? Every candidate is adjudicated against the dynamic-usage patterns static analyzers miss, so the report is a list of decisions a human can act on, not an analyzer dump to re-verify.

The four lanes are not peers

Present them as four lanes of unequal strength, each labeled. A report that treats them as equals is wrong even when every finding in it is right.

Lane Covers Measured character How it fails
knip TS/JS: unused files, exports, types, enum members. Not class members (Knip 6 rejects --include classMembers) 60% precision / 100% recall on trap fixtures Unrestored, it manufactures false positives (a failed config load produced 2 phantom "unused files"); its ERROR: line goes to stderr, which the JSON reporter discards
vulture Python: unused function, class, method, variable, attribute, plus unreachable code 16.7% precision / 100% recall; all five trap classes false-positived at 100% Low precision by construction. Its output is a worklist, never a verdict
gopls Go: unexported symbols only (gopls check -severity=hint), the lane's declared coverage Correct on every measured symbol; 2.1s An unresolved module graph suppresses hints: false negatives, the opposite of knip. Never describe the two degradations with one phrase
grep Shell and PowerShell functions; function/class/const/let/var declarations in JS/TS no package.json root owns (ts-unreferenced-symbol); unreferenced source files (unreferenced-file) Shell symbols: 4/4 true positives, 0 false over 546 .sh files (shellcheck found 0 of the 4). JS/TS symbols: 66.7% precision / 66.7% recall (as recorded 2026-09-29). unreferenced-file precision unmeasured Low recall: $, -, . are non-word characters, so an adjacent hit reads as a reference and saves a possibly dead symbol. A JS/TS export only an entry point or outside consumer calls is a false candidate; a name in a comment saves a dead one

Read the full file on GitHub · 244 lines

Changes

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.

  1. 6d ago Changed · +3 lines cc2b84474de1
  2. 11d ago Changed · -16 lines · -18 tokens per session a80cc125a712
  3. 18d ago Changed · -10 tokens per session 2dd1d3489499
  4. 19d ago Changed · +32 lines · +10 tokens per session dfd2ae001793
  5. 20d ago Changed · +29 lines · -59 tokens per session eb5f6db65df0
  6. 21d ago Changed · -78 tokens per session fd2311af442a
  7. 26d ago Changed 5c7cc3da296f
  8. 1mo ago Changed · -1 lines a7b5a6414e03
  9. 1mo ago Changed · +3 lines 799e1f86bfef
  10. 1mo ago First seen · 194 lines · 254 tokens per session scan A 5f2ea35343db

Subscribe to this mod's changes

audit-dead-code is a skill published in the GitHub repository melodic-software/claude-code-plugins (26 stars, last pushed today), licensed MIT. It adds 99 tokens to every session and 4,020 once invoked, about $0.0004 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-30.