A principal-engineer-grade repository audit, tuned for Claude's latest models running inside Claude Code.
It maps the repo, fans out parallel subagents (one per audit dimension, plus git-history mining for churn × complexity hotspots), adversarially verifies every Critical/High finding against the actual code before reporting it, runs the repo's own lint/type-check/test commands instead of guessing at health, and writes a single AUDIT.md containing:
- Executive Summary — health grade A–F, top 3 risks, top 3 opportunities
- Repo Map
- Severity-rated findings (file:line cited, facts separated from judgments)
- Improvement strategy — the 3–5 themes behind the findings, with measurable "done" signals
- A milestone-ordered task plan where each task is a self-contained brief a fresh agent session can execute, with runnable acceptance criteria
- Quick wins flagged separately
Read-only: it never modifies your code. The report is the only file it creates.
mkdir -p ~/.claude/commands
curl -fsSL https://gist.githubusercontent.com/OmerFarukOruc/753f95b1ac278b683be83ed26b3bcc1f/raw/repo-audit.md -o ~/.claude/commands/repo-audit.mdOpen a new Claude Code session and run /repo-audit.
mkdir -p .claude/commands
curl -fsSL https://gist.githubusercontent.com/OmerFarukOruc/753f95b1ac278b683be83ed26b3bcc1f/raw/repo-audit.md -o .claude/commands/repo-audit.mdCopy the contents of repo-audit.md from this gist into ~/.claude/commands/repo-audit.md. That's it — Claude Code picks up the file automatically.
/repo-audit
- Pass an optional focus:
/repo-audit securityor/repo-audit src/billing. - Run it in normal mode, not plan mode. The audit is read-only; plan mode inserts an approval stop that costs you nothing but waiting.
- For very large repos where you want maximum depth, opt into multi-agent orchestration explicitly:
/repo-audit use a workflow(or include the wordultracode). - The audit runs end to end without check-ins — it's read-only and safe to leave running.
- Output lands in
AUDIT.mdat the repo root, written for a reader who didn't watch the run.
This is a rework of the viral "Repo Audit & Improvement Plan" prompt, restructured around how current Claude models actually work best:
- Purpose over persona — states why the audit exists (the report becomes a work queue for future agent sessions) instead of role-playing a "world-class engineer".
- Orchestrated, not single-threaded — parallel subagents per dimension instead of one linear pass.
- Verified, not just cited — fresh-context subagents try to refute each Critical/High finding; what doesn't survive gets dropped or downgraded. Claims are checked against actual tool output (including really running the test suite) before they enter the report.
- History-aware — mines git history for bug-fix-dense, high-churn files instead of auditing a frozen snapshot.
- Agent-executable output — tasks have runnable pass/fail acceptance criteria, so you can hand each one straight to a new Claude Code session.
This is awesome! Repo audit is a good first pass for an agent verifying agent, we built a deterministic layer which sits between agent and tool calls for security checks in all vibe coding sessions. Nothing blocks users as everything is opt-in warn mode. immunity-agent is free and open source, would love some feedback and contribution