skills/systematic-code-review/SKILL.md
4-phase code review: UNDERSTAND, VERIFY, ASSESS risks, DOCUMENT findings.
npx skillsauth add notque/claude-code-toolkit systematic-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
Security scan pending...
This skill is queued for security scanning. Results will appear when the scan completes.
Systematic 4-phase code review: UNDERSTAND changes, VERIFY claims against actual behavior, ASSESS security/performance/architecture risks, DOCUMENT findings with severity classification. Each phase has an explicit gate that must pass before proceeding because skipping phases causes missed context, incorrect conclusions, and incomplete risk assessment.
| Signal | Load These Files | Why |
|---|---|---|
| implementation patterns | go-review-patterns.md | Loads detailed guidance from go-review-patterns.md. |
| tasks related to this reference | receiving-feedback.md | Loads detailed guidance from receiving-feedback.md. |
| tasks related to this reference | severity-classification.md | Loads detailed guidance from severity-classification.md. |
Goal: Map all changes and their relationships before forming any opinions.
Step 1: Read CLAUDE.md
Step 2: Read every changed file
Step 3: Identify dependencies
Step 3a: Caller Tracing (mandatory when diff modifies function signatures, parameter semantics, or introduces sentinel/special values)
When the change modifies how a function/method is called or what parameters mean:
.GetEvents( not just GetEvents) across the entire repo. For Go repos, prefer gopls go_symbol_references via ToolSearch("gopls") — it's type-aware and catches interface implementations.r.FormValue, r.URL.Query): user-controlled — ANY string including sentinel values like "*""*" meaning "all/unfiltered") that bypass security filtering.This step catches:
Step 4: Document scope
PHASE 1: UNDERSTAND
Changed Files:
- [file1.ext]: [+N/-M lines] [brief description of change]
- [file2.ext]: [+N/-M lines] [brief description of change]
Change Type: [feature | bugfix | refactor | config | docs]
Scope Assessment:
- Primary: [what's directly changed]
- Secondary: [what's affected by the change]
- Dependencies: [external systems/files impacted]
Caller Tracing (if signature/parameter semantics changed):
- [function/method]: [N] callers found
- [caller1:line] — parameter validated: [yes/no]
- [caller2:line] — parameter validated: [yes/no]
- Unvalidated paths: [list or "none"]
Questions for Author:
- [Any unclear aspects that need clarification]
Gate: All changed files read (not just some — reading 2 of 5 files and saying "I get the gist" fails this gate), scope fully mapped, callers traced (if applicable). Proceed only when gate passes.
Opus 4.7 override: Opus 4.7 trades tool calls for reasoning by default. In verification, that default is wrong. Run the command. Do not reason about whether the command would pass. Do not summarize the expected output. Execute the check, paste the exit code, paste the relevant output. A verification phase that produces a verdict without an observed tool result is not a verification — it is a guess with a rigor aesthetic.
Goal: Validate all assertions in code, comments, and PR description against actual behavior.
Step 1: Run tests
Step 2: Verify claims
Step 3: Document verification
PHASE 2: VERIFY
Claims Verification:
Claim: "[Quote from comment or PR description]"
Verification: [How verified - test run, code trace, etc.]
Result: VALID | INVALID | NEEDS-DISCUSSION
Test Execution:
$ [test command]
Result: [PASS/FAIL with summary]
Behavior Verification:
- Expected: [what change claims to do]
- Actual: [what code actually does]
- Match: YES | NO | PARTIAL
Gate: All assertions in code/comments verified against actual behavior. Tests executed with output captured. Proceed only when gate passes.
Goal: Evaluate security, performance, and architectural risks specific to these changes.
Step 1: Security assessment
Step 2: Performance assessment
Step 3: Architectural assessment
Step 4: Extraction severity escalation
Step 5: Document assessment
PHASE 3: ASSESS
Security Assessment:
SQL Injection: [N/A | CHECKED - how verified | ISSUE - details]
XSS: [N/A | CHECKED - how verified | ISSUE - details]
Input Validation: [N/A | CHECKED - how verified | ISSUE - details]
Auth: [N/A | CHECKED - how verified | ISSUE - details]
Secrets: [N/A | CHECKED - how verified | ISSUE - details]
Findings: [specific issues or "No security issues found"]
Performance Assessment:
Findings: [specific issues or "No performance issues found"]
Architectural Assessment:
Findings: [specific issues or "Architecturally sound"]
Risk Level: LOW | MEDIUM | HIGH | CRITICAL
Gate: Security, performance, and architectural risks explicitly evaluated (not skipped or hand-waved). Proceed only when gate passes.
Goal: Produce structured review output with clear verdict and rationale.
Report facts without self-congratulation. Show command output rather than describing it. Be concise but informative because the review consumer needs actionable findings, not commentary.
Only flag issues within the scope of the changed code because suggesting features outside PR scope is over-engineering — but DO flag all issues IN the changed code even if fixing them requires touching other files. No speculative improvements.
When classifying severity, use the Severity Classification Rules below and classify UP when in doubt because it is better to require a fix and have the author push back than to let a real issue slip through as "optional."
PHASE 4: DOCUMENT
Review Summary:
Files Reviewed: [N]
Lines Changed: [+X/-Y]
Test Status: [PASS/FAIL/SKIPPED]
Risk Level: [LOW/MEDIUM/HIGH/CRITICAL]
Findings (use Severity Classification Rules - when in doubt, classify UP):
BLOCKING (cannot merge - security/correctness/reliability):
1. [Issue with file:line reference and category from rules]
SHOULD FIX (fix unless urgent - patterns/tests/debugging):
1. [Issue with file:line reference and category from rules]
SUGGESTIONS (author's choice - purely stylistic):
1. [Suggestion with benefit - only if genuinely optional]
POSITIVE NOTES:
1. [Good practice observed]
Verdict: APPROVE | REQUEST-CHANGES | NEEDS-DISCUSSION
Rationale: [1-2 sentences explaining verdict]
After producing the review, remove any temporary analysis files, notes, or debug outputs created during review because only the final review document should persist.
Gate: Structured review output with clear verdict. Review is complete.
When conflicting information exists, trust in this order:
Three tiers: BLOCKING (cannot merge — security, correctness, reliability), SHOULD FIX (fix unless urgent — patterns, tests, debugging), SUGGESTIONS (genuinely optional — style, naming, micro-optimizations). When in doubt, classify UP.
See references/severity-classification.md for full classification tables, the decision tree, and common misclassification examples.
Watch for patterns that linters miss: type export design, concurrency patterns (batch+callback, loop variable capture, commit callbacks), resource management (defer placement, connection pool reuse), metrics pre-initialization, testing deduplication, and unnecessary function extraction.
For projects using shared organization libraries: check for manual SQL row iteration instead of helpers, incorrect assertion depth, raw sql.Open() in tests, dead migration files, and database-specific naming violations.
See references/go-review-patterns.md for full checklists and red flags.
When receiving feedback: read completely, restate requirement to confirm understanding, verify against codebase, evaluate technical soundness, respond with reasoning or just fix it. Never performative agreement. Apply YAGNI check before implementing "proper" features. Stop and clarify before implementing anything unclear — items may be related.
See references/receiving-feedback.md for the full reception pattern, pushback examples, implementation order, and external vs internal reviewer handling.
Cause: Missing context about the change or its purpose Solution:
Cause: Tests fail during Phase 2 verification Solution:
Cause: Cannot determine severity of an issue Solution:
User says: "Review this PR" Actions:
User says: "Check this before we merge" Actions:
data-ai
Extract video transcripts: yt-dlp subtitles to clean paragraphs.
tools
Collect, filter, and freshness-qualify news items.
development
Convert PDF, Office, HTML, data, media, ZIP to Markdown.
testing
Verify factual claims against sources before publish.