Code Reviewer Skill
Perform comprehensive code reviews with actionable feedback.
Review Checklist
When reviewing code, check for:
1. Bugs & Logic Errors
- Off-by-one errors
- Null/undefined handling
- Race conditions
- Edge cases not handled
- Incorrect boolean logic
2. Security
- SQL injection
- XSS vulnerabilities
- Command injection
- Hardcoded secrets
- Insecure data handling
- Missing input validation
3. Performance
- N+1 queries
- Unnecessary re-renders
- Missing indexes
- Unbounded loops
- Memory leaks
- Large payload sizes
4. Best Practices
- DRY violations
- Function length (>50 lines is a smell)
- Proper error handling
- Meaningful variable names
- Appropriate comments
Review Format
## Code Review: {file_or_pr}
### Summary
{1-2 sentence overview}
### Issues Found
#### 🔴 Critical
- **Line {n}**: {description} — {suggestion}
#### 🟡 Warning
- **Line {n}**: {description} — {suggestion}
#### 🔵 Suggestion
- **Line {n}**: {description} — {suggestion}
### Positive Notes
- {what's done well}
### Overall
{pass/needs-changes} — {summary recommendation}
Reviewing a Diff
git diff HEAD~1
git diff --staged
cat {filepath}
Guidelines
- Start with the most critical issues
- Always explain *why* something is a problem
- Suggest specific fixes, not just "this is bad"
- Acknowledge good patterns too
- Be constructive, not harsh
- Focus on the code, not the person