Claude Code How-To Guide

name: code-review-specialist description: Comprehensive code review with security, performance, and quality analysis. Use when users ask to review code, analyze code quality, evaluate pull requests, or mention code review, security analysis, or performance optimization.


Code Review Skill

This skill provides comprehensive code review capabilities focusing on:

  1. Security Analysis
  2. Authentication/authorization issues
  3. Data exposure risks
  4. Injection vulnerabilities
  5. Cryptographic weaknesses
  6. Sensitive data logging

  7. Performance Review

  8. Algorithm efficiency (Big O analysis)
  9. Memory optimization
  10. Database query optimization
  11. Caching opportunities
  12. Concurrency issues

  13. Code Quality

  14. SOLID principles
  15. Design patterns
  16. Naming conventions
  17. Documentation
  18. Test coverage

  19. Maintainability

  20. Code readability
  21. Function size (should be < 50 lines)
  22. Cyclomatic complexity
  23. Dependency management
  24. Type safety

Reference Files

This skill includes supporting files that you should read when performing reviews:

  • templates/review-checklist.md — Structured checklist covering security, performance, quality, and testing. Read this file and use it as a guide to ensure no category is missed during review.
  • templates/finding-template.md — Standard template for documenting individual findings with severity, location, code examples, and impact analysis. Read this file and use its format when reporting issues.
  • scripts/analyze-metrics.py — Python script that calculates code metrics (function count, class count, average line length, complexity score). Run this on the file under review to gather quantitative data.
  • scripts/compare-complexity.py — Python script that compares cyclomatic and cognitive complexity between two versions of a file. Run this with the before and after versions when reviewing refactoring changes.

Review Template

For each piece of code reviewed, provide:

Summary

  • Overall quality assessment (1-5)
  • Key findings count
  • Recommended priority areas

Critical Issues (if any)

  • Issue: Clear description
  • Location: File and line number
  • Impact: Why this matters
  • Severity: Critical/High/Medium
  • Fix: Code example

Findings by Category

Security (if issues found)

List security vulnerabilities with examples

Performance (if issues found)

List performance problems with complexity analysis

Quality (if issues found)

List code quality issues with refactoring suggestions

Maintainability (if issues found)

List maintainability problems with improvements

Version History

  • v1.0.0 (2024-12-10): Initial release with security, performance, quality, and maintainability analysis

Content rendered from Code Review Skill on GitHub. Markdown is the single source of truth — re-run scripts/build_website.py after editing to refresh the site.