Skip to main content
Glama

Run Claude Code Review

claude_code_review
Destructive

Runs a parallel code review over a repository, PR, branch, working directory, or last commit and returns a markdown report with confidence-scored findings; optionally applies fixes to files.

Instructions

Run Claude Code's code-review skill (a diff-sized fleet of parallel reviewer subagents, 0-100 confidence scoring, keeps findings >=75). Every finished reviewer subagent's report is captured the moment it lands — appended to a durable JSONL file and visible via claude_review_status while the run continues — and an agent killed mid-flight (e.g. a 429) is recovered from its output_file transcript, so a rate limit never wastes the work already paid for. on a repository and return the markdown report. Costs Claude API credits; a run typically takes 2-15 minutes. Afterwards, fix the code and re-run to verify, or use claude_review_followup with the returned session_id.

Input Schema

NameRequiredDescriptionDefault
prNoGitHub PR number or URL, e.g. "123" or "owner/repo#123" (for scope=pr, or as first choice in auto)
fixNoFix mode: after the report, Claude Code edits the repo files to fix the confirmed findings (Edit only, no git commands, no commit; .git and secret paths are deny-listed). Adds a '## Fixes Applied' section.
focusNoExtra review focus or instructions, e.g. '重点看并发安全'
modelNoClaude model override (passed as --model)
scopeNoauto: PR if pr given / branch ahead of baseRef (when given) or the default branch / working-dir changes / last commitauto
effortNoReview effort / reasoning level, same scale as Claude Code (--effort): low..max. Default max = exhaustive deep review (slower and pricier). Omit for the deepest default; pass low/medium for a fast, cheap pass.max
baseRefNoBase branch/tag for scope=branch and for scope=auto's branch step (default: auto-detect the default branch). A validated ref always reaches the reviewer — it is never silently dropped.
maxTurnsNoAgentic turn cap for the review session
pipelineNoWhich review engine runs. auto (default): claude's built-in /code-review command for levels low..high — it needs no file on disk; fix runs ride its own --fix flag. max (including effort=xhigh), scope=last-commit with no parent commit, and a shadowing code-review skill use the fleet pipeline. Only max uses the MCP's own fleet pipeline, because the built-in hands max to subagents whose exploration commands the locked-down permission mode denies. native: force the built-in command (refused when a same-named skill in the Claude config dir shadows it). fleet: force the fleet pipeline (its instructions travel in the prompt; nothing is installed). skill: legacy — use/optionally install the bundled skill (the only mode that may write to disk).auto
postToPRNoAlso post the summary comment to a GitHub PR via gh. Requires a fully-qualified pr — "owner/repo#123" or a GitHub PR URL; a bare number is refused because gh would resolve it against the reviewed repository's remote (default false — report only).
repoPathYesAbsolute path to the git repository to review (the review runs with cwd=repoPath; ~/ prefix allowed)
ultracodeNoEnable claude's Ultracode mode for this run (the `ultracode` settings key): standing dynamic-workflow orchestration — every substantive step goes through the native Workflow tool, multi-agent and token-cost-no-object. Orthogonal to effort (any effort level). Requires a claude CLI that supports the key; older builds ignore it (see workflowRuns in the result).
reviewLevelNoThe REVIEW's own depth level — the same argument claude's native /code-review command takes. The fleet has the same three-phase structure as the native playbook (finder -> one verifier per surviving candidate -> sweep), with these numbers (rendered from FLEET_NUMBERS in src/prompt.js): low = one pass, no subagents (<= 4 findings); medium/high = 8 finders (3 extra finders split briefs on top of the 5 briefs) x up to 6 candidates, findings capped at 8; max = 10 finders (every brief split) x up to 8 candidates + one verifier per surviving candidate + 1 sweep finder, findings capped at 15; at most 20 candidates reach verification. Defaults to a mapping of effort (max/xhigh->max, high->high, medium->medium, low->low). Separate knob from the CLI reasoning effort and from ultracode.
maxBudgetUsdNoAPI spend cap via --max-budget-usd. DEFAULT 0 = NO CAP at any effort level: a cap stops the parent before it synthesizes, and every finished subagent report is already captured incrementally (and recovered from output_file), so a 429/token exhaustion no longer wastes it. The wall-clock timeout (timeoutMinutes) is the guard. Set a number only if you want a hard spend stop; env CLAUDE_REVIEW_MAX_BUDGET_USD sets the DEFAULT for this argument (an explicit value here always wins). On third-party gateways this depends on usage data the gateway returns.
waitForResultNoBlock until the review finishes and return the report synchronously (2-15 min). Default false: returns a jobId after a fast preflight — poll claude_review_status(jobId). Only set true if your MCP client has no ~30s tool-call timeout.
outputLanguageNoLanguage for the report, e.g. "中文" or "English"中文
timeoutMinutesNoHard wall-clock timeout for the run — with no spend cap by default this is the guard; every finished subagent report is kept even when it fires
installSkillIfMissingNoOnly meaningful with pipeline=skill: when the bundled skill is MISSING, install it into the Claude config dir (default false — a missing skill degrades to the inline fleet pipeline instead; a MANAGED existing copy is refreshed whenever it is about to be used; a user-managed copy is never touched). env CLAUDE_REVIEW_AUTO_INSTALL_SKILL=1 sets the default

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv1.18.9
    • changedInput schema / properties / baseRef / description
      Previous value: -"Base branch/tag for scope=branch (default: auto-detect the default branch)"New value: +"Base branch/tag for scope=branch and for scope=auto's branch step (default: auto-detect the default branch). A validated ref always reaches the reviewer — it is never silently dropped."
    • changedInput schema / properties / effort / default
      Previous value: -"high"New value: +"max"
    • changedInput schema / properties / effort / description
      Previous value: -"Review effort / reasoning level, same scale as Claude Code (--effort): low..max. max/xhigh = exhaustive deep review, slower and pricier."New value: +"Review effort / reasoning level, same scale as Claude Code (--effort): low..max. Default max = exhaustive deep review (slower and pricier). Omit for the deepest default; pass low/medium for a fast, cheap pass."
    • changedInput schema / properties / installSkillIfMissing / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / installSkillIfMissing / description
      Previous value: -"Auto-install the bundled code-review skill into ~/.claude/skills when missing (default true)"New value: +"Only meaningful with pipeline=skill: when the bundled skill is MISSING, install it into the Claude config dir (default false — a missing skill degrades to the inline fleet pipeline instead; a MANAGED existing copy is refreshed whenever it is about to be used; a user-managed copy is never touched). env CLAUDE_REVIEW_AUTO_INSTALL_SKILL=1 sets the default"
    • changedInput schema / properties / maxBudgetUsd / description
      Previous value: -"API spend cap for this run via --max-budget-usd (default 5); 0 disables. On third-party gateways this depends on usage data the gateway returns."New value: +"API spend cap via --max-budget-usd. DEFAULT 0 = NO CAP at any effort level: a cap stops the parent before it synthesizes, and every finished subagent report is already captured incrementally (and recovered from output_file), so a 429/token exhaustion no longer wastes it. The wall-clock timeout (timeoutMinutes) is the guard. Set a number only if you want a hard spend stop; env CLAUDE_REVIEW_MAX_BUDGET_USD sets the DEFAULT for this argument (an explicit value here always wins). On third-party gateways this depends on usage data the gateway returns."
    • addedInput schema / properties / pipeline
      Added value: +{
      +  "default": "auto",
      +  "description": "Which review engine runs. auto (default): claude's built-in /code-review command for levels low..high — it needs no file on disk; fix runs ride its own --fix flag. max (including effort=xhigh), scope=last-commit with no parent commit, and a shadowing code-review skill use the fleet pipeline. Only max uses the MCP's own fleet pipeline, because the built-in hands max to subagents whose exploration commands the locked-down permission mode denies. native: force the built-in command (refused when a same-named skill in the Claude config dir shadows it). fleet: force the fleet pipeline (its instructions travel in the prompt; nothing is installed). skill: legacy — use/optionally install the bundled skill (the only mode that may write to disk).",
      +  "enum": [
      +    "auto",
      +    "native",
      +    "fleet",
      +    "skill"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / postToPR / description
      Previous value: -"Also post the summary comment to the GitHub PR via gh (default false — report only)"New value: +"Also post the summary comment to a GitHub PR via gh. Requires a fully-qualified pr — \"owner/repo#123\" or a GitHub PR URL; a bare number is refused because gh would resolve it against the reviewed repository's remote (default false — report only)."
    • addedInput schema / properties / reviewLevel
      Added value: +{
      +  "description": "The REVIEW's own depth level — the same argument claude's native /code-review command takes. The fleet has the same three-phase structure as the native playbook (finder -> one verifier per surviving candidate -> sweep), with these numbers (rendered from FLEET_NUMBERS in src/prompt.js): low = one pass, no subagents (<= 4 findings); medium/high = 8 finders (3 extra finders split briefs on top of the 5 briefs) x up to 6 candidates, findings capped at 8; max = 10 finders (every brief split) x up to 8 candidates + one verifier per surviving candidate + 1 sweep finder, findings capped at 15; at most 20 candidates reach verification. Defaults to a mapping of effort (max/xhigh->max, high->high, medium->medium, low->low). Separate knob from the CLI reasoning effort and from ultracode.",
      +  "enum": [
      +    "low",
      +    "medium",
      +    "high",
      +    "max"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / scope / description
      Previous value: -"auto: PR if pr given / branch ahead of default / working-dir changes / last commit"New value: +"auto: PR if pr given / branch ahead of baseRef (when given) or the default branch / working-dir changes / last commit"
    • changedInput schema / properties / timeoutMinutes / default
      Previous value: -20New value: +30
    • changedInput schema / properties / timeoutMinutes / description
      Previous value: -"Hard wall-clock timeout for the run"New value: +"Hard wall-clock timeout for the run — with no spend cap by default this is the guard; every finished subagent report is kept even when it fires"
    • addedInput schema / properties / ultracode
      Added value: +{
      +  "default": false,
      +  "description": "Enable claude's Ultracode mode for this run (the `ultracode` settings key): standing dynamic-workflow orchestration — every substantive step goes through the native Workflow tool, multi-agent and token-cost-no-object. Orthogonal to effort (any effort level). Requires a claude CLI that supports the key; older builds ignore it (see workflowRuns in the result).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / waitForResult / description
      Previous value: -"Block until the review finishes and return the report synchronously (2-15 min). Default false: returns a jobId at once — poll claude_review_status(jobId). Only set true if your MCP client has no ~30s tool-call timeout."New value: +"Block until the review finishes and return the report synchronously (2-15 min). Default false: returns a jobId after a fast preflight — poll claude_review_status(jobId). Only set true if your MCP client has no ~30s tool-call timeout."
  2. Changed1 schema field changedv1.8.2
    • addedInput schema / properties / waitForResult
      Added value: +{
      +  "default": false,
      +  "description": "Block until the review finishes and return the report synchronously (2-15 min). Default false: returns a jobId at once — poll claude_review_status(jobId). Only set true if your MCP client has no ~30s tool-call timeout.",
      +  "type": "boolean"
      +}
  3. First observedv1.6.0

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, and the description is consistent with that, disclosing that fix mode edits repo files and pipeline=skill may write to disk. Beyond the annotations it adds genuinely useful behavior: API credit cost, a 2-15 minute runtime, incremental capture of each finished subagent report to a durable JSONL file, recovery of killed agents from output_file transcripts, and the default no-spend-cap with timeoutMinutes as the guard.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The cost and duration facts are front-loaded, which is good, but the opening sentence is a long em-dash-heavy run-on and the clause 'on a repository and return the markdown report' is grammatically detached from its subject, forcing a re-read. The content earns its place, but the structure is denser than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter, no-output-schema tool, the description covers the essentials an agent needs before calling: cost, expected duration, the async jobId/polling model, and the follow-up path. It does not explain the return payload shape, though the mention of session_id and the markdown report partially compensates.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every one of the 18 parameters is already documented in the schema, which sets the baseline at 3. The description adds surrounding context (cost, duration, session_id return) but no parameter-level detail beyond what the schema already states, so it does not exceed the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Run Claude Code's code-review skill') and immediately characterizes the mechanism (parallel reviewer subagents, 0-100 confidence scoring, findings >=75). It also names the sibling tools claude_review_status and claude_review_followup, so an agent can distinguish this entry point from the polling and follow-up tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context: run on a repository, then 'fix the code and re-run to verify, or use claude_review_followup with the returned session_id', and it points to claude_review_status for polling when waitForResult is false. It stops short of explicit when-not-to-use guidance or a full routing rule among the four siblings, so it is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.