audit-and-fix
Skill1 starsChanged 7 months agoMITView on GitHub
Use when starting a comprehensive codebase audit, after major feature additions, before releases, or when multiple bugs suggest systemic issues — explores 75 dimensions across 7 rounds then fixes in parallel phases with Opus reviews
3 other projects use a version of this.
Adopted by
Most recently taken up by
- XuHo-IT/Content-Agent-Kittheir own version, first seen Nov 8, 2026
- WhatIfWeDigDeeper/claude-code-courseratheir own version, first seen Oct 20, 2026
- kaiohenricunha/dotbabeltheir own version, first seen Oct 17, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- XuHo-IT/Content-Agent-Kit★ 3same name
- WhatIfWeDigDeeper/claude-code-coursera★ 1same name
- kaiohenricunha/dotbabel★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 6 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Quick scan: Run /audit-and-fix --preset quick — explores Round 1 (Code) + Round 4 (Architecture) only.
- Distinctive: line 30
Review findings: Read the consolidated report.
- Very specific: line 32
Full audit: When ready, run /audit-and-fix --preset full for all 75 dimensions.
- Distinctive: line 39
After major feature additions (milestone releases)
- Distinctive: line 41
Before production deployment of new strategies
- Very specific: line 75
Codebase Map (incremental mode): If artifacts/audit-memory/codebase-map.json exists from a previous audit, Explorer agents receive per-file …
- Very specific: line 77
IMPORTANT: Keep exactly one agent blocking (not run_in_background) to prevent idle sessions.
- Distinctive: line 95
Before fixing, verify the top findings are REAL:
- Very specific: line 106
FALSE POSITIVE: Not a bug (add to false-positives.json)
- Distinctive: line 108
Only CONFIRMED findings proceed to Fix Phases
- Distinctive: line 121
After all phases pass gates: full test suite -> final Opus review -> version bump -> push.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit and Fix
Overview
Multi-round, multi-agent codebase audit across 75 dimensions in 7 rounds, followed by parallel fix phases with Opus reviews and /simplify after each phase.
Core principle: Explore first, fix second. Never fix without understanding the full scope.
Installation (once per machine)
# Mac:
bash scripts/install_skill.sh
# Windows (PowerShell):
powershell -File scripts\install_skill.ps1Copies the skill to ~/.claude/skills/audit-and-fix/. Re-run after skill updates (or after git pull).
Audit memory (artifacts/audit-memory/*.json) syncs automatically via Git — no extra setup.
Quick Start (5 minutes to first results)
- Quick scan: Run
/audit-and-fix --preset quick— explores Round 1 (Code) + Round 4 (Architecture) only. ~2 hours. - Review findings: Read the consolidated report. Focus on CRITICAL items first.
- Fix phase: Skill guides you through parallel fix agents + Opus review + /simplify.
- Full audit: When ready, run
/audit-and-fix --preset fullfor all 75 dimensions.
First time? The skill auto-detects your project (see auto-detect.md) and skips irrelevant dimensions.
When to Use
Use when:
- After major feature additions (milestone releases)
- Multiple unrelated bugs suggest systemic issues
- Before production deployment of new strategies
- Quarterly codebase health check
- Post-incident to find related vulnerabilities
Don't use when:
- Single known bug (use
systematic-debugging) - Code review of a PR (use
requesting-code-review) - Simple cleanup (use
/simplifydirectly) - Performance-only issues (use profiling tools)
The Process
Exploration → Consolidation → **Verification** → Fix Phases → Version BumpExploration (7 Rounds)
"Round" = exploration sweep, "Phase" = fix batch, "Step" = gate action.
Launch parallel Explorer agents per round. Each agent gets one dimension with search commands from exploration-dimensions.md.
| Round | Focus | Dims |
| 1 | Code-Level Bugs (dict-mutation, memory, threads, NaN, ...) | 8 |
| 2 | System-Level (data integrity, security, imports, tests, ...) | 12 |
| 3 | Domain-Specific (look-ahead bias, drift, cost-model, ...) | 9 |
| 4 | Architecture (cascading chains, complexity, API stability, OOP, ...) | 9 |
| 5 | Environment & Platform (paths, WSL2, datetime, closures, ...) | 12 |
| 6 | Security Deep Dive (auth, secrets, injection, supply chain, ...) | 13 |
| 7 | Token & API Cost Efficiency (prompt size, model routing, caching, streaming, compression, ...) | 12 |
DEFAULT: Mega-Parallel Dispatch. Launch ALL independent rounds (1,2,3,5,6,7) in a single batch using run_in_background: true. This is ~60 minutes faster than sequential dispatch. Round 4 starts when Rounds 1-3 complete (needs their findings).
Codebase Map (incremental mode): If artifacts/audit-memory/codebase-map.json exists from a previous audit, Explorer agents receive per-file context: known hot-spots, previous findings, and historically-matched dimensions. This improves focus and reduces false positives. See codebase-map.md.
IMPORTANT: Keep exactly one agent blocking (not run_in_background) to prevent idle sessions. See agent-prompts.md "Dispatch Pattern" for details.
Exploration → One batch (Rounds 1,2,3,5,6,7) → Wait for all → Round 4 → ConsolidationLarge Dimension Splitting: Dimensions with >15 checks should be split into sub-agents:
- Each sub-agent gets ONE technology/category from the dimension
- Example: Dim 2.10 (Data Store Safety, 40 checks) → 6 sub-agents (SQLite, PostgreSQL, DuckDB, Redis, Parquet, MinIO)
- Each sub-agent is more focused → better findings, fewer false positives
- Sub-agents run in parallel (different technologies = no file overlap)
Consolidation
Produce a single prioritized report (report-templates.md): P0 (capital/data, fix this week), P1 (stability, next week), P2 (quality, this month). Group P0+P1 into fix phases with no file overlap.
Verification (2nd-Eye Check)
Before fixing, verify the top findings are REAL:
- Scale to finding count:
- ≤ 8 P0+P1 findings → 1 agent handles all
- 9–20 findings → 2 agents, split by dimension category (see below)
- 20+ findings → 3 agents, split by category
- Category split for 2 agents:
- Agent 1: Dims 1.x (Code) + 2.x (System) — implementation bugs
- Agent 2: Dims 3.x (Domain) + 4.x (Architecture) + 5.x (Platform) + 6.x (Security) — higher-context findings
- Each agent READS the actual code (not just grep output) and confirms:
- CONFIRMED: Bug exists, reproducer possible
- FALSE POSITIVE: Not a bug (add to
false-positives.json) - NEEDS CONTEXT: Can't determine without domain knowledge (escalate to user)
- Only CONFIRMED findings proceed to Fix Phases
- FALSE POSITIVES are removed from the roadmap immediately
Why: Exploration uses grep — fast but imprecise. Verification reads code — slower but catches false positives. Without this step, ~20-30% of fix agent time is wasted on non-bugs. Category-splitting prevents both agents reading the same large files.
Fix Phases (A, B, C, D)
Each phase follows gate-pattern.md: Agents (parallel, worktrees) -> Merge -> Tests -> Opus Review -> Fix -> /simplify -> Next Phase. For dependency graphs and parallelization rules, see reference.md.
Fix phases with zero file overlap can run in parallel. See reference.md "Overlapping Fix Phases".
Version Bump
After all phases pass gates: full test suite -> final Opus review -> version bump -> push.
Quick Reference
| Phase | Agents | Duration |
| Rounds 1-3, 5-7 (parallel) | 4-5 each | ~30min-1h each |
| Round 4 (Architecture, sequential) | 3 | ~30min |
| Consolidation | 1 | ~15min |
| Fix Phases A-D | 3-4 worktree each | ~1-2h each |
Total: ~20-30 agents, ~6-8 hours, 75 dimensions, 3+ Opus reviews, 3+ /simplify runs
Presets
--preset quick: Round 1 (Code) + Round 4 (Architecture) only. ~2 hours.--preset full: All 75 dimensions, all 7 rounds. ~6-8 hours.--preset platform: Round 5 only. ~30 min, cross-platform + WSL2 + Python gotchas.--preset security-deep: Round 6 only. ~1-2 hours, comprehensive security audit with tool integration (bandit, pip-audit, detect-secrets).--preset token: Round 7 only. ~30 min, LLM API cost optimization.
Common Mistakes
- Fixing during exploration — Rounds are READ-ONLY. Full picture first, fix second.
- File overlap in parallel agents — Two agents on same file = merge conflicts. Check overlap matrix.
- Skipping Opus review — Tests miss design flaws and race conditions. Review catches what tests miss.
- Skipping /simplify — Review fixes introduce their own code smells. /simplify is final polish.
- Treating all findings equally — P0 (account blowup) before P1 before P2. Always.
Supporting Files
| File | Purpose |
exploration-dimensions.md | Index of all 75 dimensions (links to round files) |
dimensions/round1-*.md .. round7-*.md | Per-round dimensions with search commands |
token-optimization-guide.md | Token budget calculator + cost reduction strategies |
gate-pattern.md | Gate sequence: merge -> test -> review -> simplify |
report-templates.md | Templates for exploration, consolidation, reviews |
progress-template.md | Live progress dashboard |
agent-prompts.md | Copy-paste prompts for all agent types |
auto-detect.md | Skip-logic for irrelevant dimensions |
audit-memory.md | Persistent learning system (schemas, sync) |
codebase-map.md | Per-file dimension memory for incremental scanning and risk-based prioritization |
reference.md | Parallelization strategies (6), benchmarks, dependency graphs, regression watch, tuning |
ollama-integration.md | Optional Ollama usage for post-audit summary and handoff compression |
Related Skills
systematic-debugging— Single bug root-cause investigationdispatching-parallel-agents— Core parallel execution patternrequesting-code-review— Opus review patternsimplify— Code cleanup after changesverification-before-completion— Test-before-claim pattern
Real-World Impact
Production Python system (120K LOC): 14 exploration agents, 87 bugs + 5 cascading chains + 8 design flaws found, 22 CRITICAL. 12 fix agents across 4 phases, 3 Opus reviews caught 5 additional issues. All 119+ tests green. ~8 hours total.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

