Audit Code
by @swader
Run a two-pass, multidisciplinary code audit led by a tie-breaker lead, combining security, performance, UX, DX, and edge-case analysis into one prioritized report with concrete fixes. Use when the user asks to audit code, perform a deep review, stress-test a codebase, or produce a risk-ranked remediation plan across backend, frontend, APIs, infra scripts, and product flows.
clawhub install agent-skills-auditπ About This Skill
name: audit-code description: Run a two-pass, multidisciplinary code audit led by a tie-breaker lead, combining security, performance, UX, DX, and edge-case analysis into one prioritized report with concrete fixes. Use when the user asks to audit code, perform a deep review, stress-test a codebase, or produce a risk-ranked remediation plan across backend, frontend, APIs, infra scripts, and product flows.
Audit Code
Overview
Run an expert-panel audit with strict sequencing and one unified output document. Produce findings first, sorted by severity, with file references, exploit/perf/flow impact, and actionable fixes.
Load references/audit-framework.md before starting the analysis.
Required Inputs
Collect or infer the following:
If product context is missing, state assumptions explicitly and continue.
Team Roles
Use exactly these roles:
The tie-breaker lead resolves conflicts, prioritizes issues, and produces the final single report.
Workflow
Follow this sequence every time:
1. Build Context Read code + product flows. Identify assets, entry points, high-risk operations, privileged actions, external dependencies, and "failure hurts" journeys.
2. Build Invariant Coverage Matrix Before specialist pass 1, map critical invariants to every mutating path (HTTP routes, webhooks, async jobs, scripts):
3. Pass 1 Specialist Reviews Run role-specific analysis in this order:
references/audit-framework.md.4. Tie-Breaker Reconciliation Resolve disagreements:
5. Cross-Review Pass 2 After edge-case findings, rerun specialists:
6. Final Report Publish one document from the tie-breaker lead with:
Quality Bar
Enforce these requirements:
Safety and Policy Guardrails
Apply these guardrails while auditing:
Output Format
Follow this response structure:
1. Findings
List only validated issues. Use the finding schema in references/audit-framework.md.
2. Open Questions / Assumptions State missing context that could change priority or validity.
3. Change Summary Summarize high-impact remediation themes in a few lines.
4. Suggested Verification List focused tests/checks to confirm each major fix.
Runtime Heuristics
When the target stack is Bun + SQLite, apply the runtime-specific checklist in references/audit-framework.md (Runtime-Specific Heuristics (Bun + SQLite)) before finalizing findings.