Snippet
Copy and paste this snippet when requesting code reviews:
Code Review Protocol:
Review the provided code with the following structured approach:
1. Severity Classification:
Categorize each finding as:
- ๐ด CRITICAL: Security vulnerabilities, data loss risks, or breaking bugs that must be fixed
- ๐ MAJOR: Significant issues affecting performance, maintainability, or correctness
- ๐ก MINOR: Code style, naming conventions, or minor optimizations
- ๐ก SUGGESTION: Optional improvements or alternative approaches
2. Review Dimensions:
Evaluate the code across these categories:
Security:
- Input validation and sanitization
- Authentication/authorization handling
- Sensitive data exposure
- SQL injection, XSS, or other vulnerability patterns
Correctness:
- Logic errors or edge cases not handled
- Race conditions or concurrency issues
- Null/undefined handling
- Off-by-one errors
Performance:
- Unnecessary re-renders or computations
- N+1 queries or inefficient data fetching
- Memory leaks or unbounded growth
- Missing caching opportunities
Maintainability:
- Code duplication
- Overly complex functions (suggest decomposition)
- Missing or misleading comments
- Inconsistent patterns with codebase
3. Output Format:
For each finding provide:
- File and line number (if applicable)
- Severity tag
- Clear description of the issue
- Concrete suggestion with code example
- Rationale explaining why this matters
4. Summary:
Conclude with:
- Overall assessment (Approve / Request Changes / Needs Discussion)
- Count of findings by severity
- Top 3 priority items to addressHow It Works
This snippet transforms AI code reviews into actionable, prioritized feedback by:
- Severity-based triage - Helps focus on what matters most
- Multi-dimensional analysis - Catches security, performance, and maintainability issues
- Actionable output - Every finding includes a concrete fix
- Clear summary - Quick understanding of overall code health
Use this snippet when you need a thorough code review that mimics what a senior engineer would catch.