| name | deep-audit |
| description | Comprehensive codebase or system audit. Use when asked to "audit the codebase", "review everything", "find all issues", "security audit", "performance audit", "code quality review", or "find tech debt". Produces a structured report with findings prioritized by severity.
|
Deep Audit Skill
Purpose
A systematic, thorough review of a codebase, system, or artifact. Not a quick scan - a deep investigation that surfaces issues a casual review would miss.
Step 1: Define audit scope
Clarify:
- What is being audited? (codebase, API, database, infrastructure, specific module)
- What type of audit? (security, performance, code quality, UX, all)
- What is the output? (prioritized issue list, report, PR with fixes)
Step 2: Gather context
find . -type f -name "*.ts" | head -50
ls -la
cat CLAUDE.md README.md package.json
git log --oneline -20
gh issue list --limit 20
Step 3: Run automated checks
Code quality
npx tsc --noEmit
npm run lint
npm test -- --coverage
Security
npm audit
grep -r "password\|secret\|api_key\|token" --include="*.ts" --include="*.js" . | grep -v ".test." | grep -v "node_modules"
Dependencies
npm outdated
npx depcheck
Step 4: Manual review
Security checklist
Code quality checklist
Performance checklist
Maintainability checklist
Step 5: Prioritize findings
For each finding:
| Severity | Description |
|---|
| P0 (Critical) | Security vulnerability, data loss risk, production outage risk |
| P1 (High) | Significant bug, major performance issue, important missing feature |
| P2 (Medium) | Code quality issue, minor bug, missing test coverage |
| P3 (Low) | Style issues, minor improvements, nice-to-haves |
Step 6: Output format
DEEP AUDIT REPORT
Scope: [what was audited]
Date: [today]
SUMMARY
Files reviewed: N
Issues found: N (P0: X, P1: X, P2: X, P3: X)
P0 - CRITICAL
1. [Issue title]
File: [path]
Description: [what the problem is]
Impact: [what can go wrong]
Fix: [how to fix it]
P1 - HIGH
1. [Issue title]
...
P2 - MEDIUM
...
P3 - LOW
...
RECOMMENDED NEXT STEPS
1. [Most important action]
2. [Second most important action]