# Code Review Inside the Agent: Skills and Plugins

URL: https://developertoolkit.ai/en/ecosystem/skills/code-review-skills/
Description: Built-in /code-review, the code-review and pr-review-toolkit plugins, Pocock, Superpowers, Trail of Bits and CodeRabbit review skills, and how to chain them.

Code review skills and plugins review a diff inside the coding agent before a pull request reaches a human. Claude Code 2.1.283 ships a built-in `/code-review`; plugins and skills add PR comments, specialist reviewers, spec checks, security review and a second model. They find likely defects but approve nothing: tests, CI and a named human still gate the merge.

The agent finishes a 600-line branch, says the tests pass, and you open the pull request knowing nobody will read all of it closely. You have also installed three things called "code review" and no longer know which one `/review` runs. This page is for developers who want the agent's work checked before they push, and for tech leads who want one review chain for the whole team instead of eight personal ones.

## What you get from this page on in-agent code review

- A decision table for eight review tools
- A worked run of `/code-review high` on a feature branch, with the flags that change its behaviour
- Install commands for Claude Code, Codex and Cursor, checked on 2026-09-26 against Claude Code 2.1.283, codex-cli 0.157.1 and the skills CLI 1.7.0
- A three-stage workflow: self-review, a second model, then a PR bot, and what each stage hands to the next
- Copy-paste prompts, a way to measure whether reviewers catch real bugs, and the traps that silently skip a review

## Which code review skill or plugin should you use?

"Code review" names at least eight different tools. They differ in what they read, where findings go and whether they edit your code.

| Tool | Who ships it | What it checks | Where findings go | Runs in |
| --- | --- | --- | --- | --- |
| `/code-review` (built-in, alias `/review`) | Anthropic, bundled | Correctness bugs in the diff, plus reuse, simplification and efficiency cleanups where the model's review recipe covers them | Your session; `--fix` applies them, `--comment` posts them to the PR | Claude Code |
| `code-review` plugin, `/code-review:code-review` | Anthropic, `claude-plugins-official` | A GitHub PR: `CLAUDE.md` compliance, obvious bugs, git history, earlier PR comments, code comments; drops findings scored below 80 | One PR comment posted through `gh` | Claude Code |
| `pr-review-toolkit`, `/pr-review-toolkit:review-pr` | Anthropic, `claude-plugins-official` | Six specialist subagents: comments, tests, silent failures, type design, general quality, simplification | Your session, grouped Critical / Important / Suggestion | Claude Code |
| Pocock `code-review` | `mattpocock/skills` | Two axes in parallel subagents: your documented standards, and whether the diff matches the spec or issue | Your session, under `## Standards` and `## Spec` | Any agent that reads skills |
| `requesting-code-review` / `receiving-code-review` | `obra/superpowers` | Requesting: a reviewer subagent checks each task against the plan. Receiving: the agent verifies feedback before acting on it | Your session | Any agent that reads skills |
| `differential-review` | `trailofbits/skills` | Security review of a diff with git blame, blast radius (callers) and test coverage of changed code | A Markdown report file | Claude Code, Codex |
| CodeRabbit `code-review` skill | `coderabbitai/skills` | Runs the CodeRabbit CLI on your changes; findings carry severities and fix instructions | Your session; the diff is sent to the CodeRabbit API | Any agent that reads skills |
| `codex` plugin, `/codex:review` | OpenAI, `openai/codex-plugin-cc` | A read-only Codex review of uncommitted changes or a branch | Your Claude Code session | Claude Code |

[gstack](/en/ecosystem/frameworks/gstack/)'s `/review` is a ninth option with a name collision; see the traps box below. For the managed PR bots (Claude Code Review, `@codex review`, Cursor Bugbot, CodeRabbit's GitHub app), see [AI code review bots](/en/ecosystem/observability/ai-code-review-bots/).

