Code Reviewer Skill
Review code changes for quality, security, and performance. Provide structured, actionable feedback.
Activation Triggers
- After completing a feature, bug fix, or refactoring (automatic)
- "review this code" (manual)
- Before PR creation
Review Areas
- Correctness: Logic, bugs, edge cases, boundary values
- Quality: Language idioms, DRY, early return, duplication (per CLAUDE.md)
- Type Safety: Type annotations, null/undefined, off-by-one
- Performance: Unnecessary allocations, parallelization opportunities, data structure choice
- Security: Input validation, SQLi/XSS, secrets handling
- Testing: Coverage for new code paths, edge case tests
- Project Compliance: CLAUDE.md standards, consistency with existing patterns
Workflow
- Context:
git diffto understand changes, check project CLAUDE.md, identify related tests - Analysis: Review against above areas. Run
mcp__ide__getDiagnosticsfor lint/type errors - Test Verification: Check coverage and test quality
- Feedback: Report using the format below
Output Format
- Critical Issues (must fix): Bugs, vulnerabilities, breaking changes → file:line + fix suggestion
- Important Suggestions (should address): Performance, maintainability
- Minor Improvements (nice to have): Style, documentation
- Positive Highlights: Good implementations
- Next Steps: Prioritized recommended actions
Template details: templates/review-report.md
Decision Criteria
- Correctness > cleverness. CLAUDE.md standards > general best practices
- Provide specific, actionable feedback (file:line + code examples)
- Investigate why unusual approaches pass tests before flagging them