Perform a full codebase review, categorize findings by severity, file GitHub issues, then fix each issue in an isolated git worktree and submit PRs. Use this skill when the user asks to audit the codebase, do a comprehensive code review, find and fix security/quality/reliability issues, or run a proactive health check across the entire repository.
Perform a full codebase review, categorize findings by severity, file GitHub issues, then fix each issue in an isolated git worktree and submit PRs. Use this skill when the user asks to audit the codebase, do a comprehensive code review, find and fix security/quality/reliability issues, or run a proactive health check across the entire repository.
Perform a full codebase review, categorize findings by severity, file GitHub issues, then fix each issue in an isolated git worktree and submit PRs. Use this skill when the user asks to audit the codebase, do a comprehensive code review, find and fix security/quality/reliability issues, or run a proactive health check across the entire repository.
alwaysApply
false
Codebase Audit → Issue → Worktree Fix → PR
End-to-end workflow: systematically review the entire codebase, report findings as GitHub issues, fix each issue in an isolated git worktree, and submit PRs — all in one session.
When to use this skill
Use this skill when you need to:
Perform a full code review / audit of the codebase
Proactively find security vulnerabilities, logic bugs, or code quality problems
Turn code review findings into tracked GitHub issues
Fix each issue in isolation (worktree per issue) and submit PRs
Run a periodic codebase health check with automated follow-through
API design: inconsistent validation, missing required field checks
Record every finding with: file path, line number(s), category, severity (Critical/High/Medium/Low), description, and suggested fix.
Dependency scan: Read references/dependency-audit.md and run the Dependabot alert fetch + npm audit to discover vulnerable dependencies. Record each finding using the dependency-audit format.
Phase 2 — Analyze & Classify
Read references/classification.md for severity definitions and grouping rules.
Deduplicate findings — merge instances of the same pattern across files.
Group findings into fix batches — related issues that should be fixed together in one PR.
Assign severity and priority:
P0 (Critical): Security vulnerabilities, data loss risks
P1 (High): Logic bugs, error handling gaps that cause runtime failures
P2 (Medium): Type safety, code quality issues affecting maintainability
P3 (Low): Style, naming, minor cleanup
Present a structured audit report to the user and wait for confirmation before proceeding.
Phase 3 — Create GitHub Issues
Read references/issue-workflow.md for issue creation guidelines.
For each fix batch (or individual Critical finding), create a GitHub issue:
b. Work inside the worktree — never in the main checkout.
c. Implement the fix, keeping changes minimal and focused.
d. Verify locally: cd mcp && npm run build && npm run test
e. Commit with conventional-changelog format:
cd <original-dir>
git worktree remove ../<repo>-audit-fix-<issue-number>
One worktree per issue. Never mix fixes across worktrees.
Dependency fixes: For dependency vulnerability batches, follow references/dependency-audit.md Step 4. These can be grouped into a single PR since they modify package.json / package-lock.json.
Phase 5 — Verify & Report
Read references/verification.md for the verification checklist.
Check CI status for each PR:
gh pr checks <number>
If CI fails, re-enter the worktree, fix, and push again.
Generate a final audit report summarizing:
Total findings by category and severity
Issues created (with links)
PRs submitted (with links)
Remaining items that need human decision
Routing
Task
Read
What to review and how to check each category
references/review-strategy.md
Security severity classification (TSRC-style)
references/security-severity-checklist.md
How to classify, deduplicate, and batch findings
references/classification.md
How to create well-structured GitHub issues
references/issue-workflow.md
How to create worktrees and fix issues in isolation
references/worktree-fix.md
How to verify fixes and generate the final report
references/verification.md
How to audit and fix dependency vulnerabilities
references/dependency-audit.md
Git safety rules
Never force-push unless explicitly asked.
Never amend commits that are already pushed.
Always work inside the worktree, not the main checkout.
Always verify build + test locally before pushing.
One worktree per issue — never mix fixes.
Clean up worktrees after PR creation.
Commit conventions
Follow the project's conventional-changelog format: