Sep 21, 2026
Open Code Review Adds a Deterministic Reviewer to Your Git Workflow
A 38k-star CLI from Alibaba that pairs deterministic pipelines with an LLM agent for line-level review — plus a delegation mode your coding agent runs without any OCR API key.
You can ask a general-purpose agent to review your diff, and it will — inconsistently. The Open Code Review (OCR) README names the failure modes: agents selectively review files on large changesets, report line numbers that drift off target, and fluctuate with minor prompt variations. This 38k-star CLI, which started as Alibaba Group's internal AI code review assistant, attacks that with a hybrid design.
Why This Skill Matters
OCR pairs deterministic engineering with an agent, splitting the work by what each does reliably. Engineering logic handles the steps that must not go wrong: precise file selection, smart bundling of related files into one review unit (the README's example: message_en.properties and message_zh.properties travel together), template-engine rule matching per file type, and dedicated comment-positioning and reflection modules. The agent handles the judgment: scenario-tuned prompts and a toolset distilled from production tool-call traces, with the ability to read full files, search the codebase, and inspect other changed files for context.
The README benchmarks this on AACR-Bench, built from 50 open-source repositories, 200 real pull requests, and 10 programming languages, cross-validated by 80+ senior engineers into 1,505 annotated ground-truth issues. Its claim: against general-purpose agents on the same underlying model, OCR achieves significantly higher precision and F1 while consuming roughly one-ninth of the tokens — with recall deliberately lower, trading found-issues volume for fewer false alarms.
Installation
You need Git 2.41 or later, then one global install:
npm install -g @alibaba-group/open-code-review
Configure an LLM before your first review — the interactive commands walk through provider selection, API key, and model, then test connectivity:
ocr config provider
ocr config model
Real Workflow: Review a Branch Before Opening the PR
- From your project, review the full range the branch touches since it diverged from main (merge-base mode):
ocr review --from main --to feature-branch
- For an interrupted or long review, find and resume the session:
ocr session list
ocr review --from main --to feature-branch --resume <session-id>
- To feed the findings to an AI host agent, emit JSON:
ocr review --format json --output result.json
Real Workflow: Scan a Whole Directory
Diffs do not exist when you are auditing an unfamiliar codebase. ocr scan reviews entire files instead — no git history needed:
ocr scan --path internal/agent
Real Workflow: Delegate to Your Coding Agent
Delegation mode inverts the setup: OCR handles file selection and rule resolution, and your coding agent performs the review with its own LLM — no OCR LLM configuration needed:
ocr delegate preview
ocr delegate rule src/main.go src/handler.go
In Claude Code, the plugin exposes this as slash commands:
/plugin marketplace add alibaba/open-code-review
/plugin install open-code-review@open-code-review
That installs /open-code-review:review and /open-code-review:delegate-review.
Tips
- Beyond diff review,
ocr scanwith no path scans the entire repository — useful before adopting a legacy codebase. - Plugins exist for Claude Code, Codex, Cursor, and Kimi Code, plus a portable agent skill for skill-compatible agents.
- The Session Viewer lets you browse and replay review sessions in a browser, marking comments as fixed or ignored as you work through them.
When Not to Use This
If your priority is surfacing every possible issue, the deliberately lower recall means a general-purpose agent will find more — OCR optimizes precision, fewer false alarms per review. The LLM-backed review also requires a configured model endpoint unless you use delegation mode, and the deterministic pipelines assume a Git repository (2.41+) rather than loose files.
See the leaderboard for more skills.