Skip to content
Back to search

open-code-review

MarketplaceWorks with Claude CodeGitHub

AI-powered code review agent that reads Git diffs, analyzes changed files with LLM tool-use capabilities, and generates structured line-level review comments with cross-referential context awareness.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/alibaba/open-code-review with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/alibaba/open-code-review'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/alibaba-open-code-review/badge.svg)](/listings/alibaba-open-code-review)

HTML

<a href="/listings/alibaba-open-code-review"><img src="/api/listings/alibaba-open-code-review/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npm install -g @alibaba-group/open-code-review

After installation, the `ocr` command is available globally.

For other installation methods (install script, GitHub Release binary, from source), see [Installation](https://open-codereview.ai/docs/installation).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 16 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "open-code-review",
  3. "owner": {
  4. "name": "alibaba"
  5. },
  6. "description": "AI-powered code review agent that reads Git diffs, analyzes changed files with LLM tool-use capabilities, and generates structured line-level review comments with cross-referential context awareness.",
  7. "plugins": [
  8. {
  9. "name": "open-code-review",
  10. "source": "./plugins/open-code-review/claude-code",
  11. "description": "Perform AI code review on Git diffs — supports workspace changes, branch ranges, and single commits with concurrent per-file analysis, codebase search, and deep context-aware review.",
  12. "version": "1.0.0",
  13. "license": "Apache-2.0"
  14. }
  15. ]
  16. }
