Overview
The code-review-checklist skill provides comprehensive guidelines for conducting thorough code reviews. It covers correctness, security (including AI-specific concerns), performance, code quality, testing, and documentation.What This Skill Provides
- Quick Review Checklist: Essential items to verify in every review
- Security Review: Including 2025 AI/LLM-specific concerns
- Performance Checks: N+1 queries, caching, bundle size
- Code Quality Standards: DRY, SOLID, clear naming
- Testing Requirements: Coverage and quality expectations
- Anti-Pattern Detection: Common mistakes to flag
- Review Comment Guidelines: How to provide effective feedback
Quick Review Checklist
Correctness
- Code does what it’s supposed to do
- Edge cases handled
- Error handling in place
- No obvious bugs
Security
- Input validated and sanitized
- No SQL/NoSQL injection vulnerabilities
- No XSS or CSRF vulnerabilities
- No hardcoded secrets or sensitive credentials
- AI-Specific: Protection against Prompt Injection (if applicable)
- AI-Specific: Outputs sanitized before use in critical sinks
Performance
- No N+1 queries
- No unnecessary loops
- Appropriate caching
- Bundle size impact considered
Code Quality
- Clear naming
- DRY - no duplicate code
- SOLID principles followed
- Appropriate abstraction level
Testing
- Unit tests for new code
- Edge cases tested
- Tests readable and maintainable
Documentation
- Complex logic commented
- Public APIs documented
- README updated if needed
AI & LLM Review Patterns (2025)
Logic & Hallucinations
- Chain of Thought: Does the logic follow a verifiable path?
- Edge Cases: Did the AI account for empty states, timeouts, and partial failures?
- External State: Is the code making safe assumptions about file systems or networks?
Prompt Engineering Review
Bad Example:Anti-Patterns to Flag
Magic Numbers
Deep Nesting
Long Functions
Any Type
Review Comments Guide
Priority Markers
Use Cases
When to Use This Skill
- Reviewing pull requests
- Conducting code quality audits
- Providing feedback on code submissions
- Teaching code quality standards
- Setting up review guidelines for a team
Example Scenarios
- PR Review: “Review this authentication implementation”
- Security Audit: “Check this code for security vulnerabilities”
- Quality Check: “Does this code follow best practices?”
- Learning: “What should I look for in a code review?”
Security Checklist
Traditional Security
- Input validation and sanitization
- SQL/NoSQL injection prevention
- XSS and CSRF protection
- No hardcoded secrets
- Proper authentication and authorization
AI-Specific Security (2025)
- Prompt injection protection
- Output sanitization before critical operations
- Verifiable logic paths (Chain of Thought)
- Safe handling of external state
- Schema validation for AI responses
Performance Review
Database Queries
- Check for N+1 queries
- Verify appropriate indexes
- Look for unnecessary data fetching
Frontend Performance
- Bundle size impact
- Unnecessary re-renders
- Missing memoization
- Large dependencies
Caching
- Appropriate cache strategies
- Cache invalidation logic
- No over-caching of dynamic data
Code Quality Review
Naming
- Variables reveal intent
- Functions use verb + noun
- Booleans in question form
- Constants use SCREAMING_SNAKE_CASE
Structure
- Functions are small (max 20 lines)
- Single Responsibility Principle
- DRY - no duplication
- Appropriate abstraction levels
Error Handling
- All error cases handled
- User-friendly error messages
- Proper logging
- No silent failures
Related Skills
- clean-code: Code quality principles
- testing-patterns: Testing expectations
- vulnerability-scanner: Security scanning
- refactoring-patterns: Improving existing code
Which Agents Use This Skill
- test-engineer: Reviews code for testability and quality
- code-archaeologist: Uses during refactoring reviews
Review Process
- First Pass: Skim for overall structure and approach
- Security Check: Look for vulnerabilities
- Logic Check: Verify correctness and edge cases
- Quality Check: Review naming, structure, duplication
- Performance Check: Look for obvious inefficiencies
- Testing Check: Verify adequate test coverage
Tools Available
- Read: For reviewing code files
- Glob, Grep: For finding patterns across codebase
Remember: Code review is about improving code quality and sharing knowledge, not criticizing the developer. Be constructive and specific in feedback.
