delegate-review

delegate-review is a command for Claude Code from alibaba/open-code-review. It costs 21 tokens per session (766 once invoked), scanned A, original, Apache-2.0.

A command that uses Open Code Review to select files and review rules, then asks the host coding agent to perform the actual code review. Open Code Review is a tool for examining Git changes for engineering problems.

In plain words
What is it for?
Use it to review workspace changes, a single commit, or a branch range, then inspect each selected diff for correctness, security, performance, and other stated concerns.
Why use it?
It keeps file selection and project-specific review rules consistent while leaving the reasoning to the coding agent. This is useful when the host agent needs to understand the wider codebase or requirements.

Command for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the open-code-review plugin — 2 commands shipped together

Good fit Use it to review workspace changes, a single commit, or a branch range, then inspect each selected diff for correctness, security, performance, and other stated concerns.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alibaba/open-code-review/delegate-review
About the project

Open Code Review is an AI-assisted command-line tool that examines code changes or entire files and produces structured comments tied to specific lines. Developers use it for repository-level reviews, code auditing, and checks such as security, null safety, and thread safety.

alibaba/open-code-review · 47,499 stars · on GitHub · open-codereview.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/alibaba/open-code-review

Made for: Claude Code.

Or install open-code-review, the plugin that ships this one along with the rest of its 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for delegate-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/alibaba/open-code-review/delegate-review/github.svg)](https://agentmods.dev/commands/alibaba/open-code-review/delegate-review)
Your own site
<a href="https://agentmods.dev/commands/alibaba/open-code-review/delegate-review"><img src="https://agentmods.dev/badge/commands/alibaba/open-code-review/delegate-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for delegate-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/alibaba/open-code-review/delegate-review"><img src="https://agentmods.dev/badge/commands/alibaba/open-code-review/delegate-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 766 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00766
Opus 5.5 $0.00008 $0.00306
Sonnet 5.5 $0.00004 $0.00153
Haiku 4.5 $0.00002 $0.00077

Measured 6d ago against content hash 771a28516678, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

delegate-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/open-code-review/claude-code/commands/delegate-review.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Invoke OpenCodeReview (OCR) in delegation mode. OCR determines which files to review and provides review rules; you perform the actual code review using your own capabilities.

Workflow

Step 1: Preview

ocr delegate preview [user-args]
  • Default (no user arguments): workspace mode (staged + unstaged + untracked).
  • If the user provides --commit or -c: pass through as-is.
  • If the user provides --from and --to: pass through as-is.
  • (Optional) Provide --background "context" or -b "context" for business context.
  • If ocr is not found, install it: npm i -g @alibaba-group/open-code-review.

This outputs mode/ref metadata and the reviewable file list.

Step 2: Get Rules

Pass all reviewable file paths to get their review checklists:

ocr delegate rule <path1> <path2> ...

Step 3: Get Diffs and Review

Choose the diff command using the mode and refs from Step 1. Use git --no-pager for every Git call during the review.

The diff commands disable external diff programs, text conversion, and color to produce plain patches.

  • Range: git --no-pager diff --no-ext-diff --no-textconv --no-color <merge_base>..<to> -- "<path>"
  • Commit: git --no-pager show --no-ext-diff --no-textconv --no-color <commit> -- "<path>"
  • Workspace: git --no-pager diff --no-ext-diff --no-textconv --no-color HEAD -- "<path>" (or cat "<path>" for untracked files)

To read context:

git --no-pager log --no-color --oneline -- "<path>"
git --no-pager blame --no-textconv -- "<path>"
git --no-pager show --no-ext-diff --no-textconv --no-color "<ref>:<path>"

For large diffs, add --output="<absolute-diff-file>" to the command for the selected mode. Choose a unique absolute path outside the repository and create its parent directory. Use the same path in file-reading tool calls:

git --no-pager diff --no-ext-diff --no-textconv --no-color --output="<absolute-diff-file>" <merge_base>..<to> -- "<path>"

After Git exits with code 0, read and review the entire file in chunks, then remove it. If Git fails or times out, retry or record skipped with the error. Check unexpectedly empty output against a fresh preview.

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +21 lines 771a28516678
  2. 1mo ago First seen · 49 lines · 21 tokens per session scan A acbf3a1d45b8

Subscribe to this mod's changes

delegate-review is a command published in the GitHub repository alibaba/open-code-review (47,499 stars, last pushed yesterday), licensed Apache-2.0. It adds 21 tokens to every session and 766 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.