This skill performs expert code reviews focused on quality, security, and maintainability, delivering prioritized, actionable feedback for changes.
npx playbooks add skill 89jobrien/steve --skill code-review
This skill provides expert code review capabilities focusing on code quality, security vulnerabilities, and maintainability. It analyzes code changes and provides prioritized, actionable feedback.
Review the recent code changes in this branch
Check this file for security issues and code quality
Review src/auth.js for security vulnerabilities
Review the changes in this pull request
When invoked:
git diff to see what changed git diff $(git merge-base HEAD main)..HEAD
For each file, check:
Code Quality:
Security:
Maintainability:
Best Practices:
Provide feedback in three priority levels:
Critical Issues (Must Fix):
Warnings (Should Fix):
Suggestions (Consider Improving):
For each issue found:
Input: Review src/api/auth.js
Output:
## Code Review: src/api/auth.js
### Critical Issues
**1. Exposed API Key**
- **Location**: `src/api/auth.js:23`
- **Issue**: Hardcoded API key in source code
- **Code**:
const API_KEY = "sk_live_1234567890abcdef"; // ❌ Exposed secret
- **Fix**: Use environment variables
const API_KEY = process.env.API_KEY; // ✅ Secure
- **Impact**: This exposes your API key in version control, allowing unauthorized access
### Warnings
**2. Missing Input Validation**
- **Location**: `src/api/auth.js:45`
- **Issue**: No validation on user input before processing
- **Recommendation**: Add input validation before authentication
### Example 2: Code Quality Review
**Input**: Review recent changes
**Output**:
Files Reviewed: 5
Critical Issues: 0
Warnings: 3
Suggestions: 5
1. Duplicated Code
src/utils/format.js:12-25 and src/utils/display.js:8-212. Missing Error Handling
src/api/users.js:341. Improve Variable Naming
src/components/List.jsx:15const d = data.map(...)const formattedItems = data.map(...)
## Reference Files
For comprehensive review checklists, load reference files as needed:
- **`references/review_checklist.md`** - Detailed checklists for security, code quality, performance, testing, documentation, and best practices
- **`references/CODE_ANALYSIS.template.md`** - Code analysis report template with security, performance, and maintainability sections
When conducting thorough reviews, load `references/review_checklist.md` and use the appropriate checklist sections.
## Best Practices
### Review Focus Areas
1. **Security First**: Always check for security vulnerabilities first
2. **Context Matters**: Understand the purpose of changes before reviewing
3. **Be Constructive**: Provide actionable feedback, not just criticism
4. **Prioritize**: Focus on critical issues that must be fixed
5. **Explain Why**: Help developers understand the reasoning behind suggestions
### Review Guidelines
- **Be Specific**: Point to exact lines and provide code examples
- **Be Balanced**: Acknowledge good code as well as issues
- **Be Practical**: Consider the context and urgency of changes
- **Be Educational**: Help developers learn and improve
- **Be Consistent**: Apply the same standards across all reviews
### Common Patterns to Check
**Security:**
- Hardcoded secrets or credentials
- SQL injection vulnerabilities
- XSS vulnerabilities
- Missing authentication/authorization
- Insecure random number generation
**Code Quality:**
- Code duplication
- Magic numbers without constants
- Deeply nested conditionals
- Functions that do too much
- Poor error messages
**Performance:**
- N+1 query problems
- Missing indexes
- Inefficient algorithms
- Unnecessary re-renders (React)
- Memory leaks
## Related Use Cases
- Pre-commit code reviews
- Pull request reviews
- Security audits
- Code quality assessments
- Onboarding new team members
- Establishing coding standardsWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.