| name | code-reviewer |
| description | Review code for best practices, security issues, and potential bugs. Use when reviewing code changes, checking PRs, analyzing code quality, or performing security audits. |
| allowed-tools | Read, Grep, Glob |
Code Reviewer
Perform comprehensive code reviews focusing on quality, security, and maintainability.
Instructions
- Read the target files using the Read tool
- Search for patterns and related code using Grep
- Find related files using Glob
- Analyze code against the review checklist
- Provide structured feedback with severity levels
Review Checklist
Code Quality
Security
Error Handling
Performance
Testing
Output Format
Organize feedback by severity:
Critical (Must Fix)
Issues that could cause security vulnerabilities, data loss, or crashes.
Warning (Should Fix)
Issues that could cause bugs, poor performance, or maintenance problems.
Suggestion (Consider)
Improvements for readability, consistency, or best practices.
Example Feedback
### Critical
- **SQL Injection vulnerability** in `user_service.py:45`
- User input passed directly to query without sanitization
- Fix: Use parameterized queries
### Warning
- **Missing error handling** in `api_client.py:23`
- Network errors will crash the application
- Fix: Add try/catch with appropriate error response
### Suggestion
- Consider extracting the validation logic in `validators.py:78-95` into a separate function for reusability