The Claude AI Community Discord is open.Join us

Code Reviewer

Anthropic's PR Review Toolkit includes a Claude Code subagent that checks a specified code diff against project guidelines and looks for actionable bugs. Its findings support human review; they do not prove the code is correct.

Is it right for your task?

Use it when
You have a bounded change and want a second review for bugs, missing handling, and deviations from documented project rules.
Skip it when
You need a security certification, an automatic merge decision, or a substitute for executing tests.
Start simpler
For a small diff, ask your current Claude Code session to review it with file/line evidence. Use a subagent when separate review context is useful.

Review staged changes without editing them

Example brief. Adapt it to your own test project.

Use the PR Review Toolkit code-reviewer to review git diff --cached against CLAUDE.md. Report actionable issues with file and line, a concrete failure scenario, and a suggested fix. Do not edit files, commit, push, or merge. If you cannot inspect part of the change, say so.

What to expect

A scoped list of findings with references and reasoning, or a statement that no sufficiently supported findings were identified. This is an illustrative request, not a recorded agent run.

Check the result

  • The review names staged changes as its scope.
  • Each finding points to a real changed line and explains a reproducible risk.
  • No edits, commits, or pushes occurred.
  • A clean review is not treated as proof that tests or security checks passed.

Before you start

  • Claude Code with access to the repository and diff you want reviewed.
  • A clear scope: unstaged edits, staged edits, a commit, or a branch comparison.
  • Project rules in CLAUDE.md where available, and a clean understanding of which changes are yours.
Claude Code
Agent definition is published in Anthropic's PR Review Toolkit plugin. Its source specifies the opus model alias.
Claude.ai / API
Not established by this agent file. A plugin subagent is not automatically a hosted or scheduled agent.

Setup and first use

  1. Open the toolkit setup instructions below and install the PR Review Toolkit, which includes several reviewers rather than this agent alone.
  2. Start a new Claude Code session and confirm code-reviewer is available in /agents.
  3. Ask for code-reviewer explicitly and identify the diff. Its default review scope is unstaged changes, which will miss staged-only changes unless you specify them.
  4. Read each finding against the cited code. Reproduce the issue and run relevant tests before changing code or opening the pull request.
Open installation options

Access, cost, and limits

What access are you granting?

The source does not declare a restricted tools allowlist. Check effective tools and permissions in your Claude Code configuration. The request not to edit is an instruction, not a security boundary; do not assume read-only isolation. Stop an active run if it exceeds the review scope. Disable or uninstall the parent toolkit through the plugin manager to remove its agents; previous repository changes are not undone.

What does it cost?

The definition specifies opus. Claude plan limits or API billing apply to the review work; actual cost varies with repository scope and context. No independent runtime or cost benchmark is available.

Limitations to keep in mind

  • The confidence score in an agent response is a model judgment, not a calibrated probability or independent verification.
  • The source filters for high-confidence findings and can miss real bugs.
  • This directory has checked the source, not executed this agent or measured review accuracy.

If something goes wrong

Review says there are no changes

Check whether your work is staged or committed. Name git diff --cached or the exact branch/commit range rather than relying on the unstaged default.

The agent is not listed

Check the toolkit installation and current project scope, then restart the session and inspect /agents.

A finding does not match the code

Ask for the exact line and failure scenario, inspect them yourself, and reject findings that cannot be supported.

Sources and review scope

Publisher: Anthropic, PR Review Toolkit. This editorial guide checks published documentation, not runtime behavior. The examples and acceptance checks are our suggested exercises.

Reviewed 2026-09-21. Recheck due 2026-10-21, or sooner if setup changes. No installation or workflow execution is claimed.

Report an issue with this guide

Install

Direct install not available yet

Direct install is not available yet.