Run a Claude advisory review pass over current changes. Use for correctness, risk, and UX findings with file/line citations.
Run a focused review with Claude. Do not edit files.
/claude-review — inline findings (default)/claude-review --json-file — strict JSON output to temp file for machine parsingGather scope before invocation:
git status -sbgit diff --name-onlygit diff --cached --name-onlygit ls-files --others --exclude-standardgit diff --shortstatgit diff --cached --shortstatIf no changes are present, report "No changes to review" and stop unless user explicitly asked for pre-implementation review.
Use INVOC_ID () for invocation-unique naming. This supports concurrent skill invocations within a session. Get the literal value first via , then use that literal in all file paths. The Read tool does not expand shell variables — use the numeric literal in Read paths. Fallback: if process model changes.
${PPID}-${RANDOM}INVOC_ID="${PPID}-${RANDOM}"; echo "INVOC_ID=$INVOC_ID"mktemp -dclaude --version to confirm the CLI is available.claude -p --permission-mode plan --output-format text --max-turns 1 \
"You are performing a code and product review. Return prioritized findings (P0/P1/P2) with exact file paths and line numbers. For each finding include impact, confidence, and concrete fix. End with a short agreement-target checklist. Return full results inline. Do not ask to create/write files."
--json-file)rm -f /tmp/claude-review-$INVOC_ID.json /tmp/claude-review-$INVOC_ID.err
claude -p --permission-mode plan --output-format json --max-turns 1 \
"Review the current diff and return STRICT JSON with keys: summary, issues, verdict, confidence, agreement_targets." \
> /tmp/claude-review-$INVOC_ID.json 2>/tmp/claude-review-$INVOC_ID.err; EC=$?; echo "Exit code: $EC"
Use the Bash tool's run_in_background parameter set to true (do NOT set timeout) in --json-file mode only.
--json-file mode/tmp/claude-review-<INVOC_ID>.json/tmp/claude-review-<INVOC_ID>.errrm -f /tmp/claude-review-$INVOC_ID.json /tmp/claude-review-$INVOC_ID.err
| Scenario | Action |
|---|---|
| Non-zero exit | Read stderr, report error, stop |
| Empty output | Report "Claude produced no output", include stderr |
Invalid JSON (--json-file mode) | Report parse failure and show raw output |
--permission-mode plan to keep the pass read-only.claude -p --resume <session-id>.