/delegate-review
Run OCR in delegation mode — OCR handles file selection and rules, the host agent performs the actual review.
> /plugin marketplace add alibaba/open-code-review > /plugin install open-code-review@open-code-review
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/delegate-review
Context preview
What this command does when you run it.
Run OCR in delegation mode — OCR handles file selection and rules, the host agent performs the actual review.
Command definition
delegate-review.mddescription: Run OCR in delegation mode — OCR handles file selection and rules, the host agent performs the actual review.
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
For each reviewable file, get its diff using git (based on mode/ref from Step 1):
- Range: `git diff <merge_base>..<to> -- <path>`
- Commit: `git show <commit> -- <path>`
- Workspace: `git diff HEAD -- <path>` (or read directly for untracked files)
Then review focusing on: correctness, security, performance, error handling, concurrency, maintainability. Only comment on changed code (+ lines).
Step 4: Report and Fix
Classify each issue by severity:
- **High**: Obvious bugs, security issues, data loss, or clear mistakes with precise fix proposals
- **Medium**: Reasonable concerns, performance suggestions, or fixes requiring manual work
- **Low**: Discard silently (likely false positives, nitpicks, or insufficient context)
Automatically fix High and Medium issues that are safe and well-defined.
Read more
description: Run OCR in delegation mode — OCR handles file selection and rules, the host agent performs the actual review.
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
For each reviewable file, get its diff using git (based on mode/ref from Step 1):
- Range: `git diff <merge_base>..<to> -- <path>`
- Commit: `git show <commit> -- <path>`
- Workspace: `git diff HEAD -- <path>` (or read directly for untracked files)
Then review focusing on: correctness, security, performance, error handling, concurrency, maintainability. Only comment on changed code (+ lines).
Step 4: Report and Fix
Classify each issue by severity:
- **High**: Obvious bugs, security issues, data loss, or clear mistakes with precise fix proposals
- **Medium**: Reasonable concerns, performance suggestions, or fixes requiring manual work
- **Low**: Discard silently (likely false positives, nitpicks, or insufficient context)
Automatically fix High and Medium issues that are safe and well-defined.
Fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, thread-safety, XSS, SQL injection), OpenAI & Anthropic compatible.
Other commands on alibaba-open-code-review.
- /commit
Please summarize your current changes, generate a commit message in English, then add and commit.
Open command - /open-code-review
Invoke the professional code review Agent CLI tool OpenCodeReview (OCR) to review current code changes, and let the Agent autonomously decide whether to apply fixes.
Open command - /tag
Create an annotated git tag with an auto-generated summary of changes since the last tag.
Open command - /review
Run OpenCodeReview (OCR) to review code changes and autonomously apply fixes.
Open command

