ModulesPhase 3: Working at scale

13. Review gates

/code-review/security-review/autofix-pr
The 30-second answer

"Claude Code reviews code at several points, and each one is a different tool. /code-review (alias /review) finds correctness bugs in your branch, a pull request, or a path, at an effort level you choose, and can apply the fixes. /code-review ultra sends a fleet of reviewer agents to a cloud sandbox that verifies every finding before reporting it. /security-review does one security pass over your branch. Code Review is the managed service that reviews every pull request for a Team or Enterprise organization. /autofix-pr puts a cloud session on your PR to fix CI failures and review comments, and /simplify cleans up working code. None of them is a merge gate: they advise, and the decision to merge stays with people and with your CI."

The architect's line: a review with no findings is not proof the code is safe. The docs say so themselves.

Say it yourself first, then compare.
See it

8 pictures, in order.

Use the arrow keys or the dots. Tap a picture to see it full size.

Five ways to get a code review1 of 8
Know it

The facts someone can check.

Five ways to get a review
Option What starts it Where it runs Who can use it
Code Review (managed) Pull request activity, or an @claude review comment Anthropic infrastructure Team and Enterprise, once an Owner turns it on
/code-review You, on your branch, a PR, or a path Your session Anyone, any plan
/code-review ultra You; Claude never starts it on its own A cloud sandbox Needs a claude.ai sign-in
Claude in your CI Your pipeline's events Your own CI runners Anyone with an API key or cloud credentials
Your own reviewer You or Claude, in a session Wherever Claude Code runs Anyone who writes one as a subagent or skill
/code-review (alias /review)
  • Runs as a background subagent with its own context, so it doesn't fill your conversation. Findings arrive when it finishes.
  • Effort levels are low, medium, high, xhigh, max, and ultra. Low reports only the findings it's most confident in. Medium through max widen the coverage. With no level typed, it reuses the last low to max level you typed, even from an earlier session.
  • Targets: nothing (your branch's commits ahead of upstream plus uncommitted changes), a PR number (/code-review 1234), a branch range (main...my-feature), a commit range (HEAD~15..HEAD), or a path (src/auth).
  • Flags: --fix applies the findings (through your permission mode); --comment posts them inline on a GitHub PR or as a note on a GitLab merge request; --max-findings n or all changes how many it reports.
  • It follows your CLAUDE.md. It does not read REVIEW.md, which configures only the managed service.
  • Since v2.1.223, /review is an alias. Before that it was a separate, single-pass PR review.
/code-review ultra (ultrareview, alias /ultrareview)
/code-review /code-review ultra
Runs In your session In a cloud sandbox
Depth Scales with effort A multi-agent fleet; every finding independently verified
Time Seconds to minutes Roughly 15 to 25 minutes
Cost Normal usage 3 free runs on Pro and Max (one-time), then typically $5 to $25 in usage credits
  • A branch review uploads your repository state; a PR review clones from GitHub and uploads nothing. Default ceiling: 500 changed files and 8,000 changed lines.
  • For CI, use the claude ultrareview subcommand. It waits for the findings (45-minute default timeout) and exits 0 when done, 1 on failure, 130 if interrupted. claude -p '/code-review ultra' exits before findings arrive, so it's the wrong tool for a pipeline.
  • --post puts the findings on a GitHub.com PR as one plain comment from your account. It isn't a review or an approval, and it never posts unless you choose it.
  • Not available with an API-key-only sign-in, on Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry, or with Zero Data Retention or HIPAA; in those cases it runs a local review instead. Organizations using customer-managed keys can't run it.
Code Review, the managed service
  • An Owner turns it on for a Team or Enterprise organization. Several agents find issues in parallel, a step verifies them against the code, the rest are ranked, and the review posts inline comments, a summary, and a check run.
  • Severity: Important (fix before merging), Nit (minor), Pre-existing (a real bug this PR didn't introduce).
  • Review level per organization or repository: Quick, Standard (default), or Deep.
  • When it runs, per repository: after every push (where a newly added repository starts), once when the PR opens, or only on @claude review. @claude review always subscribes one PR to every push.
  • It never approves or blocks a pull request, and its check run never concludes as a failure. REVIEW.md is read from the base branch, never from the PR, so a PR can't loosen its own review.
  • Billed to the organization as usage credits, with a monthly spend limit. Not available with Zero Data Retention, HIPAA, or customer-managed keys.
Security review is a stack
Moment Tool What it covers
While Claude writes Security guidance plugin Claude's own changes, checked on each edit, each turn, and each commit it makes
When you ask /security-review One pass over your branch's diff against origin's default branch: injection, auth issues, data exposure
When you ask, deeply Claude Security plugin A multi-agent scan of a repository or diff, with findings reviewed independently and patches you choose
Every pull request Code Review Correctness and security, with full codebase context
Managed Claude Security product Hosted scanning of connected repositories (Enterprise)
In CI Your existing scanners Static analysis, dependency and supply-chain checks, policy

The security guidance plugin's three checkpoints have their own numbers: a pattern match on each edit with no model call; a background review of up to 30 changed files at the end of each turn, at most 3 times in a row; and a deeper review on commits Claude makes, capped at 20 an hour. None of the layers blocks a write or a commit. /security-review needs an origin remote.

/simplify and /autofix-pr
  • /simplify [target] runs four review agents in parallel (reuse of existing helpers, simplification, efficiency, and whether the change sits at the right level of abstraction), then applies the fixes. It does not look for bugs. Before v2.1.147, the bug-finding command carried that name; scripts that still call /simplify for bugs should switch to /code-review --fix.
  • /autofix-pr [prompt] runs on the PR's branch, finds the PR with gh pr view, and starts a cloud session subscribed to that PR. When CI fails or a reviewer comments, Claude pushes a clear fix, asks you about anything ambiguous, and notes duplicates. It can't see merge conflicts, because GitHub sends no event when the base branch moves. Its thread replies post under your GitHub name, labeled as Claude Code, which can trigger comment-driven automation like Atlantis. Needs the gh CLI, cloud sessions, and the Claude GitHub App.
Review in CI: /install-github-app
  • Installs the Claude GitHub App, saves a repository secret (ANTHROPIC_API_KEY, or CLAUDE_CODE_OAUTH_TOKEN for a subscription), pushes a branch with the workflow files you pick, and opens a pull request for you to merge. Needs repository admin and the gh CLI. GitHub.com only.
  • Interactive mode (no prompt in the workflow) waits for @claude in a comment. Automation mode (a prompt in the workflow) runs on any event, including a schedule.
  • The review workflow runs the code-review plugin with --comment, posting inline comments and skipping drafts.
  • Only users with write access can trigger runs on issues and PRs, and bots are rejected unless listed in allowed_bots.
  • For an organization, store an API key as an org-level secret rather than one person's OAuth token, or avoid stored secrets entirely with OIDC federation.
  • Each run costs GitHub Actions minutes plus tokens. Cap it with --max-turns, job timeouts, and concurrency limits.
  • If the managed Code Review runs on the same repository, @claude review triggers the Action too. Give the Action its own trigger_phrase.
Quiz

Answer out loud, then flip the card.

Mark each one honestly. Cards you miss stay flagged for review, in this browser.

0 of 8 right
Question 1

A security lead asks: "Claude Code Review found nothing on this PR. Can we ship it?"

Not on that basis alone. The Code Review docs say plainly that a review with no findings doesn't mean the code is error-free or secure. It is one layer. Ship on your normal gates: tests, required checks, deterministic scanners such as secret and dependency scans, and human approval. Code Review never approves or blocks a PR, by design.

Question 2

What's the difference between /code-review high and /code-review ultra?

high is a local review in your session at a wider coverage setting, taking seconds to minutes on your normal usage. ultra is a different engine: a fleet of reviewer agents in a cloud sandbox that independently reproduces each finding before reporting it. It takes roughly 15 to 25 minutes and, after 3 free runs on Pro and Max, typically costs $5 to $25 in usage credits. Use local reviews while iterating, ultra before merging something substantial.

Question 3

A customer on Amazon Bedrock runs /code-review ultra. What happens?

It runs a local review in their session instead. Ultrareview needs a claude.ai sign-in and isn't available on Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, or for organizations with Zero Data Retention or HIPAA configured. Organizations using customer-managed keys can't run it at all. The managed Code Review service also needs a Claude organization plan, even if developers use Bedrock day to day.

Question 4

How would you add an AI review step to a GitHub Actions pipeline?

Run /install-github-app in the repository: it installs the Claude GitHub App, stores the secret, and opens a PR with the workflow files. Choose the review workflow, which runs the code-review plugin with --comment to post inline findings. For a blocking cloud review in a script, use the claude ultrareview subcommand and branch on its exit code. Keep deterministic checks as the required gates; the AI review informs reviewers.

Question 5

A developer ran /simplify expecting it to find bugs. What do you tell them?

/simplify is cleanup only: four agents look at reuse, simplification, efficiency, and abstraction level, then apply fixes. It doesn't hunt for bugs. For bugs, run /code-review, and add --fix to apply what it finds. The confusion is historical: before v2.1.147, the bug-finding command had the /simplify name.

Question 6

Can a developer weaken the managed review by editing REVIEW.md in their own pull request?

No. Code Review reads REVIEW.md from the base or default branch, never from the pull request's own changes. And comment commands like @claude review only start a review when they come from someone with write access to the repository.

Question 7

Does /security-review scan the whole codebase?

No. It reviews the diff between your current branch and origin's default branch. For existing code, ask Claude to review a specific file or directory, or use the Claude Security plugin for a multi-agent scan of the whole repository. It's one layer of a stack that also includes the security guidance plugin while Claude writes, Code Review on PRs, and your existing scanners in CI.

Question 8

What risk do you flag before turning on /autofix-pr for a repository?

Claude replies to review threads under your GitHub username, labeled as Claude Code. If the repository runs comment-triggered automation, such as Atlantis, Terraform Cloud, or GitHub Actions on issue_comment, those replies can trigger it. The docs suggest not enabling auto-fix where a PR comment can deploy infrastructure. Also, it can't see merge conflicts, so someone still has to ask for a rebase.

Traps

Wrong answers that sound right.

Before you tap, say why each one is wrong.

Try it

Three moves in a fresh project.

Facts checked against code.claude.com/docs/en/code-review-local, ultrareview, code-review, code-review-pull-requests, code-review-costs, security-guidance, claude-security, security, claude-code-on-the-web, github-actions, and commands on 2026-10-25. Claude Code ships fast: confirm anything that matters against the official docs.