dead-code-hunter

dead-code-hunter is a skill for Claude Code from magic5644/Graph-It-Live. It costs 165 tokens per session (3,363 once invoked), scanned A, original, MIT.

A dead-code scanner that finds symbols no code calls and files nothing references, then creates a ranked deletion plan with safety notes.

In plain words
What is it for?
Use it before refactoring, after removing a feature, or during routine code cleanup to find candidates for deletion.
Why use it?
It reduces the risk of deleting code that is still needed while cleaning up unused parts of a codebase.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the graph-it-live plugin — 5 skills, 1 MCP server shipped together

Good fit Use it before refactoring, after removing a feature, or during routine code cleanup to find candidates for deletion.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magic5644/graph-it-live/dead-code-hunter
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 magic5644/Graph-It-Live --skill dead-code-hunter
Clone the repo
git clone --depth 1 https://github.com/magic5644/Graph-It-Live

Made for: Claude Code.

Or install graph-it-live, the plugin that ships this one along with the rest of its 5 skills, 1 MCP server.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/magic5644/graph-it-live/dead-code-hunter"><img src="https://agentmods.dev/badge/skills/magic5644/graph-it-live/dead-code-hunter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,363 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.00165 $0.03363
Opus 5.5 $0.00066 $0.01345
Sonnet 5.5 $0.00033 $0.00673
Haiku 4.5 $0.00016 $0.00336

Measured 11d ago against content hash b80507b1fdd7, 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-hunter 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 11d 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/graph-it-live/skills/dead-code-hunter/SKILL.md · 222 lines

How it starts

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

Dead Code Hunter

Systematic scan of the dependency graph to surface orphan symbols and unreferenced files. Produces a ranked, safety-annotated deletion plan powered by Graph-It-Live.

Setup, routing and format

  • Prefer the Graph-It CLI. At the first activation of any Graph-It skill in a session, run graph-it --version and graph-it tool --list once and share them across Graph-It skills. Requires CLI 1.21.0 or later: if older or unreadable, say so, name the missing commands, offer graph-it update, and use only what --help and tool --list show. Do not install the CLI automatically. Without it, use only an equivalent MCP tool the host advertises, with its exact input schema; otherwise explain the gap.
  • Run graph-it update only after explicit positive confirmation; silence, timeout, refusal, non-TTY or generic Agent mode is not consent, an explicitly pre-authorized automatic mode is. After success, refresh version and inventory; a running MCP server needs a host-authorized restart. On failure, keep a usable CLI, warn once, do not retry.
  • Routing: finding candidates and confirming references always goes through the graph. Read a candidate file directly, bounded, only to judge it (dynamic use, framework magic, public API).
  • Format: --format toon for everything you read; json only when a script parses the output.

When to Use

  • Before a major refactor — clean up before you restructure
  • After removing a feature — confirm nothing is left dangling
  • Periodic code hygiene pass on a growing codebase
  • Before onboarding a new developer — reduce noise in the codebase

Workflow — Step by Step

Step 1 — Pick the workspace root

No graph-it scan first: every command restores .graph-it/cache/, re-analyzes changed files and builds the reverse lookup index (who imports what, who calls what) on demand. --reindex rebuilds from scratch when results look wrong.

Monorepos. Scanning one package finds candidates faster, but "unused" then means unused inside that package: a sibling package may still import the export. Without --workspace the CLI uses the nearest project marker (package.json, pyproject.toml, Cargo.toml, go.mod, ...) and exits with code 3 outside any project; graph-it -w <dir> forces the root. If a command prints Warning: N imports resolve outside the workspace root, sibling-package imports are not indexed. Before recommending a deletion, confirm there is no consumer from the monorepo root (graph-it -w <monorepoRoot> tool find_referencing_files --targetPath=<path> --format toon), or state that the result is limited to the selected package.

Read the full file on GitHub · 222 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago Changed b80507b1fdd7
  2. 12d ago Changed · +3 lines ec2d849411a5
  3. 16d ago Changed · +7 lines 2529f67c9215
  4. 17d ago Changed · +20 lines 50c0aeb0ce66
  5. 18d ago Changed · +18 lines fb5141196595
  6. 21d ago Changed · -50 lines cdcf1e797c80
  7. 23d ago Changed · +4 lines 4a5e9ba80932
  8. 24d ago Changed 1950caef023e
  9. 1mo ago Changed · +7 lines 6fde70007951
  10. 1mo ago First seen · 213 lines · 165 tokens per session scan A 96e4489cd8bc

Subscribe to this mod's changes

dead-code-hunter is a skill published in the GitHub repository magic5644/Graph-It-Live (63 stars, last pushed 2d ago), licensed MIT. It adds 165 tokens to every session and 3,363 once invoked, about $0.0007 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-09-13.

Related

dead-code-hunter compared with skills from other repositories

dead-code-hunter next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dead-code-huntermagic5644/Graph-It-LiveSkill632d agoMITA165Claude Code
agyVit129/agy-plugin-ccSkill62d agoApache-2.0C55Claude Code
debugging-workflowsCrowdStrike/foundry-skillsSkill3810d agoMITA90Claude Code
app-auditCrowdStrike/foundry-skillsSkill3810d agoMITA104Claude Code
debugging-and-error-recoveryvinvcn/addyosmani-agent-skills-zhSkill571mo agoMITA78Claude Code
agy-companion-referenceVit129/agy-plugin-ccSkill62d agoApache-2.0A53Claude Code
gemini-3-promptingVit129/agy-plugin-ccSkill62d agoApache-2.0A26Claude Code