code-reviewer

ljchg12-hue's avatarfrom ljchg12-hue

Comprehensive code review for quality, security, performance, and best practices

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 30, 2025

When & Why to Use This Skill

The Code Reviewer Claude skill provides a comprehensive automated analysis of source code to ensure high standards of quality, security, and performance. By evaluating code against industry best practices such as SOLID and DRY principles, it identifies critical vulnerabilities, performance bottlenecks, and maintainability issues, delivering actionable feedback and code examples to accelerate the development lifecycle.

Use Cases

  • Pull Request Audits: Automatically review code changes for bugs, naming consistency, and documentation compliance before merging.
  • Security Vulnerability Detection: Identify high-risk issues like SQL injection, XSS, and hardcoded secrets to prevent security breaches.
  • Performance Optimization: Detect inefficient algorithms, memory leaks, and unoptimized database queries to improve application responsiveness.
  • Technical Debt Reduction: Evaluate code structure and maintainability to ensure long-term scalability and adherence to architectural design patterns.
namecode-reviewer
descriptionComprehensive code review for quality, security, performance, and best practices
version1.0.0
authorUSER
tags[code-review, quality, security, performance, best-practices]

Code Reviewer

Purpose

Perform thorough code reviews focusing on quality, security vulnerabilities, performance issues, and adherence to best practices.

Activation Keywords

  • review, code review, PR review
  • quality check, best practices
  • security audit, vulnerability
  • performance review

Review Categories

1. Code Quality

  • Clean code principles
  • DRY (Don't Repeat Yourself)
  • SOLID principles
  • Meaningful naming
  • Appropriate comments
  • Error handling

2. Security

  • Input validation
  • SQL injection prevention
  • XSS prevention
  • CSRF protection
  • Sensitive data exposure
  • Authentication/Authorization
  • Dependency vulnerabilities

3. Performance

  • Algorithm complexity (Big O)
  • Database query efficiency
  • Memory usage
  • Caching opportunities
  • Unnecessary re-renders (frontend)

4. Maintainability

  • Code organization
  • Module boundaries
  • Dependency management
  • Test coverage
  • Documentation

5. Architecture

  • Design patterns usage
  • Separation of concerns
  • Scalability considerations
  • Technical debt

Review Output Format

## Code Review Summary

### 🔴 Critical Issues (Must Fix)
- [Issue description + location + fix suggestion]

### 🟡 Warnings (Should Fix)
- [Issue description + location + fix suggestion]

### 🔵 Suggestions (Nice to Have)
- [Improvement suggestion]

### ✅ Good Practices Found
- [Positive observations]

### 📊 Metrics
- Files reviewed: X
- Issues found: Y
- Security concerns: Z

Instructions

  1. Read Entire Context

    • Understand the purpose of changes
    • Note the technology stack
    • Check existing patterns
  2. Systematic Review

    • Go through each file
    • Check all categories
    • Note line numbers
  3. Prioritize Issues

    • Critical: Security, data loss risks
    • Warning: Bugs, performance issues
    • Suggestion: Style, minor improvements
  4. Provide Solutions

    • Include fix suggestions
    • Show code examples
    • Reference best practices

Example Review

User: "Review this authentication middleware"

Code Reviewer Response:

## Code Review: auth-middleware.ts

### 🔴 Critical Issues
1. **JWT Secret Hardcoded** (line 15)
   - Risk: Secret exposure in source control
   - Fix: Use environment variable
   ```typescript
   const secret = process.env.JWT_SECRET;

🟡 Warnings

  1. Missing Token Expiry Check (line 23)
    • Add expiry validation in verify options

✅ Good Practices

  • Proper error handling structure
  • Clean middleware pattern