audit-dead-code
Installation
SKILL.md
Audit Dead Code
Audit reachability before deleting anything. Build a proof chain from live entrypoint to candidate, then apply the smallest safe removal.
Follow this workflow
- Map the codebase entrypoints, public surfaces, and dynamic loading surfaces in scope.
- Search for references from public surfaces inward, not just from the candidate itself.
- Classify each candidate as unused export, unreachable code, orphaned file, stale feature flag, dead registration, or legacy compatibility path.
- Build a proof chain with code search, config or registry checks, framework conventions, and typecheck, build, or tests where available.
- Prioritize findings as
P1throughP4. - Auto-fix only local, low-risk removals. Leave broader deletions as findings with a concrete removal plan.
Map live entrypoints first
Do not start deleting from leaf files without understanding how code can be reached.
Inspect the relevant equivalents of: