| name | code-review |
| description | Use when reviewing diffs before PR/review/merge. Produces a systematic review (correctness, patterns, tests, security, contracts) and a short fix list. Review-only: do not change code unless asked. |
Code Review
Purpose
Perform a systematic code review of the current changeset and report actionable findings. By default this is review-only: do not modify code unless explicitly requested.
When to use
Apply this skill:
- After implementing changes, before opening a PR / requesting review / merging
- When explicitly asked to review code
- As the "validation" step at the end of a task
Scope: Identify the current 'staged' changes or the diff between the current branch and the main branch before reviewing.
Priority: If the changeset is large, prioritize Global Standards and Architecture findings first.
Review mode
- Review-only by default: identify issues and propose fixes; stop for confirmation before making changes.
- Cite evidence: For every finding, provide the line number and a snippet of the code in question.
- Prefer project commands from
@docs/agent-standards/commands.md (if present); otherwise suggest likely commands and ask before adding/updating commands.md.
Output format
Return results in this structure:
-
Verdict: PASS / NEEDS_CHANGES
-
Top risks (0–3 bullets)
-
Findings
- Blockers (must fix) - Security, blocking calls, missing audit
- Warnings (should fix) - Pattern violations, missing tests
- Nits (optional) - Style, naming, comments
-
Recommended validation commands (reference commands.md if available)
-
Next steps (Task List)
Note: I can execute these tasks for you one by one if you say 'Proceed with Step X'.
Review checklist
1. Global Standards (Apply to ALL changes)
Security & Compliance:
Diff Integrity:
Code Quality:
2. Architecture & Patterns (The "How")
Layering:
Reactive Integrity (CRITICAL):
Audit Trail (MANDATORY for C/U/D):
Pattern Adherence:
3. Data & API Contracts (The "Mechanics")
API Contracts:
Data & Persistence:
4. Testing & Validation (The "Proof")
Test Coverage:
Implementation Parity:
Validation Commands:
Documentation & Traceability:
Self-review prompts (quick)
- Pattern adherence: what existing pattern was followed, where is it?
- Search-first: what similar implementations were inspected?
- Risk: what could break, and which edge cases exist?
- Reviewability: is the diff focused?
- Completeness: does it satisfy acceptance criteria?
- Testing: do tests verify behaviour (not just exercise code)?
Common issues to catch
Architectural:
- Audit logging implemented in Resource instead of Service layer
- Business logic in Resource layer
- Blocking calls in reactive paths (
blockingGet())
Data:
- Wide queries + in-code filtering instead of scoped queries
- Missing Mongo/JDBC parity where required
- Repository changes without checking both
mongo/ and jdbc/ directories
API:
- Missing SDK regeneration after API changes
- Breaking changes without migration documentation
Testing:
- Tests that don't verify audit events were emitted
- Only testing one storage implementation (Mongo or JDBC, not both)
Code Quality (Agent-isms):
- Redundant null checks when using
Optional or @NotNull
- Log pollution: logging entire DTOs/entities instead of IDs
- Unrelated refactors mixed into feature changes
- Commented-out code or debug statements left behind
References (optional)
@docs/agent-standards/commands.md
@docs/agent-standards/templates/openapi_change_checklist.template.md
@docs/agent-standards/templates/migration_checklist.template.md
Exit criteria
- Verdict issued with evidence (line numbers and snippets)
- Findings prioritized by severity (Blockers > Warnings > Nits)
- Actionable task list provided
- Suggested validation commands included
- No code changes made unless explicitly requested