AGENT SKILL
review-checklist
Guide for conducting thorough code reviews with quality checklists. Use when reviewing pull requests or code changes.
- License 许可
- MIT
- 最近更新
- 2026-09-28
- Stars
- ★ 5
- Forks
- 2
01 前言 Front Matter
- name
- review-checklist
- license
- MIT
- metadata
- { "author": "Alex", "version": "1.0.0" }
- description
- Guide for conducting thorough code reviews with quality checklists. Use when reviewing pull requests or code changes.
03 SKILL.md 正文
Code Review Checklist
Overview
This skill provides a structured approach to conducting thorough code reviews. It includes checklists for functionality, code quality, security, and performance considerations to ensure comprehensive review coverage.
Prerequisites Checklist
- [ ] You have access to the code changes (diff, PR, or branch)
- [ ] You understand the feature or bug being addressed
- [ ] You have a local environment to test if needed
Step-by-Step Guide
1. Understand the Context
Before diving into the code:
- Read the PR description or ticket
- Understand the problem being solved
- Review any related issues or documentation
- Check if tests are included
2. Review Code Quality
Readability:
- [ ] Code is clear and self-documenting
- [ ] Variable and function names are descriptive
- [ ] Complex logic has explanatory comments
- [ ] Code follows project style guidelines
Structure:
- [ ] Functions are focused and single-purpose
- [ ] No unnecessary code duplication
- [ ] Appropriate separation of concerns
- [ ] Follows project architecture patterns
3. Check Functionality
Correctness:
- [ ] Logic correctly implements requirements
- [ ] Edge cases are handled
- [ ] Error handling is appropriate
- [ ] No obvious bugs or logical errors
Testing:
- [ ] Tests are included for new functionality
- [ ] Tests cover happy path and edge cases
- [ ] Existing tests still pass
- [ ] Test names clearly describe what they verify
4. Security Review
- [ ] No hardcoded credentials or secrets
- [ ] User input is validated and sanitized
- [ ] SQL queries use parameterization
- [ ] Authentication/authorization is correct
- [ ] No sensitive data in logs
5. Performance Considerations
- [ ] No obvious performance bottlenecks
- [ ] Database queries are efficient
- [ ] Large datasets are paginated
- [ ] Caching is used appropriately
- [ ] No unnecessary API calls in loops
6. Provide Constructive Feedback
Structure your comments:
- Blocking issues - Must be fixed (security, bugs, breaking changes)
- Suggestions - Should be considered (improvements, optimizations)
- Nitpicks - Optional (style preferences, minor cleanups)
- Praise - Highlight good solutions and clean code
Common Workflows
Workflow: Quick Review (< 200 lines)
Goal: Fast review for small changes
- Read the PR description
- Scan the diff for obvious issues
- Focus on changed logic and tests
- Approve or request minor changes
Workflow: Deep Review (> 200 lines)
Goal: Thorough review for significant changes
- Check out the branch locally
- Run tests and verify they pass
- Review code section by section
- Test manually if UI changes
- Check for security and performance issues
- Provide detailed feedback
Best Practices
- Be respectful - Focus on code, not the person
- Be specific - Point to exact lines and suggest alternatives
- Be timely - Review within 24 hours when possible
- Ask questions - When logic is unclear, ask for clarification
- Approve generously - If changes work and meet standards, approve
- Test manually - Don't rely solely on tests for UI/UX changes
Troubleshooting
Error: "Too many changes to review"
Cause: PR is too large (> 500 lines) Solution:
- Ask the author to split into smaller PRs
- Review in logical sections if splitting isn't possible
- Focus on critical paths first
Error: "Unclear what the code does"
Cause: Insufficient documentation or complex logic Solution:
- Request explanatory comments for complex sections
- Ask the author to update the PR description
- Suggest extracting complex logic into named functions