Skip to content

review — Code Review

  • Trigger: /review or keywords "review", "code review", "check this code"
  • Best for: Change review, pre-PR checks, code quality assessment
  • Not for: Security-specific audits (use security-review), architecture-level review (use improve-codebase-architecture)

Overview

review performs comprehensive code change reviews covering: correctness, readability, security, performance, and maintainability. It's the last quality gate before committing.

Trigger Conditions

review auto-triggers when you:

  • Mention "review this code", "code review"
  • Are in a PR workflow and need review
  • Use the /review command

Examples

Example 1: Single File Review

/review Review src/services/auth.ts

Claude analyzes section by section:

  • Security: token storage, XSS protection, password handling
  • Logic: edge cases, error handling paths, race conditions
  • Performance: unnecessary recomputation, missing caching
  • Readability: variable naming, function length, need for splitting

Example 2: Review Git Diff

/review Review all uncommitted changes

Example 3: Focused Review

/review Focus on error handling completeness in src/api/

Example 4: PR Review

/review Check if this PR's database migration has rollback risks

Example 5: Component Review

/review Review the Modal component for accessibility support

Review Dimensions

DimensionFocus
CorrectnessLogic errors, edge cases, type safety
SecurityInjection risks, sensitive data exposure, auth checks
PerformanceN+1 queries, unnecessary re-renders, memory leaks
MaintainabilityComplexity, coupling, naming quality
ConsistencyAlignment with project patterns and conventions

Notes

  • Review output is advisory, not prescriptive — you have final say
  • For security-sensitive code, use /security-review for a dedicated audit
  • After review, use /simplify to address duplication and redundancy
  • For large PRs, review in batches rather than all at once
  • Review isn't about "finding faults" — acknowledge good practices too