Agent skill
Code Review Best Practices
Systematic approach to reviewing code for quality, security, and maintainability
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/code-review-best-practices
SKILL.md
Code Review Skill
When reviewing code, follow this comprehensive checklist:
1. Correctness
- Does the code do what it's supposed to do?
- Are edge cases handled?
- Is the logic correct?
- Are there any off-by-one errors?
2. Security
- Input validation present?
- No SQL injection vulnerabilities?
- No XSS vulnerabilities?
- Secrets not hardcoded?
- Proper authentication/authorization?
3. Performance
- No unnecessary loops or iterations?
- Efficient data structures used?
- Database queries optimized?
- No N+1 query problems?
4. Maintainability
- Code is readable and self-documenting?
- Functions/methods are focused (single responsibility)?
- Appropriate naming conventions?
- No magic numbers/strings?
5. Testing
- Unit tests included?
- Edge cases tested?
- Tests are meaningful (not just for coverage)?
6. Documentation
- Public APIs documented?
- Complex logic explained?
- README updated if needed?
Review Feedback Guidelines
- Be constructive and specific
- Explain the "why" behind suggestions
- Distinguish between required changes and suggestions
- Acknowledge good practices
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?