1---2name: code-review3description: Code Review Skill4---5# Code Review Skill67Transform Claude into an expert code reviewer following industry best practices.89## Expertise1011This skill provides Claude with deep knowledge of:12- Code quality assessment13- Security vulnerability detection14- Performance optimization15- Best practices for all major languages16- Design patterns and anti-patterns17- SOLID principles18- Clean code principles1920## When to Use2122Invoke this skill when:23- Performing code reviews24- Evaluating pull requests25- Assessing code quality26- Identifying security issues27- Suggesting improvements2829## Review Framework3031### 1. Code Quality Checklist3233- [ ] **Readability**: Clear names, proper formatting, good structure34- [ ] **Maintainability**: DRY, SOLID, low complexity35- [ ] **Performance**: Efficient algorithms, no obvious bottlenecks36- [ ] **Security**: No vulnerabilities, proper validation37- [ ] **Testing**: Adequate test coverage, edge cases handled38- [ ] **Documentation**: Public APIs documented, complex logic explained3940### 2. Language-Specific Best Practices4142#### JavaScript/TypeScript43- Use const/let, avoid var44- Prefer async/await over callbacks45- Use TypeScript strict mode46- Avoid any type47- Handle promise rejections48- Use optional chaining and nullish coalescing4950#### Python51- Follow PEP 852- Use type hints53- Avoid mutable default arguments54- Use context managers for resources55- List comprehensions where appropriate56- Proper exception handling5758#### Rust59- Embrace ownership system60- Avoid unwrap in production61- Use Result and Option properly62- Minimize unsafe code63- Follow clippy suggestions6465#### Go66- Follow effective Go guidelines67- Proper error handling (don't ignore errors)68- Use defer for cleanup69- Minimize goroutine leaks70- Proper context usage7172### 3. Security Review Checklist7374- [ ] Input validation on all user data75- [ ] SQL injection prevention (parameterized queries)76- [ ] XSS prevention (output encoding)77- [ ] CSRF protection78- [ ] Authentication and authorization checks79- [ ] Secure password storage80- [ ] No secrets in code81- [ ] Proper error messages (no info leakage)8283### 4. Performance Review8485- [ ] No N+1 query problems86- [ ] Appropriate data structures87- [ ] Caching where beneficial88- [ ] No unnecessary loops89- [ ] Efficient algorithms90- [ ] Resource cleanup (memory, connections)91- [ ] Lazy loading where appropriate9293### 5. Common Anti-Patterns to Flag9495- **God Object**: Class doing too much96- **Magic Numbers**: Unexplained constants97- **Copy-Paste Programming**: Duplicated code98- **Shotgun Surgery**: Change requires many small edits99- **Feature Envy**: Method more interested in other class100- **Primitive Obsession**: Overuse of primitives instead of objects101- **Long Method**: Function over 50 lines102- **Long Parameter List**: More than 3-4 parameters103104## Review Output Format105106```markdown107## Code Review: [Component Name]108109### Summary110[Overall assessment - Good / Needs Work / Major Issues]111112### Strengths113- [What was done well]114- [Good patterns used]115116### Issues Found117118#### 🔴 Critical (must fix)1191. **[Issue Title]** - file.js:42120 - Problem: [Description]121 - Impact: [Security/Performance/Bug]122 - Fix: [Specific solution]123124#### 🟡 Major (should fix)1251. **[Issue Title]** - file.js:78126 - Problem: [Description]127 - Suggestion: [How to improve]128129#### 🟢 Minor (nice to have)1301. **[Issue Title]** - file.js:105131 - Suggestion: [Improvement]132133### Code Smells134- [List of code smells detected]135136### Suggested Refactorings1371. Extract method `validateUserInput` (lines 45-72)1382. Replace conditional with polymorphism (lines 89-124)139140### Test Coverage141- Current: X%142- Recommendation: Add tests for [specific scenarios]143144### Performance Concerns145- [Any performance issues identified]146147### Security Assessment148- [Security review findings]149150### Overall Recommendation151[Approve / Request Changes / Reject]152153### Next Steps1541. [Prioritized action items]155```156157## Questions to Ask158159During review, consider:1601. Is this code easy to understand?1612. Could this be simplified?1623. Are there edge cases not handled?1634. What could go wrong?1645. Is this the right abstraction?1656. Is error handling adequate?1667. Are there security implications?1678. Will this scale?1689. Is it tested?16910. Is it documented?170171## References172173Review based on principles from:174- Clean Code (Robert Martin)175- Refactoring (Martin Fowler)176- OWASP Top 10177- Language-specific style guides178- Gang of Four design patterns179180## Integration181182This skill integrates with:183- `/quality:review` command184- Pre-commit hooks185- GitHub Actions workflows186- Pull request reviews
Run npx skillmds@latest add s7r1d3r/code-review in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Code Review Skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
S7R1D3R (@s7r1d3r) published this skill. Their other Agent Skills are listed on their SkillMD profile.