TL;DR
- Start before the pull request. Run
/code-reviewon your branch, which works on any plan, or a fresh-context subagent with Edit and Write removed. - Put your rules in
CLAUDE.mdfirst./code-reviewdoes not readREVIEW.md. The paid service does. - Add one automatic reviewer on one repository. Tune its rules for a few weeks, then widen, and cap the rounds of review.
- Keep a person on the merge. The service never blocks a merge. A block is a branch rule you set yourself.
Our pick is /code-review today, and the Action or the service once one repository shows you need it. We have not run /code-review for this post. Its commands come from the docs, with no version checked, and the results below are Anthropic's own and self-reported. Further down, we show the setup we do run.
Which reviewer should you use?
| Option | Needs | Your rules live in | Cost |
|---|---|---|---|
/code-review | Any plan | CLAUDE.md | Your plan's usage or API billing |
| Your own reviewer subagent | A file in .claude/agents/ | Its own prompt | The same usage limits as your conversation |
| Claude Code GitHub Action | An API key or OAuth token, as a repo secret | The workflow prompt and CLAUDE.md | GitHub Actions minutes, plus API tokens or your subscription |
| Code Review service | A Team or Enterprise plan, and a GitHub repository | CLAUDE.md and REVIEW.md | Usage credits, separate from your plan |
Start with one of the top two. Move to the Action when you want to control the prompt, model and triggers yourself, and to the service when you would rather not maintain a workflow file.
To try the Action on one repository, you need admin access. Open claude there, run /install-github-app, and select the review workflow. Claude Code installs the app, adds your secret and prepares the pull request. Merge it, and reviews post on your pull requests. In a workflow of your own, keep --comment. Without it, the findings stay in the run log.
What does the Claude Code team do?
The team's article reports that from June to September, merged pull requests to its codebase more than doubled while the share reverted fell by more than 40 percent. That is self-reported, and it comes from a whole system. Four parts matter to a smaller team, sorted here by what each one needs:
- Proof before the PR (any plan). Claude runs tests, a build or a screenshot comparison and shows the output. Then a subagent reviews the diff with fresh context.
- A limit on rounds (any plan, counted by hand). Review has to end.
- A reviewer on every PR (the Action or the service). Findings are posted on the PR. On the team's own repos, authors fix each one or close the thread with a reason.
- Approval by risk (GitHub settings and a written rule). The change sets the tier, not the author.
How do you review before the PR?
/code-reviewWith no target, the command covers your branch's commits ahead of its upstream, plus your uncommitted changes. In a terminal it runs as a background subagent, so it does not fill your conversation. Three options to learn first:
| You type | What changes |
|---|---|
/code-review low | It reports the findings it is most confident in, so you see fewer false positives. Later runs reuse a level you type |
/code-review --fix | It also asks Claude to apply the findings |
/code-review --comment | It posts the findings on the GitHub pull request as inline comments |
One trap with --fix: a background review edits outside your session's checkpoints, and the docs say to use git to revert those edits. So commit first.
To write your own reviewer, save a file as .claude/agents/code-reviewer.md. The subagent docs give a read-only reviewer as an example. This short version is ours, so change it to fit your repo:
---
name: code-reviewer
description: Reviews the current diff with fresh context. Use before opening a pull request.
tools: Read, Grep, Glob, Bash
---
Review the diff against the base branch. Report correctness bugs first.
Give a file and line for every finding, and say how you confirmed it.
Say plainly when there is nothing to fix. Do not edit files.The tools field is an allowlist, so Edit and Write are out. Bash can run more than git diff, so read any reviewer's tool list before you trust it.
Where do your team's rules go?
/code-review reads your CLAUDE.md and not REVIEW.md. The service reads both. So a rule that lives only in REVIEW.md does nothing on your laptop. The docs say to put guidance you want in both places in CLAUDE.md.
The team says its good REVIEW.md files are short: what failure looks like, a cap on nits, paths to skip, and a file and line as evidence. Here is our illustration of that shape:
# Review rules
- Important means: wrong behavior in production, data loss, or a security hole.
- Report at most five nits.
- Skip generated/, lockfiles and anything CI already enforces.
- Behavior claims need a file:line citation in the source, not an inference from naming.
- Start the summary with the count of findings. Say plainly when there is nothing to fix.When the reviewer keeps flagging the same thing, the team fixes it at the source: in the skill, with a lint rule or in these files.
What does our own setup look like?
We use a fresh-context reviewer subagent and a verify-and-review skill. This is the real instruction from our project:
Before saying anything is done, run the verify-and-review skill and give its report.
For architectural changes, also ask the slice-reviewer subagent for a fresh-context review.
Never claim runtime verification that didn't happen.These are not /code-review runs, because we do not use it. All our tests were green across backend, client and browser when a review found that a login flood could freeze the database. Another found a redirect check that a crafted address could bypass. Green tests only cover what the tests ask.
You can look for the same gap today. Both findings sat on load and untrusted-input paths, so list the ones your tests never exercise. Then name them for your reviewer in CLAUDE.md. This is a template to fill in:
Our tests do not cover [path or case]. Check it in every review.We still check every finding against the code, fix it test-first and check it again.
Which changes still need a person?
The service works from the diff and the surrounding code, without building or running it, so keep your CI. It also never approves or blocks a pull request. On the Claude Code team's own repos, a PR cannot merge while a finding from the bug or security review is open. If you want that, it is your branch rule to build.
The team sorts changes into three tiers: low needs no human approval once automated review and security checks are green, medium needs one person, high needs two. An agent's approval never counts as a person's.
Our advice: do not copy the bottom tier on day one. On the team's repos, it sits on classifiers, a merge queue, feature flags and fast rollback. Its own list says to start strict and loosen with evidence. It also says to use CODEOWNERS and branch protection so auth, billing, CI and release workflows, and installers always need a person, and to dismiss approvals on new commits.
On our project, a person steps in for architecture plans, paid runs and every merge to production.
How do you stop the agents looping?
The team reports one CLI PR that went through more than fifty rounds of review and fixes overnight before its author stopped it. When it ran git blame on what its reviewer kept flagging, about 59% was code that had been there since the reviewer's first pass. Its reading: the reviewer was rarely finding new bugs, and was finding a few more old ones each round.
Here are the team's four rules, with our untested translation:
| Their rule | How to run it yourself |
|---|---|
| After three rounds, the reviewer asks the author to reconsider the approach | Count rounds. On the third, stop and read the diff yourself |
| Re-review only the diff after the first few passes | Point /code-review at a revision range |
| Flag the class of bug | In your own reviewer's prompt, ask for every instance of the bug |
| No repeats of findings already posted | In your own reviewer's prompt, paste earlier findings and ask for new ones only |
What will it cost?
Local reviews count toward your plan's usage or API billing. The service has no flat per-review price: it is billed on token usage through usage credits. At the March launch, Anthropic said reviews generally average $15 to $25, scaling with PR size and complexity. That is a launch figure, so measure your own.
Look at Review runs first. A repository you add from the admin page starts at After every push, which multiplies cost by the number of pushes. The docs describe a pilot: set a monthly spend limit, turn the service on for a few representative repositories with Review runs set to Once after PR creation or Manual (@claude review), then multiply each repository's Average cost by the pull requests it opens in a month.
Pull requests from strangers
If you add Anthropic's separate security review Action, its README says it is not hardened against prompt injection and should only review trusted PRs. On a public repository, turn on "Require approval for all external contributors", so workflows run only after a maintainer has reviewed the PR.
On public repositories, GitHub withholds secrets from fork PR runs, so the Action's review workflow runs only on PRs from branches in the same repository. The service's automatic reviews skip PRs from forks.
Which components can you start from?
We name two from Explore: code-review (anthropics/knowledge-work-plugins, Apache-2.0) and thermo-nuclear-code-quality-review (cursor/plugins, MIT). Read the files before you install them. For one fitted to your repo, Build can draft a code-review skill from a brief.
What to do next
Add three lines to your CLAUDE.md today: what counts as a bug in this repo, what the reviewer should ignore, and "give a file and line for every finding". Then run /code-review low on your current branch and check each finding against the code. Count how many hold up. That count is your first measure of the reviewer.
Sources
- claude.dev/blog/solving-code-review-at-anthropic
- claude.com/blog/code-review
- code.claude.com/docs/en/code-review
- code.claude.com/docs/en/code-review-local
- code.claude.com/docs/en/code-review-customize
- code.claude.com/docs/en/code-review-costs
- code.claude.com/docs/en/github-actions
- code.claude.com/docs/en/sub-agents
- github.com/anthropics/claude-code-security-review