README.md · README · 241 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. <a href="https://open-codereview.ai">
  3. <img src="imgs/logo-core.svg" alt="OpenCodeReview logo" width="180" />
  4. </a>
  5. <h1>OpenCodeReview</h1>
  6. </div>
  7. <p align="center">
  8. <a href="https://trendshift.io/repositories/41087?utm_source=repository-badge&amp;utm_medium=badge&amp;utm_campaign=badge-repository-41087" target="_blank" rel="noopener noreferrer">
  9. <img src="https://trendshift.io/api/badge/repositories/41087" alt="alibaba%2Fopen-code-review | Trendshift" style="width: 280px; height: 60px;" width="280" height="60" />
  10. </a>
  11. </p>
  12. <p align="center">
  13. <a href="https://trendshift.io/repositories/41087" target="_blank">
  14. <img src="https://trendshift.io/api/badge/trendshift/repositories/41087/weekly" alt="alibaba%2Fopen-code-review | Trendshift" style="width: 280px; height: 60px;" width="280" height="60" />
  15. </a>
  16. <a href="https://trendshift.io/repositories/41087" target="_blank">
  17. <img src="https://trendshift.io/api/badge/trendshift/repositories/41087/monthly?language=Go" alt="alibaba%2Fopen-code-review | Trendshift" style="width: 280px; height: 60px;" width="280" height="60" />
  18. </a>
  19. </p>
  20. <p align="center">
  21. <a href="https://www.npmjs.com/package/@alibaba-group/open-code-review"><img alt="npm" src="https://img.shields.io/npm/v/@alibaba-group/open-code-review?style=flat-square" /></a>
  22. <a href="https://github.com/alibaba/open-code-review/actions/workflows/release.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/alibaba/open-code-review/release.yml?style=flat-square" /></a>
  23. <a href="https://github.com/alibaba/open-code-review/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/alibaba/open-code-review?style=flat-square" /></a>
  24. <a href="https://deepwiki.com/alibaba/open-code-review"><img alt="Ask DeepWiki" src="https://img.shields.io/badge/Ask-DeepWiki-blue?style=flat-square" /></a>
  25. <a href="https://www.bestpractices.dev/projects/13328"><img alt="OpenSSF Best Practices" src="https://img.shields.io/badge/OpenSSF-Gold-D4AF37?style=flat-square" /></a>
  26. </p>
  27. <p align="center">
  28. <a href="#supported-platforms"><img alt="Windows" src="https://img.shields.io/badge/Windows-supported-blue.svg" /></a>
  29. <a href="#supported-platforms"><img alt="macOS" src="https://img.shields.io/badge/macOS-supported-blue.svg" /></a>
  30. <a href="#supported-platforms"><img alt="Linux" src="https://img.shields.io/badge/Linux-supported-blue.svg" /></a>
  31. <a href="#supported-agents"><img alt="Claude Code" src="https://img.shields.io/badge/Claude_Code-supported-blueviolet.svg" /></a>
  32. <a href="#supported-agents"><img alt="Codex" src="https://img.shields.io/badge/Codex-supported-blueviolet.svg" /></a>
  33. <a href="#supported-agents"><img alt="Cursor" src="https://img.shields.io/badge/Cursor-supported-blueviolet.svg" /></a>
  34. <a href="#supported-agents"><img alt="Kimi Code" src="https://img.shields.io/badge/Kimi_Code-supported-blueviolet.svg" /></a>
  35. </p>
  36. <p align="center">
  37. English | <a href="docs/i18n/README.zh-CN.md">简体中文</a> | <a href="docs/i18n/README.ja-JP.md">日本語</a> | <a href="docs/i18n/README.ko-KR.md">한국어</a> | <a href="docs/i18n/README.ru-RU.md">Русский</a>
  38. </p>
  39. ---
  40. ## What is Open Code Review?
  41. Open Code Review is an AI-powered code review CLI tool. It originated as Alibaba Group's internal official AI code review assistant — over the past two years, it has served tens of thousands of developers and identified millions of code defects. After thorough validation at massive scale, we incubated it into an open source project for the community. Simply configure a model endpoint to get started.
  42. It reads Git diffs, sends changed files to a configurable LLM via an agent with tool-use capabilities, and generates structured review comments with line-level precision. The agent can read full file contents, search the codebase, inspect other changed files for context, and produce deep reviews — not just surface-level diff feedback. Beyond diff review, `ocr scan` reviews entire files for auditing unfamiliar codebases or directories that have no meaningful diff.
  43. Visit the [official website](https://open-codereview.ai) for more details.
  44. ![Highlights](imgs/highlights-en.png)
  45. ## Benchmark
  46. > Compared to general-purpose agents (Claude Code), Open Code Review achieves significantly higher **Precision** and **F1** with the same underlying model, while consuming only **~1/9 of the tokens** and completing reviews faster. Note that its Recall is lower than general-purpose agents — a deliberate trade-off favoring precision over noise.
  47. A real-world code review benchmark built from **50** popular open-source repositories, **200** real Pull Requests, and **10** programming languages — cross-validated by 80+ senior engineers (**1,505** annotated ground-truth issues).
  48. <a href="https://huggingface.co/datasets/Alibaba-Aone/aacr-bench"><img src="https://huggingface.co/favicon.ico" alt="Hugging Face" width="20" height="20" /> Explore the AACR-Bench dataset on Hugging Face</a>.
  49. | Metric | What it measures | Why it matters |
  50. |--------|-----------------|----------------|
  51. | **F1** | Harmonic mean of precision and recall | Best single number for overall review quality |
  52. | **Precision** | Proportion of reported issues that are real defects | Higher = fewer false alarms to triage |
  53. | **Recall** | Proportion of real defects that are found | Higher = fewer issues slip through review |
  54. | **Avg Time** | Wall-clock time per review | Matters for CI pipeline latency |
  55. | **Avg Token** | Total tokens consumed per review | Directly impacts API cost |
  56. ![Benchmark](imgs/benchmark-en.png)
  57. ## Why Open Code Review?
  58. ### The Problem with General-Purpose Agents
  59. If you've used general-purpose agents like Claude Code with Skills for code review, you've likely encountered these pain points:
  60. - **Incomplete coverage** — On larger changesets, agents tend to "cut corners," selectively reviewing only some files and missing others.
  61. - **Position drift** — Reported issues frequently don't match the actual code location, with line numbers or file references drifting off target.
  62. - **Unstable quality** — Natural-language-driven Skills are hard to debug, and review quality fluctuates significantly with minor prompt variations.
  63. The root cause: a purely language-driven architecture lacks hard constraints on the review process.
  64. ### Core Design: Deterministic Engineering × Agent Hybrid
  65. Open Code Review's core philosophy is to combine deterministic engineering with an agent, each handling what it does best.
  66. **Deterministic Engineering — Hard Constraints**
  67. For review steps that *must not go wrong*, engineering logic — not the language model — guarantees correctness:
  68. - **Precise file selection** — Determines exactly which files need review and which should be filtered, ensuring no important change is missed.
  69. - **Smart file bundling** — Groups related files into a single review unit (e.g., `message_en.properties` and `message_zh.properties` are bundled together). Each bundle runs as a sub-agent with isolated context — a divide-and-conquer strategy that stays stable on very large changesets and naturally supports concurrent review.
  70. - **Fine-grained rule matching** — Matches review rules to each file's characteristics, keeping the model's attention sharply focused and eliminating information noise at the source. Compared to purely language-driven rule guidance, template-engine-based rule matching is more stable and predictable.
  71. - **External positioning and reflection modules** — Independent comment-positioning and comment-reflection modules systematically improve both the location accuracy and content accuracy of AI feedback.
  72. **Agent — Dynamic Decision-Making**
  73. The agent's strengths are concentrated where they matter most — dynamic decisions and dynamic context retrieval:
  74. - **Scenario-tuned prompts** — Prompt templates deeply optimized for code review, improving effectiveness while reducing token consumption.
  75. - **Scenario-tuned toolset** — Distilled from deep analysis of tool-call traces in large-scale production data — including call frequency distributions, per-tool repetition rates, and the impact of new tools on the overall call chain — resulting in a purpose-built toolset that is more stable and predictable for code review than a generic agent toolkit.
  76. ## How to Use
  77. ### Prerequisites
  78. - **Git >= 2.41** — Open Code Review relies on Git for diff generation, code search, and repository operations.
  79. <a id="supported-agents"></a>
  80. ### Agent Skills
  81. Use the skills in Claude Code, Codex, Cursor, Kimi Code, or another agent that supports Agent Skills and can run local commands. Both modes require **Git >= 2.41** and the **`ocr` CLI**; only native mode requires an OCR model provider.
  82. #### 1. Install the Skills
  83. Run in the project you want to review, then select the skills you need and your agent in the installer:
  84. ```bash
  85. npx skills add alibaba/open-code-review
  86. ```
  87. The skills guide your agent to install `ocr` if it is missing, subject to your environment's permissions. You can also install it ahead of time with `npm install -g @alibaba-group/open-code-review`. Prefer a plugin or manual installation? See the [agent-specific setup guide](plugins/open-code-review/README.md), or copy the desired folders from [`skills/`](skills/) into your agent's skill directory.
  88. #### 2. Choose a Review Mode
  89. | | Native mode | Delegation mode |
  90. |---|---|---|
  91. | Skill | [`open-code-review`](skills/open-code-review/SKILL.md) | [`open-code-review-delegate`](skills/open-code-review-delegate/SKILL.md) |
  92. | Who reviews? | OCR's specialized review agent and pipeline | Your current coding agent, following OCR's review pipeline and guardrails |
  93. | Model and authentication | OCR's own provider configuration | Your host agent's existing model and authentication |
  94. | Choose it when | You have a model endpoint for OCR and want its full review pipeline | You have no separate API key, or want to use your existing agent subscription/setup |
  95. **No separate key? Start with delegation mode.** It skips OCR provider setup, not the host agent's own authentication, usage limits, or costs. A host-agent subscription is not automatically an API credential for native mode. In delegation mode, OCR's CLI and skill together provide the review pipeline and guardrails: file selection, rule resolution, coverage requirements, and structured reporting. The host agent performs analysis, positioning, and reporting within that workflow; it does not run OCR's full native pipeline.
  96. For native mode, configure a provider once with `ocr config provider` and `ocr config model`. Authentication depends on the provider; see [Configuration](https://open-codereview.ai/docs/configuration).
  97. ### CLI
  98. #### Install
  99. ```bash
  100. npm install -g @alibaba-group/open-code-review
  101. ```
  102. After installation, the `ocr` command is available globally.
  103. For other installation methods (install script, GitHub Release binary, from source), see [Installation](https://open-codereview.ai/docs/installation).
  104. #### Quick Start
  105. **1. Configure LLM**
  106. You must configure an LLM before reviewing code, unless you use [Delegation Mode](https://open-codereview.ai/docs/delegate).
  107. - **OCR calls the model:** `ocr review`, the `/open-code-review:review` command, and the `open-code-review` skill use OCR's own provider configuration, not your Claude Code Team/Pro subscription login. Authentication requirements depend on the provider; see [Configuration](https://open-codereview.ai/docs/configuration).
  108. - **The host agent calls the model:** the `/open-code-review:delegate-review` command and the `open-code-review-delegate` skill use the host agent's configured model and authentication. No separate LLM configuration or credentials are needed in OCR. See the [Claude Code install steps](plugins/open-code-review/README.md#claude-code).
  109. ```bash
  110. ocr config provider # Select a built-in provider or add a custom one
  111. ocr config model # Pick a model for the active provider
  112. ```
  113. ![Model providers](imgs/providers.jpg)
  114. The interactive UI guides you through provider selection, API key entry, and model configuration, then automatically tests connectivity.
  115. For CLI setup, environment variables, custom providers, and other advanced configuration, see [Configuration](https://open-codereview.ai/docs/configuration).
  116. **2. Review**
  117. ```bash
  118. cd your-project
  119. # Workspace mode — review all staged, unstaged, and untracked changes
  120. ocr review
  121. # Current branch — review changes since it diverged from main (--to defaults to HEAD)
  122. ocr review --from main
  123. # Branch range — reviews feature-branch's changes since it diverged from main (merge-base mode)
  124. ocr review --from main --to feature-branch
  125. # Single commit
  126. ocr review --commit abc123
  127. # Resume an interrupted range or commit review
  128. ocr session list
  129. ocr review --from main --to feature-branch --resume <session-id>
  130. # Full-file scan — review whole files instead of a diff (no git history needed)
  131. ocr scan # scan the entire repository
  132. ocr scan --path internal/agent # scan a directory or specific files
  133. ocr scan --resume <session-id> # resume an interrupted full-file scan
  134. # Save results to a file (recommended for AI host agents)
  135. ocr review --format json --output result.json
  136. # Delegation mode — let your AI coding agent perform the review itself
  137. # OCR handles file selection and rule resolution; no LLM configuration needed
  138. ocr delegate preview
  139. ocr delegate rule src/main.go src/handler.go
  140. ```
  141. ## Documentation
  142. Full documentation lives at **[open-codereview.ai/docs](https://open-codereview.ai/docs)**:
  143. - [Quickstart](https://open-codereview.ai/docs/quickstart) — install and run your first review
  144. - [Installation](https://open-codereview.ai/docs/installation) — all platforms and package managers
  145. - [CLI Reference](https://open-codereview.ai/docs/cli-reference) — every command and flag
  146. - [Review Rules](https://open-codereview.ai/docs/review-rules) — customize review rules with path filtering and targeting
  147. - [Configuration](https://open-codereview.ai/docs/configuration) — config keys and environment variables
  148. - [MCP Server](https://open-codereview.ai/docs/mcp) — extend the review agent with external tools
  149. - Coding Agent Integrations — choose the platform you use
  150. - [Claude Code](plugins/open-code-review/README.md#claude-code) — install a plugin with review slash commands
  151. - [Codex](plugins/open-code-review/README.md#codex) — install a plugin with callable review skills
  152. - [Cursor](plugins/open-code-review/README.md#cursor) — install a plugin with portable review skills
  153. - [Kimi Code](plugins/open-code-review/README.md#kimi-code) — install a plugin with review slash commands and skills
  154. - [OpenCode](plugins/open-code-review/opencode/README.md) — install native review tools and slash commands
  155. - [QCA Forward](plugins/open-code-review/qca/README.md) — run delegation mode with the QCA host model and a ready-to-publish template
  156. - [Skill-compatible agents](https://open-codereview.ai/docs/agent-skill) — install the portable agent skill
  157. - Review Execution Modes — after integration, choose which LLM performs the review
  158. - [Default (OCR-managed)](https://open-codereview.ai/docs/configuration) — OCR runs the review using its configured LLM
  159. - [Delegation Mode](https://open-codereview.ai/docs/delegate) — your coding agent runs the review using its own LLM; no OCR API key required
  160. - [CI/CD Integration](https://open-codereview.ai/docs/cicd) — GitHub Actions, GitLab CI, GitFlic CI, and Gerrit integration
  161. - [Session Viewer](https://open-codereview.ai/docs/viewer) — browse and replay review sessions in browser, mark comments as fixed or ignored and hide them while you work through the findings
  162. - [Telemetry](https://open-codereview.ai/docs/telemetry) — OpenTelemetry integration for observability
  163. - [FAQ](https://open-codereview.ai/docs/faq) — common questions and troubleshooting
  164. ## Contributing
  165. This project exists thanks to all the people who contribute. See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, coding guidelines, and how to submit pull requests.
  166. <a href="https://github.com/alibaba/open-code-review/graphs/contributors">
  167. <img src="https://contrib.rocks/image?repo=alibaba/open-code-review" />
  168. </a>
  169. ## License
  170. [Apache-2.0](LICENSE) — Copyright 2026 Alibaba

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.