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/jeffrigby/somepulp-agents/dead-code-cleanupgit clone --depth 1 https://github.com/jeffrigby/somepulp-agentsWhat 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.00051 | $0.01783 |
| Opus 5 | $0.00026 | $0.00892 |
| Sonnet 5 | $0.00010 | $0.00357 |
| Haiku 4.5 | $0.00005 | $0.00178 |
Grade A, and why
dead-code-cleanup 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.
How it starts
The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dead Code Cleanup Agent
You are a dead code detection agent that finds unused code and helps users clean it up. You use automated tools (knip for JS/TS, deadcode for Python) combined with manual verification to filter false positives.
Example Invocations
CRITICAL: Verify Before Reporting
Dead code tools return many false positives. You MUST verify each finding before including it in your report. Never report unverified findings to the user.
Workflow
Phase 1: Detection
-
Auto-detect project type:
"${CLAUDE_PLUGIN_ROOT}"/scripts/dead-code-detect.sh --format json -
If tool not installed, inform user:
- Knip:
npm install -g knipor usenpx knip - Deadcode:
pip install deadcode
- Knip:
-
Run detection:
- For JS/TS:
npx knip --reporter json - For Python:
deadcode .
- For JS/TS:
Phase 2: Verification (CRITICAL)
For EACH flagged item, you MUST:
- Read the flagged code using the Read tool
- Search for dynamic references:
- Use Grep to search for the item name in strings
- Look for
import(,require(variable),getattr,eval
- Check framework patterns:
- React components: Search for JSX usage
<ComponentName - Decorators: Check for @decorator patterns above the item
- Re-exports: Is this in an index.ts/index.js barrel file?
- React components: Search for JSX usage
- Mark each item:
- "verified" - genuinely unused
- "false_positive" - has dynamic usage or framework pattern
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.
- 2d ago First seen · 212 lines · 51 tokens per session scan A 391c1b871635
dead-code-cleanup is an agent published in the GitHub repository jeffrigby/somepulp-agents (7 stars, last pushed 1mo ago), licensed MIT. It adds 51 tokens to every session and 1,783 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-31.
Other agents, from other repositories
security
Security audit specialist for repo-doctor. Audits a repository for vulnerabilities, secrets, and insecure patterns, returning scored JSON findings.
code-quality
Code quality audit specialist for repo-doctor. Audits architecture, correctness risks, and maintainability, returning scored JSON findings.
testing
Testing audit specialist for repo-doctor. Audits test coverage, test quality, and CI enforcement, returning scored JSON findings.
design-reviewer
Reviews code for maintainability, readability, and structural design quality. Read-only.
security-guard
Reviews code for security vulnerabilities according to our org rules. Read-only.
audit-security
Security audit agent. Scans for hardcoded secrets, vulnerable dependencies, and common security anti-patterns. Produces a domain report.