Agent skill
code-review
Reviews code for best practices and potential issues. Use when reviewing code, checking PRs, or analyzing code quality.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/code-review-doravidan-supreme-ralph
SKILL.md
Code Review Skill
When reviewing code, follow this comprehensive checklist:
1. Code Quality
Readability
- Is the code easy to understand?
- Are variable and function names descriptive?
- Is the code properly formatted?
- Are comments helpful and accurate?
Structure
- Are functions small and focused?
- Is the code organized logically?
- Is there appropriate separation of concerns?
- Are dependencies managed well?
Maintainability
- Is the code DRY (Don't Repeat Yourself)?
- Are magic numbers avoided?
- Is the code testable?
- Is error handling comprehensive?
2. Security
Data Protection
- No hardcoded secrets or credentials?
- Sensitive data properly handled?
- No sensitive data in logs?
Input Validation
- All user input validated?
- SQL injection prevented?
- XSS attacks prevented?
Authentication/Authorization
- Proper access controls?
- Sessions managed securely?
3. Performance
Efficiency
- Appropriate algorithms used?
- Database queries optimized?
- No unnecessary iterations?
Resources
- Memory usage reasonable?
- Connections properly closed?
- Caching implemented where beneficial?
4. Testing
Coverage
- New code has tests?
- Edge cases covered?
- Error scenarios tested?
Quality
- Tests are meaningful?
- Tests are maintainable?
- Tests run quickly?
Output Format
For each issue found:
### [Priority: Critical/Warning/Suggestion]
**Location**: file.ts:42
**Issue**: Description of the problem
**Suggestion**: How to fix it
**Example**:
```code
// Fixed code example
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?