**Popularity, as of 2026-09-26.** Installs in the claude.com plugin directory: `code-review` 438,525, `pr-review-toolkit` 114,856, `coderabbit` 32,361. All-time skills.sh installs, from the third-party `LinklyAI/best-skills` snapshot of 2026-09-26 (a secondary source; re-read skills.sh before you quote them): Pocock `code-review` 617,608, `requesting-code-review` 238,401, `receiving-code-review` 202,093. GitHub stars on the same date: `garrytan/gstack` 134.2k, `openai/codex-plugin-cc` 33.6k, `trailofbits/skills` 7.3k.

### How to pick a reviewer for the job

| If you need to… | Use | Why this one |
| --- | --- | --- |
| check your own branch before you push | built-in `/code-review` | No install, runs in the background, and `--fix` applies what it finds |
| check that the diff does what the ticket asked | Pocock `code-review` | It reports spec compliance as its own axis, apart from standards, so scope creep and missing requirements are not buried in style notes |
| review a change that touches auth, payments or input parsing | `differential-review` | It classifies by risk, not size, and writes a report you can attach to the PR |
| get a second opinion from a different model family | `/codex:review` (Claude Code) or the CodeRabbit skill | The reviewer does not start from the authoring model's reasoning or its session history |
| run review between tasks of a long plan, or push back on a bad comment | Superpowers `requesting-code-review` / `receiving-code-review` | The first runs after every task, not once at the end; the second makes the agent verify each claim before agreeing |
| post a filtered review on a teammate's PR | `code-review` plugin | Its confidence filter keeps low-certainty nits off the PR |

Pick one reviewer per stage: two skills firing on one request give two procedures and two reports.

## How do you run `/code-review high` on a branch?

Learn the built-in command first; every Claude Code session already has it. The full syntax in Claude Code 2.1.283 is `/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path]`.

1. **Finish the work on a branch.** With no target, the review reads the branch's commits ahead of its upstream plus any uncommitted changes. An empty diff has nothing to report.

2. **Run the review at high effort.** In the Claude Code prompt:

    ```text
    /code-review high
    ```

    At `low` the review reports only the findings it is most confident in. `medium` through `max` broaden coverage and may include findings it is less sure about. Use `high` on a feature branch and `medium` on a small fix.

3. **Keep working.** The review runs as a background subagent with its own context window; the findings arrive in the conversation when it completes.

4. **Read the findings as claims, not facts.** Each names a file location and a one-sentence summary. Have Claude reproduce each correctness finding with a failing test before fixing it (the prompt below does this).

5. **Apply or post.** `/code-review high --fix` applies the findings to your working tree. `/code-review high 1234 --comment` reviews pull request 1234 and posts the findings as inline comments. A target can also be a file path or a branch name; the documented forms in 2.1.283 are `pr#`, `branch` and `path`.

Easy to miss:

- **The level is remembered.** When you type no level, the review reuses the last level you typed, even from an earlier session, and prints a notice such as `Reusing high effort, the level you typed last time`.
- **Commit before `--fix`.** It applies every finding to the working tree in one pass, so a clean commit gives you a single `git restore` back to where you were.
- **The local review reads `CLAUDE.md`, not `REVIEW.md`.** `REVIEW.md` tunes only the managed Code Review service.
- **`/simplify` is a different job.** It applies cleanups without hunting for bugs.

`/code-review ultra` escalates to ultrareview, a multi-agent review in Anthropic's cloud. Pro and Max get three free runs, after which a run typically costs $5 to $25 in usage credits (Anthropic's ultrareview docs, checked 2026-09-26). It is not available on Amazon Bedrock, Google Cloud's Agent Platform (formerly Vertex AI), Microsoft Foundry or to organisations with Zero Data Retention; there, `/code-review ultra` runs a local review instead. From the shell, `claude ultrareview [target]` does the same and prints the findings.

**Copy-paste prompt: self-review before you push**

```text
Run /code-review high on this branch. When the findings arrive, do not fix
anything yet. For each correctness finding, write a failing test that
reproduces it, run it, and show me the output. Then sort the findings into
three lists: reproduced (test fails), not reproduced (explain why), and
cleanup-only. Fix only the reproduced ones, one commit per finding, and
rerun the full test suite after each.
```

