Reviews code for quality, best practices, security, and design alignment. Used by the Orchestrator after the Coder completes implementation tasks. Provides actionable feedback.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Review code for quality, best practices, security, and design alignment. This skill is used by the Orchestrator to verify that implementation meets standards before proceeding to the next task.
Purpose: Ensure code is clean, secure, maintainable, and aligned with the design.
Input:
.workflow/NNN-feature-slug/design.md for alignment verification.workflow/NNN-feature-slug/codebase.md for pattern consistencyOutput:
Announce at start: "I'm using the code-reviewer skill to review the implementation."
Verify the implementation matches the design:
Questions to ask:
Verify the code is clean and maintainable:
Questions to ask:
Verify the code follows existing codebase patterns:
Questions to ask:
Check for common security issues:
Questions to ask:
Check for obvious performance issues:
Questions to ask:
Verify errors are handled appropriately:
Questions to ask:
Get an overview of the changes:
Verify alignment with design.md:
For each file:
Check concerns that span files:
Deliver the review result.
## Code Review: APPROVED
**Task:** [Task name]
**Files reviewed:** [List]
### Summary
[1-2 sentences on the implementation]
### Highlights
- [Good pattern or decision worth noting]
- [Another positive]
### Minor Suggestions (optional, non-blocking)
- [Suggestion that could improve but doesn't block approval]
**Verdict:** Ready to proceed to next task.
## Code Review: CHANGES_REQUESTED
**Task:** [Task name]
**Files reviewed:** [List]
### Issues (must fix)
#### Issue 1: [Category] - [Brief description]
**Location:** `path/to/file.ts:15-20`
**Problem:**
[Description of the issue]
**Required change:**
[Specific instruction on what to change]
**Example:**
```typescript
// Before
[problematic code]
// After
[corrected code]
[Same structure]
[N] issues must be addressed before approval.
Verdict: Return to Coder for fixes.
## Issue Categories
Use these categories for consistency:
| Category | Examples |
|----------|----------|
| **SECURITY** | Hardcoded secrets, missing auth checks, injection vulnerabilities |
| **DESIGN** | Deviates from design.md, missing functionality, scope creep |
| **QUALITY** | Poor naming, duplicated code, unclear logic |
| **PATTERN** | Inconsistent with codebase patterns |
| **PERFORMANCE** | N+1 queries, blocking operations, unnecessary loops |
| **ERROR** | Missing error handling, swallowed exceptions |
## Key Principles
- **Be specific** - Line numbers, exact problems, exact fixes
- **Be actionable** - Every issue has a clear resolution path
- **Be fair** - Don't block on style preferences, focus on real issues
- **Be thorough** - Check all criteria, don't rush
- **Be consistent** - Same standards for all code
## Red Flags - Automatic CHANGES_REQUESTED
These issues always require changes:
- Hardcoded secrets or credentials
- Missing authentication/authorization checks
- SQL/command/XSS injection vulnerabilities
- Significant deviation from design.md
- Swallowed exceptions with no handling
- Missing error handling for external calls
- Code that doesn't compile/run
- Tests that don't actually test anything
## Anti-Patterns to Avoid
**Don't:**
- Block on personal style preferences
- Request changes for things not in design
- Add scope during review ("you should also add...")
- Give vague feedback ("this could be better")
- Skip security review for "simple" code
**Do:**
- Focus on objective quality criteria
- Reference design.md for alignment
- Give specific, actionable feedback
- Acknowledge good decisions
- Be respectful and constructive