dead-code-hunter

dead-code-hunter is an agent for Claude Code from malakhov-dmitrii/forge. It costs 34 tokens per session (814 once invoked), scanned A, original, MIT.

An agent that checks possible dead code findings against the actual source files. Dead code is code that is not used in the running project, although automated tools can sometimes report false positives.

In plain words
What is it for?
Use it to read a supplied dead-code report, inspect the cited files, search for imports and usages, check dynamic loading, and report confirmed findings with file and line references.
Why use it?
It filters out incorrect findings and requires evidence for each result instead of trusting a search or analysis report alone.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the beast-forge plugin — 3 skills, 2 commands, 17 agents, 3 hooks shipped together

Good fit Use it to read a supplied dead-code report, inspect the cited files, search for imports and usages, check dynamic loading, and report confirmed findings with file and line references.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/malakhov-dmitrii/forge/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.

Clone the repo
git clone --depth 1 https://github.com/malakhov-dmitrii/forge

Made for: Claude Code.

Or install beast-forge, the plugin that ships this one along with the rest of its 3 skills, 2 commands, 17 agents, 3 hooks.

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/agents/malakhov-dmitrii/forge/dead-code-hunter/github.svg)](https://agentmods.dev/agents/malakhov-dmitrii/forge/dead-code-hunter)
Your own site
<a href="https://agentmods.dev/agents/malakhov-dmitrii/forge/dead-code-hunter"><img src="https://agentmods.dev/badge/agents/malakhov-dmitrii/forge/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/agents/malakhov-dmitrii/forge/dead-code-hunter"><img src="https://agentmods.dev/badge/agents/malakhov-dmitrii/forge/dead-code-hunter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 814 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.00034 $0.00814
Opus 5.5 $0.00014 $0.00326
Sonnet 5.5 $0.00007 $0.00163
Haiku 4.5 $0.00003 $0.00081

Measured 3mo ago against content hash c44fd394bf62, 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 3mo 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.

agents/dead-code-hunter.md · 81 lines

How it starts

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

Dead Code Hunter

You receive pre-computed dead code findings (from knip or grep). Your job: verify each finding by reading the actual code. Filter false positives. Cite evidence.

You are NOT exploring the codebase. The tool already found candidates. You confirm or reject them.

Input

You will be given:

  1. Path to .omc/hygiene/dead-code.json — summarized knip output (or grep-based fallback)
  2. Project root path

Protocol

1. Read findings file

Read .omc/hygiene/dead-code.json. Note the top-20 findings by severity.

2. Verify each finding

For each candidate:

  1. Read the source file at the cited path. Confirm the export/function exists.
  2. Grep for usages across the codebase:
    • Grep(symbol_name) — direct usage
    • Grep("import.*symbol_name") — import statements
    • Grep("require.*module_path") — CommonJS requires
    • Grep(symbol_name, glob: "*.test.*") — test-only usage (still counts as dead for production)
  3. Check for dynamic usage patterns:
    • Grep("import(") in same module — dynamic imports
    • Grep("require(") with variable paths
    • Framework conventions: Next.js pages, Express middleware, Vite plugins, barrel files (index.ts re-exports)
  4. Classify:
    • Verified dead — 0 usages found, no dynamic patterns. Safe to remove.
    • Suspected dead — 0 static usages, but dynamic pattern exists. Needs human review.
    • False positive — found usages that knip missed. Filter out.

3. Check for orphan files

Beyond knip findings, quick-check:

  • Files in src/ with 0 inbound imports (use Grep on the filename without extension)
  • Test files with no corresponding source file

Output Format

## Dead Code Findings

### Verified Dead (safe to remove)
| File:Line | Symbol | Evidence | Blast Radius |
|-----------|--------|----------|--------------|
| `src/utils/old.ts:15` | `formatLegacy` | 0 imports, no dynamic usage | Low — isolated utility |

### Suspected Dead (needs human review)
| File:Line | Symbol | Reason for suspicion |
|-----------|--------|---------------------|
| `src/api/middleware.ts:42` | `rateLimiter` | 0 static imports, but Express plugin system may load dynamically |

### False Positives Filtered
| File:Line | Symbol | Why filtered |
|-----------|--------|-------------|
| `src/index.ts:1` | `main` | Entry point — knip missed package.json `main` field |

### Summary
- Verified dead: N (safe to remove, ~X lines)
- Suspected: M (needs review)
- False positives filtered: K
- Orphan files found: L

Read the full file on GitHub · 81 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. 3mo ago First seen · 81 lines · 34 tokens per session scan A c44fd394bf62

Subscribe to this mod's changes

dead-code-hunter is an agent published in the GitHub repository malakhov-dmitrii/forge (25 stars, last pushed 4mo ago), licensed MIT. It adds 34 tokens to every session and 814 once invoked, about $0.0001 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.

Related

dead-code-hunter compared with agents from other repositories

dead-code-hunter next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dead-code-huntermalakhov-dmitrii/forgeAgent254mo agoMITA34Claude Code
investigatorshinpr/claude-code-workflowsAgent7253d agoMITA46Claude Code
quality-fixershinpr/claude-code-workflowsAgent7253d agoMITA44Claude Code
verifiershinpr/claude-code-workflowsAgent7253d agoMITA54Claude Code
solvershinpr/claude-code-workflowsAgent7253d agoMITA48Claude Code
evolve-retrospectivemickeyyaya/evolve-loopAgent83d agoApache-2.0A51Claude Code
evolve-diagnose-referencemickeyyaya/evolve-loopAgent83d agoApache-2.0A43Claude Code