# Open Code Review

Reviews git changes with the ocr CLI, producing line comments and optional fixes.

- Repository: https://github.com/alibaba/open-code-review (49236 stars)
- Category: Git and review
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add alibaba/open-code-review --skill open-code-review -g -a claude-code -y`
Codex: `npx skills add alibaba/open-code-review --skill open-code-review -g -a codex -y`
Cursor: `npx skills add alibaba/open-code-review --skill open-code-review -g -a cursor -y`
Gemini CLI: `npx skills add alibaba/open-code-review --skill open-code-review -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add alibaba/open-code-review`

## Description

Performs AI-powered code review on Git changes using the `ocr` CLI from alibaba/open-code-review. Use when the user asks to review code, review a pull request, review staged/unstaged changes, review a commit, or compare branches for code quality issues. Produces line-level review comments and can automatically apply fixes when requested. With appropriate review rules, can detect various types of issues including bugs, security vulnerabilities, performance problems, and code quality concerns.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Open Code Review

This Codex plugin skill intentionally mirrors the canonical skill at
`skills/open-code-review/SKILL.md`. Keep both files synchronized when updating
OCR agent instructions; a symlink is avoided because plugin installs may only
materialize the plugin subtree.

A skill for invoking [open-code-review](https://github.com/alibaba/open-code-review) (`ocr`), an open-source AI code review CLI that reads Git diffs and generates structured, line-level review comments.

## Workflow

### Step 1: Gather Business Context

Analyze the review target (commits, branch, or changes) to extract concise business context. Pass this context via `--background` to improve review quality.

### Step 2: Run Code Review

**Do not pre-check whether `ocr` is installed**, skip probes like `command -v ocr` or `ocr --version`. Assume the CLI is available and run the review directly; that saves a tool call on the common path. Only if the review fails with `command not found` should you install it per Troubleshooting.

Run the OCR command with appropriate flags. **Always pass business context via `--background`** when available:

```bash
ocr review --audience agent --background "business context here" [user-args]
```

**Argument handling:**

The rest: https://github.com/alibaba/open-code-review/blob/HEAD/plugins/open-code-review/skills/open-code-review/SKILL.md
