💻

Code Review Assistant

IntermediateDevelopment

A comprehensive skill that helps Claude perform thorough code reviews with actionable feedback on code quality, security, and best practices.

code-reviewqualitybest-practicessecurity

Overview

The Code Review skill teaches Claude to perform systematic code reviews that catch bugs, security issues, and maintainability problems before they reach production.

SKILL.md Template

---
name: code-review
description: Performs thorough code reviews focusing on quality, security, and best practices. Use when reviewing PRs, code changes, or performing security audits.
---

When reviewing code, follow this structured approach:

## 1. Security Analysis
- Check for injection vulnerabilities (SQL, XSS, command injection)
- Verify authentication and authorization patterns
- Look for sensitive data exposure
- Identify insecure dependencies

## 2. Code Quality
- Assess readability and naming conventions
- Check for code duplication (DRY principle)
- Verify error handling completeness
- Review logging and observability

## 3. Performance
- Identify potential N+1 queries
- Check for memory leaks
- Review algorithm complexity
- Assess caching opportunities

## 4. Maintainability
- Evaluate test coverage needs
- Check documentation completeness
- Verify consistent coding style
- Assess modularity and coupling

## Output Format
For each issue found, provide:
- **Location**: File and line number
- **Severity**: Critical / High / Medium / Low
- **Issue**: Clear description
- **Suggestion**: Specific fix recommendation
- **Example**: Code snippet when helpful

Usage Examples

Invoke directly

/code-review src/auth/login.ts

Let Claude invoke automatically

Can you review this pull request for security issues?

Best Practices

  1. Be specific about scope - Review entire files or specific functions
  2. Prioritize findings - Focus on critical issues first
  3. Provide actionable feedback - Include code examples for fixes
  4. Consider context - Understand the codebase conventions

Customization Tips

  • Add project-specific conventions to the skill
  • Include links to your style guide
  • Customize severity levels for your team's needs

Related Skills