To stop Claude or a scheduled task from starting the review on its own while you keep the command for yourself, add this to `~/.claude/settings.json`:

```json
{
  "skillOverrides": {
    "code-review": "user-invocable-only"
  }
}
```

## How do you install review skills in Claude Code, Codex and Cursor?

The built-in `/code-review` needs no install. Everything else comes as a plugin (with updates and namespaced commands) or as a portable skill from the skills CLI (npm `skills` 1.7.0).

**Claude Code**

```bash
# Anthropic's plugins (official marketplace, added on first interactive start)
claude plugin install code-review@claude-plugins-official --scope project
claude plugin install pr-review-toolkit@claude-plugins-official --scope project

# Second model: OpenAI's Codex plugin lives in OpenAI's own marketplace
claude plugin marketplace add openai/codex-plugin-cc
claude plugin install codex@openai-codex

# Security review of diffs
claude plugin marketplace add trailofbits/skills
claude plugin install differential-review@trailofbits

# Pocock's skills as a plugin, so his code-review gets a namespaced command
claude plugin install mattpocock-skills@claude-plugins-official

# Superpowers review skills as portable skills
npx skills add obra/superpowers --skill requesting-code-review receiving-code-review -a claude-code -y
```

Plugin commands are namespaced: `/code-review:code-review`, `/pr-review-toolkit:review-pr tests errors`, `/mattpocock-skills:code-review`, `/codex:review`, `/differential-review:diff-review`. Take Pocock's skills through the plugin, because a portable copy named `code-review` competes with the built-in for the bare name. After installing the Codex plugin, run `/codex:setup`; it checks that Codex is installed and logged in. Codex usage counts against your Codex plan or API key.

**Codex**

```bash
# Built in: /review in the TUI ("review my current changes and find issues"),
# or from the shell
codex review --base main
codex review --uncommitted
# Custom instructions go alone, against the default target
codex review "Focus on error handling and the retry logic"

# Non-interactive, with the final review saved as evidence for the PR
codex exec review --base main -o codex-review.md

# Security review of diffs: Codex 0.157.1 reads Claude-format marketplaces
codex plugin marketplace add trailofbits/skills
codex plugin add differential-review@trailofbits

# Portable skills
npx skills add mattpocock/skills --skill code-review setup-matt-pocock-skills -a codex -y
npx skills add obra/superpowers --skill requesting-code-review receiving-code-review -a codex -y
```

In codex-cli 0.157.1, `--base`, `--uncommitted` and `--commit` cannot be combined with a prompt; the parser rejects the command. To steer a branch review, use `/review` in the TUI. Invoke a skill by name with `$code-review`; `/skills` lists what loaded. CodeRabbit is in OpenAI's built-in `openai-curated` marketplace: type `/plugins` in the TUI and search for it. For a second model from another vendor, see the workflow below. Note the subcommand: `codex plugin add`, not `install` (0.157.1).

**Cursor**

```bash
npx skills add mattpocock/skills --skill code-review setup-matt-pocock-skills -a cursor -y
npx skills add obra/superpowers --skill requesting-code-review receiving-code-review -a cursor -y

# Or CodeRabbit as the reviewer, in place of Pocock's skill (both are named code-review)
npx skills add coderabbitai/skills --skill code-review -a cursor -y
```

The CodeRabbit skill calls the `coderabbit` CLI. CodeRabbit documents a Homebrew install, `brew install --cask coderabbit`, then `coderabbit auth login`; confirm it at coderabbit.ai first (we could not reach the site on 2026-09-26). Never run `npm i coderabbit`: that npm name is a security holding package. For the full Superpowers method, type `/add-plugin superpowers` in Agent chat. In Claude Code, CodeRabbit also ships as the `coderabbit@claude-plugins-official` plugin and needs the same CLI. Cursor's own review features, including Bugbot, are covered in [code review in Cursor](/en/cursor-ide/ship/code-review/); we could not re-check cursor.com on 2026-09-26.

