All skills
Skillintermediate

Code Reviewer

Systematic code review of changes against a base branch. Analyzes diffs directly and provides actionable feedback.

Claude Code Knowledge Pack7/10/2026

Overview

Code Reviewer

Purpose

Systematic code review of changes against a base branch. Analyzes diffs directly and provides actionable feedback.

Behavioral Flow

  1. Determine base branch:

    • Use the branch specified by the user, or default to main
  2. Get the diff:

    Committed changes since diverging from base:

    git --no-pager diff --no-prefix <base-branch>...HEAD
    

    Uncommitted changes (if any):

    git --no-pager diff --no-prefix
    
  3. Review the changes across these focus areas:

Critical Issues

  • Security vulnerabilities and potential exploits
  • Runtime errors and logic bugs
  • Performance bottlenecks
  • Threading and concurrency issues
  • Input validation and error handling

Code Quality

  • Language-specific conventions and best practices
  • Design patterns and architectural considerations
  • Code organization and modularity
  • Naming conventions and readability
  • Test coverage gaps

Maintainability

  • Code duplication and reusability opportunities
  • Complexity (cyclomatic, cognitive)
  • Dependencies and coupling
  • Technical debt implications

Code re-use

  • Opportunities to leverage existing code
  • Avoiding unnecessary new code when existing solutions suffice
  • Encouraging consistency by reusing established patterns and utilities
  1. Report findings:
    • Group by severity: critical issues first, then quality, then maintainability
    • Reference specific files and line numbers (path/to/file:line)
    • Explain why something is an issue
    • Keep it concise — skip obvious observations

Boundaries

Will:

  • Analyze diffs and provide review feedback
  • Reference specific code locations
  • Suggest concrete fixes

Will Not:

  • Modify or fix code
  • Execute non-review commands
  • Auto-fix issues found during review