dead-code-auditor

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

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 agents/dynos-fit/dynos-work/dead-code-auditor
Clone the repo
git clone --depth 1 https://github.com/dynos-fit/dynos-work
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,308 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.00087 $0.01308
Opus 5 $0.00044 $0.00654
Sonnet 5 $0.00017 $0.00262
Haiku 4.5 $0.00009 $0.00131

Measured 2d ago against content hash 68169a157224, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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-auditor.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 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 (from git diff --name-only {snapshot_head_sha}). 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 · 121 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 · 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 1mo ago), licensed MIT. It adds 87 tokens to every session and 1,308 once invoked, about $0.0004 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-31.

Related

Other agents, from other repositories