skill-code-review
Conducts systematic code reviews using a structured checklist to ensure secure, clean, and bug-free code.
Install
mkdir -p .claude/skills/skill-code-review && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17929" && unzip -o skill.zip -d .claude/skills/skill-code-review && rm skill.zipInstalls to .claude/skills/skill-code-review
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Perform thorough, constructive code reviews focusing on correctness, security, maintainability, and best practicesKey capabilities
- →Evaluate code for correctness
- →Assess security vulnerabilities
- →Review architectural design and patterns
- →Check readability and maintainability
- →Provide constructive feedback with severity levels
How it works
This skill guides a complete code review process by providing a checklist across multiple dimensions like correctness, security, and architecture, and then structures feedback according to severity.
Inputs & outputs
When to use skill-code-review
- →Review pull requests
- →Perform pre-merge inspection
- →Validate refactoring changes
- →Conduct security code audit
About this skill
Code Review Skill Instructions
Purpose
Conduct comprehensive code reviews that improve code quality, catch bugs early, ensure security, and promote team learning through constructive feedback.
When to Use
- Pull request reviews
- Pre-merge code inspections
- Security audits
- Refactoring validation
- New feature implementation reviews
Review Process
1. Understand Context First
- Read the PR/change description and linked issues
- Understand the intent and scope of the change
- Check if tests and documentation are included
- Review the overall architecture impact
2. Review Checklist
✅ Correctness
- Does the code do what it's supposed to do?
- Are edge cases handled properly?
- Is the logic correct and complete?
- Are there any off-by-one errors, null pointer issues, or race conditions?
🔒 Security
- Input validation and sanitization
- No hardcoded secrets, API keys, or credentials
- Proper authentication and authorization checks
- SQL injection, XSS, CSRF protection
- Secure handling of sensitive data
- Dependencies free of known vulnerabilities
🏗️ Architecture & Design
- Follows SOLID principles
- Appropriate separation of concerns
- No unnecessary coupling between components
- Consistent with existing patterns in the codebase
- Scalability considerations addressed
📖 Readability & Maintainability
- Clear, descriptive naming (variables, functions, classes)
- Functions are small and do one thing well
- No magic numbers or strings (use constants)
- Complex logic is commented or self-documenting
- No dead code or commented-out code blocks
⚡ Performance
- No N+1 queries or unnecessary database calls
- Efficient algorithms and data structures
- Proper caching where appropriate
- No memory leaks or resource exhaustion risks
- Async operations used correctly
🧪 Testing
- Unit tests cover new functionality
- Edge cases and error paths tested
- Tests are readable and maintainable
- No flaky or brittle tests
- Integration tests where appropriate
📝 Documentation
- Public APIs documented
- Complex business logic explained
- README updated if needed
- Breaking changes documented
Feedback Guidelines
Be Constructive
❌ "This code is bad"
✅ "Consider extracting this into a separate function for better testability"
Be Specific
❌ "Fix the naming"
✅ "Rename `data` to `userProfile` to clarify its purpose"
Explain the Why
❌ "Don't use var"
✅ "Use `const` instead of `var` to prevent accidental reassignment and improve code clarity"
Categorize Feedback Severity
| Prefix | Meaning | Action Required |
|---|---|---|
| 🚨 BLOCKER | Critical issue, must fix | Cannot merge |
| ⚠️ WARNING | Should fix, potential problem | Strongly recommended |
| 💡 SUGGESTION | Improvement opportunity | Optional |
| ❓ QUESTION | Clarification needed | Please explain |
| 👍 PRAISE | Great work! | Keep it up |
Comment Templates
Security Issue
🚨 **BLOCKER - Security**: User input is not sanitized before being used in the SQL query.
This creates a SQL injection vulnerability.
**Suggestion**: Use parameterized queries or an ORM to safely handle user input.
Performance Concern
⚠️ **WARNING - Performance**: This loop makes a database call on each iteration,
resulting in N+1 queries.
**Suggestion**: Batch the queries or use eager loading to fetch all data upfront.
Code Quality Suggestion
💡 **SUGGESTION**: This function is 80 lines long with multiple responsibilities.
Consider splitting into:
- `validateInput()` - Input validation
- `processData()` - Core business logic
- `formatResponse()` - Response formatting
Positive Feedback
👍 **PRAISE**: Excellent error handling here! The fallback mechanism and
detailed logging will make debugging much easier.
Review Output Format
Structure your review as follows:
## Code Review Summary
**Overall Assessment**: ✅ Approved | ⚠️ Needs Changes | 🚨 Request Changes
### Overview
Brief summary of what was reviewed and overall impressions.
### Critical Issues (Must Fix)
- Issue 1 with location and fix suggestion
- Issue 2 with location and fix suggestion
### Recommendations (Should Fix)
- Recommendation 1
- Recommendation 2
### Suggestions (Nice to Have)
- Suggestion 1
- Suggestion 2
### Positive Highlights
- What was done well
### Questions
- Any clarifications needed
Best Practices
- Review in small batches - Keep PRs small (<400 lines) for effective review
- Take your time - Don't rush; bugs missed in review are expensive later
- Be respectful - Review the code, not the person
- Assume good intent - Authors did their best with available information
- Offer alternatives - Don't just criticize; provide solutions
- Learn together - Reviews are learning opportunities for everyone
- Follow up - Verify fixes address the concerns raised
Anti-Patterns to Avoid
- ❌ Nitpicking style issues (use linters instead)
- ❌ Rewriting someone's code in your style
- ❌ Blocking PRs for subjective preferences
- ❌ Reviewing without understanding context
- ❌ Being vague or unconstructive
- ❌ Ignoring positive aspects of the code
When not to use it
- →When only style issues need to be addressed
- →When the context of the change is not understood
- →When the goal is to rewrite code in a different style
Limitations
- →Does not automatically fix code issues
- →Requires understanding the intent and scope of the change
- →Feedback guidelines must be followed for effective communication
How it compares
This skill provides a structured, multi-faceted checklist and feedback categorization for code reviews, which differs from an ad-hoc or unguided review process.
Compared to similar skills
skill-code-review side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| skill-code-review (this skill) | 0 | 6mo | No flags | Intermediate |
| swift-coding | 0 | 18d | Review | Intermediate |
| effective-go | 323 | 9mo | No flags | Beginner |
| solid-principles | 57 | 9mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by nicanac
View all by nicanac →You might also like
swift-coding
Dynokostya
Apply when writing or editing Swift (.swift) files. Behavioral corrections for error handling, concurrency, memory management, type safety, protocol-oriented design, security defaults, and common antipatterns. Project conventions always override these defaults.
effective-go
openshift
Apply Go best practices, idioms, and conventions from golang.org/doc/effective_go. Use when writing, reviewing, or refactoring Go code to ensure idiomatic, clean, and efficient implementations.
solid-principles
SmidigStorm
Enforce SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) in object-oriented design. Use when writing or reviewing classes and modules.
typescript-review
metabase
Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.
ast-grep
ast-grep
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics.
github-code-review
ruvnet
Comprehensive GitHub code review with AI-powered swarm coordination