codebase-sweep
Installation
SKILL.md
Codebase Sweep
Dispatch up to 8 subagents to audit and clean the codebase. Each subagent must: (1) research its domain, (2) write a critical assessment with findings, (3) implement all high-confidence fixes.
Pre-flight
- Detect project language(s) from config files (package.json, tsconfig.json, Cargo.toml, pyproject.toml, go.mod, etc.).
- Based on detected languages, determine which subagents apply (see language applicability below).
- Identify the test runner and verify tests pass before starting. Abort if tests are already broken.
- Create a working branch:
cleanup/<YYYY-MM-DD>. - Exclude generated files,
node_modules,dist,vendor, lock files, and any paths listed in.gitignore.
Subagents
Each subagent is spawned using the Agent tool with mode: "auto". Give each subagent a clear prompt including: the task description below, the project root path, detected language(s), and a reminder to commit its own changes with the prefix cleanup(<task>):.