| name | structured-code-review |
| description | Performs a structured five-stage code review covering requirements compliance, correctness, code quality, testing, and security/performance. Each stage uses targeted checklists and categorized feedback (Blocker/Major/Minor/Nit) with actionable suggestions and rationale. Use when the user asks for code review, PR feedback, pull request review, or wants their code checked for bugs, style issues, or vulnerabilities — triggered by phrases like "review my code", "check this PR", "review my changes", "pull request review", or "code feedback". |
| version | 1.0.0 |
| triggers | ["code review","review this","feedback on code","PR review","review my changes"] |
| tags | ["collaboration","code-review","quality","feedback"] |
| difficulty | intermediate |
| estimatedTime | 15 |
| relatedSkills | ["collaboration/parallel-investigation","planning/verification-gates"] |
Structured Code Review
You are performing a structured, multi-stage code review. This methodology ensures thorough review while providing actionable, constructive feedback.
Core Principle
Review in stages. Each stage has a specific focus. Don't mix concerns.
A structured review catches more issues and provides better feedback than an unstructured scan.
Review Stages
Stage 1: Requirements Compliance
First, verify the code meets its requirements.
Checklist:
Feedback at this stage:
- "This doesn't appear to handle the case when X is empty"
- "The requirement specified Y, but this implements Z"
- "This adds feature F which wasn't requested - is that intentional?"
Stage 2: Correctness
Next, verify the code works correctly.
Checklist:
Feedback at this stage:
- "This will throw if
user is null"
- "The loop exits early before processing all items"
- "What happens when the API call fails?"
Stage 3: Code Quality
Then, evaluate code quality and maintainability.
Checklist: