Audit Swarm
Comprehensive multi-agent code audit. Dispatches domain-specialized agents in parallel, writes findings to structured reports, and creates tickets for P0/P1 issues.
How It Works
- Audit a project: Full, weekly diff-aware, or all-projects code audit
- Preflight + init output: List changed/source files · seed code-audits/{project}/MASTER-SUMMARY.md
- Dispatch 4 domain agents
- Synthesize findings: Merge domain tables · sort P0→P1→P2 · update summary counts
- MASTER-SUMMARY + tickets: Findings with file:line · P0/P1 tickets created — surfaces, never auto-fixes
Invocation Triggers
/audit-swarmcode auditaudit swarmweekly auditaudit <project>Use Cases
- Weekly automated code audit across all your projects
- Pre-release security and quality gate
- Onboard a new codebase with a structured review
The Problem
Code rot is quiet. The N+1 query, the god module, the business logic bleeding into the view layer, the critical path with zero tests — none of them throw errors, so none of them get looked at until one becomes a 2am incident. A single reviewer sees one lens at a time and forgets the other three. You end up with a vague impression that the codebase is fine, and no file:line record anyone can act on.
What It Does
- 1Preflight the scope
List changed files since the last audit for weekly diff-aware mode (git diff HEAD~7), or enumerate all source files for a full audit. Weekly mode is the default — small audits beat large ones.
- 2Initialize the output
Create code-audits/<project>/ and seed MASTER-SUMMARY.md with a priority summary table and an empty findings table. Every finding will land here with a file:line reference, never a vague note.
- 3Dispatch four domain agents in parallel
Security, Architecture, Performance, and Testing agents (all sonnet, read-heavy) launch in a single message. Sequential dispatch defeats the entire purpose — they run simultaneously, each writing to its own domain file.
- 4Audit each domain independently
Security hunts injection, auth flaws, and hardcoded secrets. Architecture flags god objects, circular deps, and leaked business logic. Performance catches N+1s and missing pagination. Testing finds uncovered critical paths and mock-only tests. P0s get fixed; P1/P2 documented.
- 5Synthesize the master summary
Merge every domain's findings table, sort P0 to P2, and update the summary counts. P0 counts in the summary must match the actual P0 rows — a mismatch means aggregation was skipped. Architecture being clean never implies tests are.
- 6Ticket the P0s and P1s
Create a kanban card for each P0 and P1 finding so the work has a lifecycle, not just a note in a file. The findings become actionable, traceable, and ready for audit-swarm-resolve.
What You Get / What It Doesn't Do
- A populated MASTER-SUMMARY.md with every finding sorted by priority
- Four domain files (security, architecture, performance, testing), each non-empty
- Every finding pinned to a specific file:line reference
- P0 issues fixed inline; P1/P2 documented with remediation
- Kanban tickets created for every P0 and P1 finding
- Auto-fix P1/P2 findings — it surfaces them, audit-swarm-resolve fixes them
- Run a full coverage report — it counts tests, since full --cov OOMs on large repos
- Skip a domain because the project was audited recently — stale audits miss new code
- Suppress P2 findings to keep the summary short — that hides the debt that becomes P0 later
Tips
Weekly mode audits only changed files and is the default. Small recurring audits are far easier to act on than one giant full-repo sweep every quarter.
A vague finding makes audit-swarm-resolve impossible to execute. If a row has no specific file:line, it is not a finding yet — it is a hunch.
Each domain is independent. A clean architecture report says nothing about test coverage. Never write the master summary off a partial set of agents.
Get the Skill
Unlock the full Audit Swarm SKILL.md — drop it into ~/.claude/skills/ and trigger it by name.
- A populated MASTER-SUMMARY.md with every finding sorted by priority
- Four domain files (security, architecture, performance, testing), each non-empty
- Every finding pinned to a specific file:line reference
- P0 issues fixed inline; P1/P2 documented with remediation
Commonly Used With
29 more production skills ready to install.