codebase-cleanup

Installation
SKILL.md

Codebase cleanup — 8-pass refactor

Eight independent specialist passes over a codebase, each scoped to one quality concern. Designed to be run as 8 separate subagent sessions (or sequentially in one) so each pass gets a clean context window and can't be tempted to bleed into another's territory.

Every pass follows the same three-phase protocol — see reference/protocol.md. The recommended pass ordering and why is in reference/pass-ordering.md.

Apply codebase-design throughout: keep each capability together, expose complete operations, and extract only when the split hides complexity or enables useful reuse. Preserve configured line limits with documented, targeted exceptions. File count and net deleted lines are not goals.

When to use

  • "Clean up the codebase" / "do a tech-debt pass"
  • "Refactor for quality before we ship"
  • "Find and remove dead code / AI slop / weak types"
  • Onboarding a codebase and wanting to know what's actually load-bearing
  • Pre-1.0 / pre-release quality sweep
  • Periodic (quarterly) hygiene runs
Installs
67
First Seen
Aug 28, 2026
codebase-cleanup — darkmatter/skills