nicolas-codemate

code-review

Performs code review via isolated fresh agent with no conversation context. Use when running /resolve workflow step 08, /review-code command, or when user asks to "review code", "review changes", or "code review". Delegates to code-reviewer subagent to prevent confirmation bias.

nicolas-codemate 0 Updated 3mo ago
GitHub

Install

npx skillscat add nicolas-codemate/claudecodeconfig/code-review

Install via the SkillsCat registry.

SKILL.md

Code Review Skill

Orchestrates code review by delegating to an isolated code-reviewer agent.

Purpose

The review MUST be performed by a fresh agent with NO prior conversation context.
This prevents confirmation bias - an agent that participated in the implementation
unconsciously validates its own approach instead of questioning it.

- **NEVER** review the code yourself in the current context - **ALWAYS** delegate to a Task agent (subagent_type: "code-reviewer") - The agent receives ONLY: ticket content, plan content, git diff, and project CLAUDE.md - NO conversation history, NO implementation reasoning, NO debugging context - The agent prompt must be fully self-contained (all text inline, no file paths to read) - Display the agent's review report VERBATIM - do not filter or soften findings

Inputs

Required context (gathered by YOU, passed inline to the agent):

  • Ticket content (ticket.md text)
  • Implementation plan (plan.md text)
  • Git diff of changes
  • Project CLAUDE.md (conventions)

Process

Step 1: Gather Context (you do this)

  1. Read ticket from .claude/feature/{ticket-id}/ticket.md -> TICKET_CONTENT
  2. Read plan from .claude/feature/{ticket-id}/plan.md -> PLAN_CONTENT
  3. Read project CLAUDE.md from project root -> PROJECT_RULES
  4. Get git diff and stats:
    git diff {base-branch}...HEAD
    git diff {base-branch}...HEAD --stat

Step 2: Delegate to Fresh Agent

Task:
  subagent_type: code-reviewer
  description: "Fresh code review {ticket-id}"
  prompt: |
    You are reviewing code for ticket {ticket-id}.
    You have NO prior knowledge of this implementation. Review with fresh eyes.

    <ticket>
    {TICKET_CONTENT}
    </ticket>

    <implementation_plan>
    {PLAN_CONTENT}
    </implementation_plan>

    <project_conventions>
    {PROJECT_RULES}
    </project_conventions>

    <diff_stats>
    {DIFF_STATS}
    </diff_stats>

    <diff>
    {DIFF_CONTENT}
    </diff>

    Perform a complete code review following your review process.
    Return the full review report in markdown format.

Step 3: Present Results

Display the review report returned by the agent verbatim.

Step 4: Save Report

Write review report to .claude/feature/{ticket-id}/review.md

Configuration

From .claude/ticket-config.json:

{
  "review": {
    "enabled": true,
    "auto_fix": false,
    "severity_threshold": "important",
    "block_on_critical": true
  }
}

Status Values

  • pending: Review not yet started
  • in_progress: Review in progress
  • completed: Review finished successfully
  • skipped: Review skipped (disabled or no implementation)
  • failed: Review encountered an error

Integration

Invoked by:

  • /resolve workflow (step 08-review)
  • /review-code standalone command