claude-review
claude-review
Run a multi-round code review loop where Claude Code reviews code non-interactively. Designed for use inside Codex — Codex writes code, Claude reviews it, Codex incorporates feedback, repeat.
Prerequisites
claudeCLI installed and authenticated (Claude Code)- Current directory must be a code project
Trigger
Activate when the user mentions "claude review", "let claude review", "claude 看看", or wants Claude to review code.
Usage
/claude-review [scope] [focus]
- scope (optional): what to review
uncommitted(default) — review working tree changescommit— review the last commitbranch— review current branch vs main
- focus (optional): custom review instructions
Examples:
/claude-review
/claude-review branch focus on error handling
/claude-review commit check for security issues
Workflow
Step 1: Initial Review
Build the review command based on scope:
# For uncommitted changes (default)
git diff --no-color HEAD | claude -p "Review this diff. Focus on: bugs, security, error handling, edge cases. Be specific about file and line. Output findings as a numbered list. ${FOCUS}"
# For last commit
git show --no-color HEAD | claude -p "Review this commit. ${FOCUS}"
# For branch vs main
git diff --no-color main...HEAD | claude -p "Review these branch changes. ${FOCUS}"
If there's no diff, check for untracked files:
git diff --no-color && git diff --no-color --cached && git ls-files --others --exclude-standard
Parse Claude's output — it returns a markdown review with findings.
Step 2: Evaluate Findings
Read Claude's review output. Categorize:
- Critical — bugs, security, data loss → must fix
- Important — performance, error handling → should fix
- Suggestions — style, naming → nice to have
If no significant issues found, report "Claude approved" and stop.
Step 3: Fix Issues
Apply fixes for Critical and Important findings. Skip style-only suggestions unless the user asked.
Step 4: Re-review
Run the review again with context from previous round:
git diff --no-color HEAD | claude -p "Previous review found these issues: [summary]. Verify they are fixed and check for new issues. ${FOCUS}"
Step 5: Loop Control
- Max rounds: 3 (default)
- Exit conditions:
- Claude reports no significant issues
- Max rounds reached
- User interrupts
Step 6: Summary
Present:
- Total rounds
- Issues found/fixed per round
- Remaining suggestions
- Final verdict
Notes
claude -pruns non-interactively (print mode) — outputs review and exits- Each call is stateless; pass previous context via the prompt
- The review sees the current working tree, so all Codex edits are visible
- If
claudeis not installed, tell the user to install Claude Code - Works in both Codex and any other agent that can run shell commands
More from verneagent/tiny-skills
inscribe
Capture rules, conventions, or code style guidelines into documentation files. Use when the user says "inscribe", "learn", "remember this rule", "add convention", or wants to persist coding guidelines.
4lark-share
Share a knowledge insight or message with a team via Lark group chat webhook. Use when the user says "share", "lark-share", or wants to send a formatted message to a Lark group.
4multi-gh
Fix and standardize GitHub multi-account workflows with gh account switching, SSH host aliases, and safe remote setup. Use when creating repos, pushing code, or diagnosing GitHub auth mismatches across multiple identities.
2retro
Retrospective on mistakes or new conventions — analyze patterns, find root causes, and propose deterministic prevention (static checks > lint > tests > runtime > review > docs). Use when the user says "retro", "反省", "复盘", "怎么防", "how to prevent", or wants to enforce a new convention.
2wksp
Open a new iTerm2 tab with Claude in a worktree or folder, optionally entering handoff mode.
1netmap
Show all network interfaces, LAN neighbors, and Tailscale peers on the current machine. Use when the user asks about network status, neighbors, connected devices, or Tailscale peers.
1