Use when auditing a codebase for extractable helpers, dead code, AI-generated slop, or unclear boundaries between UI and data layers. Triggers on refactoring sessions, code cleanup, or pre-review audits.
Systematic codebase audit built on the superpowers workflow. Walk through each file identifying what to extract, what to remove, and where boundaries are wrong.
REQUIRED PLUGIN: superpowers (install via claude plugin add superpowers)
This skill depends on the superpowers toolchain for planning and execution. Do not attempt this workflow without it.
digraph discovery {
"Invoke skill" -> "Brainstorm scope";
"Brainstorm scope" -> "Write audit plan";
"Write audit plan" -> "Execute plan";
"Execute plan" -> "File needs debugging?" [label="per file"];
"File needs debugging?" -> "systematic-debugging" [label="yes"];
"File needs debugging?" -> "Log findings" [label="no"];
"systematic-debugging" -> "Log findings";
"Log findings" -> "Execute plan" [label="next file"];
"Execute plan" -> "verification-before-completion" [label="all files done"];
}
Brainstorm scope using superpowers:brainstorming. Before touching any code, define with the user:
Write an audit plan using superpowers:writing-plans. The plan should have one task per file or module, each with:
Execute the plan using superpowers:executing-plans or superpowers:subagent-driven-development depending on scope. For each file:
superpowers:systematic-debugging to investigate before proposing changesVerify findings using superpowers:verification-before-completion before claiming the audit is done. Evidence means: every flagged item has a file path, line number, and specific recommendation.
| Signal | Action |
|---|---|
| Function doing 2+ unrelated things | Suggest extraction with proposed boundary |
| Import used once in one file but defined far away | Question if placement is right |
| Try/catch wrapping code that cannot fail | Flag as unnecessary defensive code |
| Comments restating what code does | Flag as AI slop candidate |
| Excessive null checks on internal data | Flag as over-defensive |
| UI component fetching/transforming data directly | Suggest data layer separation |
| Duplicated logic across 3+ files | Suggest shared utility |