maintenance-code-cleanup-repolisted
Install: claude install-skill skowalskidev/dotclaude
# Repo cleanup
Cleanup is not a tidying pass. It is an audit that produces claims, a verification step that kills
most of them, and only then a set of edits. Skipping the middle step is how a cleanup deletes
something load-bearing and nobody notices for a month.
## The one rule that governs everything else
**A tool reports what nothing IMPORTS. That is not the same as what nothing NEEDS.**
Every finding is a hypothesis until you have personally grepped for it. This is not caution for its
own sake — on the run this skill was written from, the first pass flagged nine "unused" files, and
three of them were live entry points invoked by node, playwright and the Next runtime rather than by
an import. Deleting on the tool's word would have removed a migration script.
## Order of work — do not reorder
Config first, then measure, then audit, then verify, then fix. Each step's output is the next step's
input, and doing them out of order produces confident nonsense.
### 0. Fix the config that governs the cleanup, first
If the repo has its own agent instructions (`CLAUDE.md`, `.claude/rules/*.md`, `AGENTS.md`), those
are the yardstick you are about to measure the code against. Check the yardstick before using it:
does every path it names exist, does every count it states still hold, does every rule it states
match what the code does? A cleanup driven by a stale rule file enforces last quarter's conventions.
Same for `~/.claude` when the task touches it. `hooks/config-contract.te