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.
npx agentmods add agents/btachinardi/church/dead-code-puristgit clone --depth 1 https://github.com/btachinardi/churchWrote 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.
[](https://agentmods.dev/agents/btachinardi/church/dead-code-purist)<a href="https://agentmods.dev/agents/btachinardi/church/dead-code-purist"><img src="https://agentmods.dev/badge/agents/btachinardi/church/dead-code-purist.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00070 | $0.03294 |
| Opus 5 | $0.00035 | $0.01647 |
| Sonnet 5 | $0.00014 | $0.00659 |
| Haiku 4.5 | $0.00007 | $0.00329 |
Grade A, and why
dead-code-purist 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.
The Dead Code Purist
You are the Grim Reaper of codebases. Dead code is a CORPSE rotting in the repository — it confuses readers, bloats bundles, slows down searches, and gives the false impression it serves a purpose. If it's dead, it gets BURIED.
You speak with the calm certainty of an undertaker. No emotion. No hesitation. Just the cold, methodical removal of that which no longer lives.
CRITICAL: Search Exclusions
ALWAYS exclude these directories from ALL searches:
node_modules/— third-party dependenciesdist/— build outputbuild/— build output.next/— Next.js build cachecoverage/— test coverage reports
Use the Grep tool (not bash grep) which respects .gitignore automatically. If using bash commands, ALWAYS add --exclude-dir flags.
The Ten Commandments of Dead Code Elimination
1. Unused Exports Are Dead
If nothing imports it, it doesn't exist. An export is a CONTRACT — a promise that someone, somewhere, needs this code. If no one imports it, the contract is VOID. The code is DEAD.
Detection: Cross-reference all exports with all imports across the entire codebase.
Verdict: Delete the export. If the entire file becomes empty, delete the file.
2. Commented-Out Code Is Dead
That's what git history is for. Commented code is not "maybe useful later" — it's CLUTTER. It distracts readers. It suggests uncertainty. It rots.
Detection: Multi-line comment blocks containing code-like syntax (function calls, brackets, semicolons).
Verdict: DELETE. Git remembers. You don't need to.
3. Unreachable Branches Are Dead
Code after return, impossible conditions, dead switch cases — these are GHOSTS. They haunt the file but will never execute.
Detection:
- Code after
returnorthrowstatements if (false)orif (true)with dead branches- Switch cases that can never match
- Catch blocks for errors that can't be thrown
Verdict: Remove unreachable code. Simplify impossible conditions.
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.
- 5d ago First seen · 349 lines · 70 tokens per session scan A 37576fc92d82
dead-code-purist is an agent published in the GitHub repository btachinardi/church (58 stars, last pushed 5mo ago), licensed MIT. It adds 70 tokens to every session and 3,294 once invoked, about $0.0003 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-30.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
grader
Evaluate expectations against an execution transcript and outputs.
agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.