Commit `.claude/settings.json` (project-scope plugins) and `.agents/skills/`, `.claude/skills/` and `skills-lock.json` (portable skills). A review skill runs with the agent's permissions, so read it first; [skill supply-chain security](/en/ecosystem/skills/skill-security/) has the checklist.

**Traps with review skills and plugins**

- **Bare `/code-review` is the built-in, not the plugin.** In Claude Code 2.1.283 the plugin runs as `/code-review:code-review`. A portable Pocock `code-review` skill competes for the same bare name; invoke it through the plugin (`/mattpocock-skills:code-review`) or ask for "Pocock's two-axis code review" in words.
- **gstack's `/review` collides with the `/review` alias.** gstack's setup registers a skill named `review` under `~/.claude/skills/`, and `/review` is also the built-in alias of `/code-review`. Type `/code-review` for the built-in. gstack's `review/SKILL.md` is about 73 KB, is allowed to edit files and runs a preamble script, so it is not a drop-in for a read-only check.
- **The `code-review` plugin posts as you.** It comments on the PR through your authenticated `gh`, in public, whenever a finding scores 80 or more.
- **Pocock's and CodeRabbit's skills share the name `code-review`.** As portable skills they land in the same `.agents/skills/code-review/` folder, so install one of them, or take Pocock's through its plugin.
- **The CodeRabbit skill claims generic review requests.** Its description tells the agent to fire on any "code/PR/quality/security review" request. With it installed, "review my changes" can send your diff to the CodeRabbit API instead of running `/code-review`. Name the reviewer you want.
- **A skipped CodeRabbit review looks clean.** A result with `status: review_skipped` and zero findings means no review ran.
- **Pocock `code-review` needs its setup skill.** When `docs/agents/issue-tracker.md` is missing, it tells you to run `/setup-matt-pocock-skills` first, because it fetches the originating issue through that file. It also asks for a fixed point (`main`, a SHA) if you give none.
- **`--skill=<name>` is silently ignored** by skills CLI 1.7.0; with `-y` it installs every skill in the repository. Write `--skill code-review` with a space.

## How do you chain self-review, a second model and a PR bot?

One reviewer catches what its model and prompt make it look for. This workflow uses three reviewers that fail differently, cheapest fixes first.

1. **Self-review in the authoring session.** Run `/code-review high` (Claude Code) or `/review` (Codex) and fix only the findings you can reproduce, with the first prompt above. In Cursor, run `claude` in the integrated terminal and type `/code-review high` there, or ask the agent to review the branch diff against `main` with the same prompt. If the change touches auth, money or parsing, also ask for "a differential security review of this branch against main"; the `differential-review` skill writes a Markdown report, which you keep. The command form, `/differential-review:diff-review`, takes a PR URL, a commit SHA or a diff file, with `--baseline <ref>`.

2. **Check the diff against the spec.** Run Pocock's `code-review` with `main` as the fixed point (`/mattpocock-skills:code-review` in Claude Code, `$code-review` in Codex, "use the code-review skill" in Cursor). The Spec axis lists missing requirements, unrequested behaviour and requirements that look implemented but wrong, each with the spec line quoted. Resolve every Spec finding before you open the PR; after merge, each one is a new ticket.

