Code Reviewer Skill
Purpose
Perform deep, structured code reviews on files, pull requests, and entire codebases. Identify bugs, security vulnerabilities, performance issues, and code quality concerns with actionable feedback.
How It Works
The code reviewer analyzes code through multiple lenses:
- Correctness — Logic errors, edge cases, null safety, type mismatches
- Security — Injection vulnerabilities, auth issues, data exposure, OWASP Top 10
- Performance — Algorithmic complexity, memory leaks, unnecessary allocations, N+1 queries
- Maintainability — Code clarity, naming, duplication, SOLID principles
- Accessibility — WCAG compliance, ARIA attributes, keyboard navigation (for UI code)
Review Methodology
Phase 1: Context Gathering
- Understand the purpose of the change (PR description, commit messages, related issues)
- Identify the programming language, framework, and project conventions
- Check for existing tests and documentation
Phase 2: Structural Analysis
- Review file organization and module boundaries
- Check import/dependency structure
- Verify naming conventions and code style consistency
Phase 3: Deep Review
- Line-by-line analysis of changed code
- Cross-reference with existing codebase for consistency
- Check error handling paths
- Verify edge cases and boundary conditions
Phase 4: Security Scan
- Input validation and sanitization
- Authentication and authorization checks
- Data exposure risks (logging, error messages)
- Dependency vulnerabilities
Phase 5: Performance Review
- Algorithmic complexity analysis
- Database query patterns
- Memory allocation patterns
- Caching opportunities
Phase 6: Report Generation
- Categorize findings by severity (Critical, High, Medium, Low, Info)
- Provide specific line references
- Include fix suggestions with code examples
- Summarize overall assessment
Severity Levels
| Level |
Description |
Action Required |
| 🔴 Critical |
Security vulnerability, data loss risk, crash |
Must fix before merge |
| 🟠 High |
Bugs, logic errors, significant perf issues |
Should fix before merge |
| 🟡 Medium |
Code quality, maintainability concerns |
Fix recommended |
| 🔵 Low |
Style, naming, minor improvements |
Consider fixing |
| ⚪ Info |
Observations, suggestions, praise |
No action needed |
Commands
See commands.md for available commands.
Templates
Review report templates are in the templates/ directory:
security-review.md — Security-focused review template
performance-review.md — Performance analysis template
quality-review.md — General code quality template
accessibility-review.md — UI/UX accessibility review template
Checklists
Language-specific review checklists in checklists/:
python.md — Python-specific review items
typescript.md — TypeScript/JavaScript review items
react.md — React component review items
Configuration
The reviewer adapts to project conventions automatically. Override defaults by specifying:
# .code-review.yml (project root)
severity_threshold: medium # minimum severity to report
max_findings: 50 # cap on findings per review
include_praise: true # include positive observations
languages:
- python
- typescript
style_guide: airbnb # or google, standard, custom
Best Practices
- Review in context — Understand why the change was made before critiquing how
- Be specific — Reference exact lines and provide code examples
- Prioritize — Focus on critical/high items; don't bury important findings in noise
- Be constructive — Suggest fixes, not just problems
- Acknowledge good code — Positive feedback reinforces good practices
1---2name: code-reviewer3description: Code Reviewer Skill4---5# Code Reviewer Skill67## Purpose89Perform deep, structured code reviews on files, pull requests, and entire codebases. Identify bugs, security vulnerabilities, performance issues, and code quality concerns with actionable feedback.1011## How It Works1213The code reviewer analyzes code through multiple lenses:14151. **Correctness** — Logic errors, edge cases, null safety, type mismatches162. **Security** — Injection vulnerabilities, auth issues, data exposure, OWASP Top 10173. **Performance** — Algorithmic complexity, memory leaks, unnecessary allocations, N+1 queries184. **Maintainability** — Code clarity, naming, duplication, SOLID principles195. **Accessibility** — WCAG compliance, ARIA attributes, keyboard navigation (for UI code)2021## Review Methodology2223### Phase 1: Context Gathering24- Understand the purpose of the change (PR description, commit messages, related issues)25- Identify the programming language, framework, and project conventions26- Check for existing tests and documentation2728### Phase 2: Structural Analysis29- Review file organization and module boundaries30- Check import/dependency structure31- Verify naming conventions and code style consistency3233### Phase 3: Deep Review34- Line-by-line analysis of changed code35- Cross-reference with existing codebase for consistency36- Check error handling paths37- Verify edge cases and boundary conditions3839### Phase 4: Security Scan40- Input validation and sanitization41- Authentication and authorization checks42- Data exposure risks (logging, error messages)43- Dependency vulnerabilities4445### Phase 5: Performance Review46- Algorithmic complexity analysis47- Database query patterns48- Memory allocation patterns49- Caching opportunities5051### Phase 6: Report Generation52- Categorize findings by severity (Critical, High, Medium, Low, Info)53- Provide specific line references54- Include fix suggestions with code examples55- Summarize overall assessment5657## Severity Levels5859| Level | Description | Action Required |60|-------|-------------|-----------------|61| 🔴 Critical | Security vulnerability, data loss risk, crash | Must fix before merge |62| 🟠 High | Bugs, logic errors, significant perf issues | Should fix before merge |63| 🟡 Medium | Code quality, maintainability concerns | Fix recommended |64| 🔵 Low | Style, naming, minor improvements | Consider fixing |65| ⚪ Info | Observations, suggestions, praise | No action needed |6667## Commands6869See [commands.md](./commands.md) for available commands.7071## Templates7273Review report templates are in the `templates/` directory:74- `security-review.md` — Security-focused review template75- `performance-review.md` — Performance analysis template76- `quality-review.md` — General code quality template77- `accessibility-review.md` — UI/UX accessibility review template7879## Checklists8081Language-specific review checklists in `checklists/`:82- `python.md` — Python-specific review items83- `typescript.md` — TypeScript/JavaScript review items84- `react.md` — React component review items8586## Configuration8788The reviewer adapts to project conventions automatically. Override defaults by specifying:8990```yaml91# .code-review.yml (project root)92severity_threshold: medium # minimum severity to report93max_findings: 50 # cap on findings per review94include_praise: true # include positive observations95languages:96 - python97 - typescript98style_guide: airbnb # or google, standard, custom99```100101## Best Practices1021031. **Review in context** — Understand why the change was made before critiquing how1042. **Be specific** — Reference exact lines and provide code examples1053. **Prioritize** — Focus on critical/high items; don't bury important findings in noise1064. **Be constructive** — Suggest fixes, not just problems1075. **Acknowledge good code** — Positive feedback reinforces good practices