← ClaudeAtlas

awb-dead-code-auditlisted

WHAT: find genuinely unused code with a false-positive gate — a symbol is reported "dead" only when several INDEPENDENT cross-checks all come back empty, never on one finder's say-so. USE WHEN: an on-request cleanup sweep ("find dead / unused code", "what can we delete", a post-refactor or pre-release prune, "is this function called anywhere?"). DO NOT TRIGGER: "this function is too long / too complex" (a structural-size concern, not deadness); hunting for bugs (a review/debug skill); deleting code the user already named as dead.
doivamong/agent-workbench · ★ 2 · Code & Development · score 78
Install: claude install-skill doivamong/agent-workbench
# Dead-code audit (false-positive gated) > **Announce on activation:** "Using awb-dead-code-audit — cross-checking before calling anything dead." Finding candidates is easy; the hard part is not being **wrong**, because a confidently-wrong "this is dead" deletes something reached dynamically and breaks production. ## Scope - **Does:** propose deletion candidates, try hard to *disprove* each one's deadness, and present only the survivors — with evidence — for a human to delete. - **Does NOT:** auto-delete anything (ever), judge code quality/length, or claim certainty. Static reachability is undecidable under dynamic dispatch; this is a high-confidence filter, not a proof. ## Why one finder isn't enough A symbol can be reached with no literal call site: dynamic dispatch (`getattr`, a handler registry, plugin discovery), string/declarative references (templates, config, serialization, route/ORM decorators, CLI entry points), an external/public-API surface, or framework hooks (fixtures, signal handlers). A grep that finds zero call sites found zero *literal* ones — not zero *uses*. ## Reader-dead is not feature-dead A symbol with no live *reader* can still have a live *writer*. A scheduled task, cron job, or ETL step may keep populating a table or file that nothing reads any more — so deleting the dead reader leaves the producer running, accruing orphaned data silently. When you audit a *feature* for removal (not just a single symbol), trace the **write** side too: wh