3. **Ask a second model.** The authoring model reviewing its own work shares its blind spots.

    **Claude Code**

    ```text
    /codex:review --base main --background
    /codex:status
    /codex:result
    ```

    `/codex:review` is read-only and takes no focus text. To challenge a specific decision, use `/codex:adversarial-review --base main challenge whether the retry logic is safe under partial failure`.

    **Codex**

    Run a reviewer from another vendor on the same branch: the CodeRabbit skill (install `coderabbitai/skills --skill code-review` in place of Pocock's skill, then ask for "a CodeRabbit review against main"; it runs `cr review --agent --base main`), or open the branch in a Claude Code session and run `/code-review high`.

    **Cursor**

    Run the CodeRabbit skill on the branch, or run `codex review --base main` or Claude Code's `/code-review high` from the integrated terminal. Any of them gives you a model other than the one that wrote the code.

4. **Triage the combined findings with `receiving-code-review`.** Paste the second model's output into the authoring session with the prompt below. The agent verifies each claim against the code before it changes anything and pushes back on wrong ones with reasons.

5. **Open the PR and let the bot review it.** A PR bot (Claude Code Review via `@claude review`, `@codex review`, Bugbot or CodeRabbit's app) reviews the final diff with repository context. Anthropic's managed Code Review is available on Team and Enterprise (generally available per Anthropic's 2026-10-15 article) and has no flat per-review price: its costs page has you multiply each repository's average cost per review by its pull requests per month (Anthropic docs, checked 2026-10-16); setup for each bot is in [AI code review bots](/en/ecosystem/observability/ai-code-review-bots/).

6. **Hand the human an evidence bundle, not a diff.** The PR description lists which reviewers ran, which findings were fixed with a reproducing test, and which were rejected and why. The human then follows [reviewing an agent's pull request](/en/workflows/ship/agent-pr-review/).

**Copy-paste prompt: act on a second model's review without blind agreement**

```text
Use the receiving-code-review skill. Below is a review of this branch from a
different model. For each item: restate it in one line, check it against the
actual code, and label it VALID, INVALID or UNCLEAR with the evidence (file,
line, test output). Do not change code for INVALID or UNCLEAR items; for
UNCLEAR ones, tell me what you would need to decide. For VALID items, write a
failing test first, then fix, one item at a time, and run the tests after
each. End with a table I can paste into the PR description.

<paste the review here>
```

In a long Superpowers plan, `requesting-code-review` moves step 1 inside the loop: after each task a reviewer subagent checks it against the task's requirements, and the agent fixes Critical issues at once and Important ones before the next task. See [Superpowers](/en/ecosystem/frameworks/superpowers/).

## How do you know your review agents catch real bugs?

A review that reports nothing can mean a clean diff or a reviewer that did not look. Measure reviewers like a test suite: plant defects and count what comes back.

- **Seed known bugs.** On a throwaway branch, plant three defects of the kind your incidents come from, run each reviewer and record which it names (the prompt below sets this up). Repeat when you change model, effort level or skill version.
- **Track the outcome of every finding.** Label each one fixed, rejected or not reproduced. A reviewer whose findings are mostly rejected costs reviewer attention; lower its effort level or drop it.
- **Keep CI as the gate.** Review agents advise; the tests, type checks, linters and security scanners in CI decide. A finding that matters becomes a test, so the same bug cannot return. Keep tests out of the agent's reach with [protecting the oracle](/en/workflows/test/protect-the-oracle/).
- **Check that the review ran.** Look for the report itself: the `differential-review` Markdown file, the CodeRabbit completion status, the findings message from `/code-review`. "No findings" without a report is not a result.

**Copy-paste prompt: calibrate a reviewer with planted bugs**

```text
Create a branch named review-canary from main. Introduce exactly three
bugs, each in a separate commit with a neutral message:
(1) an off-by-one in a pagination boundary,
(2) an exception caught and ignored in a network call,
(3) a handler that skips the authorisation check for one role.
Do not add comments that hint at the bugs. Write the file and line of each
bug to /tmp/review-canary.md, outside the repository, and do not print them
here. Then stop, so I can run each reviewer on this branch in a fresh
session and score what it finds against that file.
```

**Who signs off.** The developer who opens the PR owns the self-review and the reproduction evidence. The tech lead owns the team's reviewer set, effort levels and canary results, and changes them through a pull request. A human approves the merge; no review agent here approves on its own.

## What does each reviewer cost in context?

Skills cost their name and description in every session and their body only when they fire; plugins can cost more up front. Measured on 2026-09-26:

| What loads | When | Size |
| --- | --- | --- |
| `pr-review-toolkit` plugin | Every session | about 2,033 tokens (`claude plugin details`, Claude Code 2.1.283) |
| `mattpocock-skills` plugin (all of Pocock's skills) | Every session | about 1,609 tokens (`claude plugin details`, Claude Code 2.1.283) |
| Pocock `code-review` `SKILL.md` | When it fires | 6,589 bytes |
| Superpowers `requesting-code-review` + its `code-reviewer.md` template | When it fires | 2,977 + 6,449 bytes |
| Superpowers `receiving-code-review` `SKILL.md` | When it fires | 6,203 bytes |
| CodeRabbit `code-review` `SKILL.md` | When it fires | 7,518 bytes |
| Trail of Bits `differential-review` `SKILL.md` (plus four reference files it opens as needed) | When it fires | 7,439 bytes (about 33 KB with all references) |
| gstack `review/SKILL.md` | When it fires | about 73 KB |

At roughly 3 to 4 bytes per token (Claude 4.7 and later tokenizers produce about 30% more tokens for the same text), most review skills cost about 1,600 to 3,200 tokens when they fire, and gstack's about 18,000 to 24,000. The built-in `/code-review` reads the diff in its own subagent context. Check an install with `claude plugin details PLUGIN_NAME` and `/context`.

## What breaks when review runs inside the agent?

**The review finds nothing on a large change.** Usually the target was wrong: the branch had no upstream, the changes were already pushed, or the review read only uncommitted files. Recovery: name the branch as the target, such as `/code-review high feature/rate-limit`, and check that the findings message names the files you expected. A git range is not a documented target form in 2.1.283.

**Two reviewers fire on one request.** "Review this" triggers several review skills at once, or one you did not expect. Recovery: invoke by exact name, keep one general reviewer per repository, and remove the others with `npx skills remove --skill SKILL_NAME` or `claude plugin uninstall PLUGIN_NAME`.

**`--fix` changes more than you expected.** It applies every finding at once, including the ones you would not have reproduced. Recovery: `git diff` to see the edits, `git restore` or `git revert` to undo them, and commit before every `--fix` run.

**The agent agrees with every comment.** It applies a wrong PR-bot suggestion and breaks untested behaviour. Recovery: route all review feedback through `receiving-code-review` with the second prompt above, and require a failing test before any fix.

**The review loop does not end.** The Codex plugin's optional review gate runs from a `Stop` hook and blocks Claude from stopping while it finds issues; OpenAI's README warns it "may drain usage limits quickly". Recovery: `/codex:setup --disable-review-gate` (the flag in the `openai/codex-plugin-cc` README, checked 2026-09-26), and enable it only in sessions you watch.

**Cloud review is unavailable.** On Bedrock, Google Cloud, Foundry or under Zero Data Retention, `/code-review ultra` quietly runs a local review. Recovery: treat it as a local review and do not record it as an ultrareview in the evidence bundle.

**The code-review plugin skips your PR.** It drops closed, draft, trivial or already-reviewed PRs, and posts nothing when no finding reaches 80. Recovery: mark the PR ready for review, or use the built-in `/code-review` to see low-confidence findings too.

## Where to go next with in-agent code review

- [Reviewing an agent's pull request](/en/workflows/ship/agent-pr-review/) — The human side: what to read instead of every line, and when to escalate.
- [AI code review bots](/en/ecosystem/observability/ai-code-review-bots/) — Claude Code Review, @codex review, Bugbot, CodeRabbit and Greptile on your pull requests.
- [Testing and debugging skills](/en/ecosystem/skills/testing-debugging-skills/) — The stage before review: skills that make the agent test first and prove every fix.
- [Evidence bundle](/en/workflows/ship/evidence-bundle/) — What a pull request carries so reviewers check evidence, not code.
- [Anthropic's developer plugins](/en/ecosystem/plugins/anthropic-dev-plugins/) — code-review, pr-review-toolkit, security-guidance and the rest of the official set.
- [Agent security gates](/en/ecosystem/observability/agent-security-gates/) — Deterministic scanners that sit beside review agents in CI.

For tool-specific setups, see [review automation in Claude Code](/en/claude-code/ship/review-automation/), [code review in Codex](/en/codex/ship/code-review/) and [code review in Cursor](/en/cursor-ide/ship/code-review/). For the wider ranking of practice skills, see [the most-installed development-practice skills](/en/ecosystem/skills/top-practice-skills/).
