dead-code

dead-code is a skill for Claude Code from motlin/claude-code-plugins. It costs 81 tokens per session (1,305 once invoked), scanned A, original, Apache-2.0.

A code-cleanup helper that finds and removes code, files, exports, or dependencies that nothing uses. An export is a piece of code made available to other files, and a dependency is an external package the project relies on.

In plain words
What is it for?
It helps find unreachable or unused parts of a file, directory, or repository, while leaving uncertain cases for a person to decide.
Why use it?
Unused code increases reading, review, and build work and can make obsolete behavior look important.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions Claude Code; mentions Codex.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the code plugin — 12 skills, 2 commands shipped together

Good fit It helps find unreachable or unused parts of a file, directory, or repository, while leaving uncertain cases for a person to decide.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add motlin/claude-code-plugins
Claude Code
/plugin install code

Made for: Claude Code.

Or install code, the plugin that ships this one along with the rest of its 12 skills, 2 commands.

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 dead-code

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/motlin/claude-code-plugins/dead-code"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/dead-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,305 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.
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.00081 $0.01305
Opus 5.5 $0.00032 $0.00522
Sonnet 5.5 $0.00016 $0.00261
Haiku 4.5 $0.00008 $0.00130

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

Security

Grade A, and why

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

plugins/code/skills/dead-code/SKILL.md · 79 lines

How it starts

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

Dead Code

Delete code nothing uses. Dead code costs reading time, review time and build time, and it misleads: a reader assumes it matters. A wrong deletion costs more than a missed one, so every removal carries evidence, and anything a tool cannot see into stays.

Resolve <plugin-root> first: in Claude Code use ${CLAUDE_PLUGIN_ROOT}; in Codex use the plugin root that contains this skills/dead-code/SKILL.md file. The script below needs Python 3.9 or later.

Arguments

  • Scope: a file, a directory, or the whole repo (the default). Only code in scope is removed, but references are always searched across the whole repo.
  • unattended: passed by callers such as burn. An unattended run asks the user nothing. Every question it would have asked becomes a queued finding instead (see Report).

Detect from the entry points

Analyze reachability from the program's entry points, not one symbol at a time. Whole-graph analysis finds chains of code that only dead code calls; Meta's SCARF removed about 50% more once it switched to it (https://engineering.fb.com/2023/10/24/data-infrastructure/automating-dead-code-cleanup/). Find the detectors the project already has:

python3 <plugin-root>/scripts/dead_code.py --root . detect

detect recognizes these and prints their commands:

  • knip, run twice: by default, then with --production, which also reports code that only tests use;
  • vulture for Python;
  • deadcode -test for Go, with -whylive to show why a symbol it keeps is alive;
  • cargo-machete for unused Rust dependencies;
  • OpenRewrite's private-only RemoveUnused* recipes for Java, through the Maven rewrite plugin.

The baseline must pass: if the build or tests fail before any change, stop and report it, because this skill never fixes a broken build. Never install a detector or add it to the project's dependencies: an interactive run asks first, and an unattended run queues the suggestion and falls back to the method below.

Without a detector, list candidates from the language server's find-references, or by reading the scope for definitions, and check each one with a repo-wide grep that includes string matches:

Read the full file on GitHub · 79 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. 20d ago First seen · 79 lines · 81 tokens per session scan A 8ccf503f30a7

Subscribe to this mod's changes

dead-code is a skill published in the GitHub repository motlin/claude-code-plugins (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 81 tokens to every session and 1,305 once invoked, about $0.0003 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-11-15.

Related

dead-code compared with skills from other repositories

dead-code next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dead-codemotlin/claude-code-pluginsSkill202d agoApache-2.0A81Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9ktodayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill343todayApache-2.0A112Claude Code
performance-verificationvalkor-ai/loomSkill1.6k3d agoApache-2.0A45Claude Code, Codex
loop-engineeringhuytieu/COG-second-brainSkill1.6kyesterdayMITA63Claude Code