Comprehensive codebase sweep that dispatches parallel detective agents to audit and fix issues across code, documentation, UI, infrastructure, tools, presets, brand alignment, and creative depth. Invoke this skill when the user says 'sweep', 'clean up', 'polish', 'audit', 'deep clean', 'tighten up', 'review everything', 'make it rock solid', or wants a periodic quality pass across the whole project. Also use proactively after completing a major feature, before releases, or when work feels stale. Can target specific areas (e.g., `/sweep docs`) or run the full sweep (default). Can be scheduled with `/loop` (e.g., `/loop 24h /sweep`).
BertCalm0 starsMar 14, 2026
Occupation
Categories
Knowledge Base
Skill Content
Deploy a team of parallel investigator agents to audit every surface of the project, fix what's safe to fix, and flag what needs human judgment.
Arguments
area: (optional) Target a specific sweep area instead of running all. One of: code, docs, ui, infra, presets, brand, creative, alignment. Default: all areas.
mode: (optional) fix (default) — auto-fix safe issues and flag risky ones. report — produce findings report without making changes.
focus: (optional) Free-text focus hint, e.g., "engine counts" or "stale parameter references". Narrows the sweep within the selected area(s).
How It Works
Phase 1: Reconnaissance
Before dispatching detectives, understand the project:
Read CLAUDE.md (and any nested CLAUDE.md files) to understand the project's identity, rules, conventions, and architecture
Related Skills
Scan repo structure — ls key directories to understand what exists (source, docs, UI, tools, presets, tests, config)
Check git status — understand what's changed recently, what branch you're on, any uncommitted work
Read recent commits (last 10-20) to understand the trajectory of recent work
This gives each detective the context they need. Compress the findings into a brief project profile that gets passed to every agent.
Phase 2: Dispatch Detectives
Launch detective agents in parallel using the Agent tool. Each detective is an Explore-type or general-purpose agent given a specific brief. Launch as many as applicable in a single message for maximum parallelism.
The detectives don't make changes — they investigate and report findings. All fixing happens in Phase 3.
Detective Briefs
1. CODE DETECTIVE (code)
Search the codebase for:
Dead code: unused functions, unreachable branches, commented-out blocks
TODO/FIXME comments — catalog them with file:line and assess if they're stale or active
Safety issues: unchecked inputs at system boundaries, potential crashes
Convention violations: patterns that break the project's stated rules (from CLAUDE.md)
Duplicated logic that could be consolidated
Output: List of findings, each with file:line, severity (low/medium/high), and suggested fix.
2. DOC DETECTIVE (docs)
Audit all documentation for:
Stale numbers: counts, statistics, version numbers that may have drifted from reality. Cross-reference prose claims against actual file counts, directory listings, and source code.
Identity drift: features or descriptions that contradict the project's stated character
Output: List of findings with specific text and suggested correction.
7. CREATIVE DETECTIVE (creative)
Evaluate the depth and quality of creative content:
Sound design / domain guides: are they deep enough? Do they provide actionable specifics (parameter values, sweet spots, recipes) or just surface descriptions?
Lore and mythology: is the creative world consistent? Are there unexplored connections or contradictions?
Historical grounding: does the project reference real domain history (synth history, music theory, art movements, etc.) where appropriate?
Coupling / interaction design: are creative combinations documented? Are pairing suggestions inspired or generic?
Output: Specific suggestions for deepening content, with locations and examples.
Naming changes that might affect external interfaces
Anything where two documents disagree and you're not sure which is correct
Both modes: Present these clearly with the trade-off or question.
No Action Needed
Things the detectives checked that are fine. Mention briefly so the user knows the area was audited.
Phase 4: Report
Present a summary organized by severity:
## Sweep Report — [Project Name]
### Fixed (N items)
- [file:line] What was wrong → What it is now
### Needs Your Call (N items)
- [file:line] The situation + options
### All Clear
- Areas that passed inspection
Keep it concise. The user should be able to scan the report in under 2 minutes.
After major milestones (new feature, new engine, release prep), run a full sweep manually.
Tips for Good Sweeps
The more complete your CLAUDE.md, the smarter the detectives are. Project rules, naming conventions, architecture decisions — all of this informs what "correct" means.
A targeted sweep (/sweep docs) is faster and cheaper than a full sweep. Use it when you know where the entropy is.
report mode is useful when you want to review before any changes touch the codebase.
After a sweep fixes things, consider a quick /sweep alignment to make sure the fixes didn't introduce new inconsistencies.