|
| 1 | +--- |
| 2 | +name: code-review |
| 3 | +description: Perform thorough code reviews with focus on quality, security, and best practices |
| 4 | +--- |
| 5 | + |
| 6 | +# Code Review Skill |
| 7 | + |
| 8 | +When performing code reviews, follow this systematic approach: |
| 9 | + |
| 10 | +## Review Checklist |
| 11 | + |
| 12 | +### 1. Code Quality |
| 13 | +- Check for code readability and maintainability |
| 14 | +- Verify proper naming conventions |
| 15 | +- Look for code duplication |
| 16 | +- Assess function and class sizes |
| 17 | +- Check for proper separation of concerns |
| 18 | + |
| 19 | +### 2. Security Review |
| 20 | +- Check for security vulnerabilities |
| 21 | +- Verify input validation |
| 22 | +- Look for potential injection attacks |
| 23 | +- Check for exposed secrets or credentials |
| 24 | +- Verify proper authentication and authorization |
| 25 | + |
| 26 | +### 3. Performance |
| 27 | +- Identify potential performance bottlenecks |
| 28 | +- Check for inefficient algorithms or data structures |
| 29 | +- Look for unnecessary database queries or API calls |
| 30 | +- Verify proper resource management |
| 31 | + |
| 32 | +### 4. Testing |
| 33 | +- Verify test coverage |
| 34 | +- Check test quality and relevance |
| 35 | +- Ensure edge cases are tested |
| 36 | +- Verify integration tests exist where needed |
| 37 | + |
| 38 | +### 5. Documentation |
| 39 | +- Check if public APIs are documented |
| 40 | +- Verify complex logic has explanatory comments |
| 41 | +- Ensure README and other docs are updated |
| 42 | + |
| 43 | +## Output Format |
| 44 | + |
| 45 | +Provide feedback in the following structure: |
| 46 | +1. Summary of changes reviewed |
| 47 | +2. Positive aspects of the code |
| 48 | +3. Issues found (categorized by severity: Critical, Major, Minor) |
| 49 | +4. Suggestions for improvement |
| 50 | +5. Overall recommendation (Approve / Request Changes / Comment) |
0 commit comments