Skip to content
Development
Command

/delegate-review

Run OCR in delegation mode — OCR handles file selection and rules, the host agent performs the actual review.

From plugin
alibaba-open-code-review
20k5 skills5 commands
Install
> /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.md
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.

Read more
Ships withalibaba-open-code-review

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.

Get the whole plugin
Stats
19,840
Stars
1,389
Forks
Active
Maintenance
Go
Language
Apache-2.0
License
14h ago
Last commit
2mo ago
Created

Repo: alibaba/open-code-review