audit-dead-code

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 CodeCodex

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.

agentmods
npx agentmods add skills/melodic-software/claude-code-plugins/audit-dead-code
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, Codex.

Per session 254 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00254 $0.03269
Opus 5 $0.00127 $0.01635
Sonnet 5 $0.00051 $0.00654
Haiku 4.5 $0.00025 $0.00327

Measured 2d ago against content hash 5f2ea35343db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d ago.

The scan reads SKILL.md. This mod also ships 10 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 · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 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, the category a rotated tidying lane and a diff-scoped simplification pass structurally cannot see. A run answers what in this repository is no longer reachable, and how confident are we? Every candidate is adjudicated against the dynamic-usage patterns static analyzers are blind to, so the report is a list of decisions a human can act on rather than an analyzer dump the reader must re-verify.

The headline is four lanes of unequal strength, each labelled, not four peer detectors. A report that presents them as equals is wrong even when every finding in it is right.

The four lanes are not peers

Lane Covers Measured character How it fails
knip TS/JS: unused files, exports, types, enum members. Not class members. Knip 6 rejects --include classMembers outright 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% High recall, low precision by construction. Read its output as a worklist, never as a verdict
gopls Go: unexported symbols only (gopls check -severity=hint). That is the lane's declared coverage, not a defect 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 shared phrase
grep Shell and other symbol languages: function definitions with no reference anywhere 4/4 true positives, 0 false positives over 546 .sh / 177,793 lines; shellcheck found 0 of the same 4 High precision, acknowledged low recall. $, -, . are non-word characters, so an adjacent hit reads as a reference and quietly saves a symbol that may be dead

Read the full file on GitHub · 194 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. 2d 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 (12 stars, last pushed 2d ago), licensed MIT. It adds 254 tokens to every session and 3,269 once invoked, about $0.0013 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-30.

Related

Other skills, from other repositories

deep-research

Conducts iterative deep research on any topic using web search, progressive exploration, and structured synthesis. Use when asked for comprehensive research, deep investigation, thorough analysis, or multi-source exploration of any topic. Triggers: research, investigate, deep dive, comprehensive analysis, explore…

jimmc414/claude-code-plugin-marketplace · 64 tokens

error-ux

Principles and patterns for writing error messages that help users recover. Use when auditing, writing, or improving error messages in code. Triggers: error messages, user experience, error handling, exception messages, validation errors.

jimmc414/claude-code-plugin-marketplace · 48 tokens

adversarial-patterns

Library of realistic adversarial attack vectors and anti-patterns to avoid. Contains examples of valid attacks and subtle gaming patterns to reject.

jimmc414/claude-code-plugin-marketplace · 32 tokens

documentation-testing

Provides heuristics for identifying incomplete or broken documentation. Use when validating README setup instructions, testing onboarding flows, or auditing documentation quality. Triggers: docs, readme, onboarding, setup validation, documentation audit.

jimmc414/claude-code-plugin-marketplace · 45 tokens

adversarial-analysis

Analyze code to identify explicit contracts, implicit usage patterns, and realistic boundary conditions. Contains concrete formulas for calculating input realism limits. Use before generating adversarial tests.

jimmc414/claude-code-plugin-marketplace · 37 tokens

propagate-then-search

For constraint problems: eliminate impossibilities before guessing, reduce search space through inference, fail fast on contradictions.

jimmc414/claude-code-plugin-marketplace · 27 tokens