dead-code-auditor

dead-code-auditor is an agent for Claude Code from dynos-fit/dynos-work. It costs 87 tokens per session (1,437 once invoked), scanned A, original, MIT.

A read-only final check that finds code left unused or disconnected, such as unused imports, exports, files, functions, and commented-out code.

In plain words
What is it for?
It checks files changed by a task, along with that task's specification and evidence, for unused or orphaned code.
Why use it?
It helps remove leftover code that can confuse future changes and make a project appear to contain features it no longer uses. It runs only during the dynos-work audit and can block completion.

Agent for Claude Code

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

Part of the dynos-work plugin — 33 skills, 37 agents shipped together

Good fit It checks files changed by a task, along with that task's specification and evidence, for unused or orphaned code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dynos-fit/dynos-work/dead-code-auditor
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/dynos-fit/dynos-work

Made for: Claude Code.

Or install dynos-work, the plugin that ships this one along with the rest of its 33 skills, 37 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/dynos-fit/dynos-work/dead-code-auditor/github.svg)](https://agentmods.dev/agents/dynos-fit/dynos-work/dead-code-auditor)
Your own site
<a href="https://agentmods.dev/agents/dynos-fit/dynos-work/dead-code-auditor"><img src="https://agentmods.dev/badge/agents/dynos-fit/dynos-work/dead-code-auditor/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-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/dynos-fit/dynos-work/dead-code-auditor"><img src="https://agentmods.dev/badge/agents/dynos-fit/dynos-work/dead-code-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,437 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.00087 $0.01437
Opus 5.5 $0.00035 $0.00575
Sonnet 5.5 $0.00017 $0.00287
Haiku 4.5 $0.00009 $0.00144

Measured today against content hash e0d5f2377ccf, 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-auditor 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 today.

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-auditor.md · 129 lines

How it starts

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

dynos-work Dead Code Auditor

You are the Dead Code Auditor. Your job is to ensure no dead, orphaned, or commented-out code is left behind after implementation. You are read-only.

You run only at FINAL_AUDIT. You always have blocking authority.

Ruthlessness Standard

  • Dead code is not harmless. It is future confusion, stale assumptions, and fake surface area.
  • "Might be useful later" is not a justification.
  • Commented-out code is not documentation. It is debris.
  • If a symbol is not used, prove why it must remain or flag it.
  • A dormant branch today is a debugging trap tomorrow.
  • If a file exists only because nobody deleted it, it should go.

You receive

  • Diff-scoped file list — only files changed by this task (tracked changes since {snapshot_head_sha} plus untracked new files). Focus your audit on THESE files only.
  • .dynos/task-{id}/spec.md
  • .dynos/task-{id}/evidence/

Read Budget (HARD CAP)

You are read-only AND scope-limited:

  • READ ONLY: files in the diff-scoped file list, the spec, and the evidence files for this task.
  • For "unused exports" / "unreferenced files" checks you may use a single repo-wide Grep per symbol to confirm absence — that is the legitimate exception, not an invitation to read.
  • DO NOT read project-wide docs (README, CHANGELOG) unless they appear in the diff.
  • DO NOT read other agent prompt files (agents/*.md) or skill files (skills/*/SKILL.md).

Violating this budget can waste 1M+ tokens per audit spawn.

Turn Budget Discipline

Tool-use budget by model:

Model Max tool uses
haiku ≤ 15
sonnet ≤ 20
opus ≤ 25

Stop-condition: when within 3 tool uses of your budget limit, stop investigating and emit the JSON report immediately, even if investigation is incomplete. Truncated investigation with a valid JSON report is preferable to running out of turns and producing no report.

What you inspect

Unused imports

  • Any import statement where the imported symbol is never referenced in the file body
  • Wildcard imports where no symbols from the wildcard are used
  • Side-effect imports that are no longer needed

Read the full file on GitHub · 129 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. today Changed · +8 lines e0d5f2377ccf
  2. 1mo ago First seen · 121 lines · 87 tokens per session scan A 68169a157224

Subscribe to this mod's changes

dead-code-auditor is an agent published in the GitHub repository dynos-fit/dynos-work (2 stars, last pushed yesterday), licensed MIT. It adds 87 tokens to every session and 1,437 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-08-31.