/code-review
Spawns the code-reviewer agent to analyze your current changes and provide structured feedback.
Steps
Gather context — detect the scope of changes to review:
- If arguments are provided (file paths or PR number), use those as scope
- Otherwise, use
git diff(unstaged) andgit diff --cached(staged) to determine what changed - Run
git log --oneline -5for recent commit context
Spawn the agent — use the Task tool:
Task tool with subagent_type="code-reviewer"Pass in the prompt:
- The diff output (or file contents if reviewing specific files)
- The list of changed files
- Any project conventions from
.claude/rules/that apply
Present findings — relay the agent's review to the user:
- Group by severity: CRITICAL > WARNING > NIT > PRAISE
- Include file paths and line numbers
- Show suggested fixes for each finding
Offer follow-up actions:
- "Fix critical issues?" — apply suggested fixes
- "Run tests?" — verify fixes do not break anything
- "Review again?" — re-run after changes
Converted and distributed by TomeVault — claim your Tome and manage your conversions.