open-code-review
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.
npx skills add alibaba/open-code-review --skill open-code-review --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Open Code Review 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. ## Prerequisites check Before starting a review, verify the environment: ```bash # 1. Check the CLI is installed which ocr || echo "NOT INSTALLED" # 2. Verify LLM connectivity ocr llm test ``` If `ocr` is not installed, install it first: ```bash npm install -g @alibaba-group/open-code-review ``` If `ocr llm test` fails, the user must configure an LLM. Guide them with one of these options: **Option A — Environment variables (highest priority, recommended for CI):** ```bash export OCR_LLM_URL=https://api.anthropic.com/v1/messages export OCR_LLM_TOKEN=<api-key> export OCR_LLM_MODEL=claude-opus-4-6 export OCR_USE_ANTHROPIC=true ``` **Option B — Persistent config:** ```bash ocr config set llm.url https://api.anthropic.com/v1/messages ocr config set llm.auth_token <api-key> ocr config set llm.model claude-opus-4-6 ocr config set llm.use_anthropic true ``` Stop here and ask the user to provide credentials — never invent or hardcode API keys. ## Workflow ### Step 1: Gath
- Prerequisites check
- Workflow
- Step 1: Gather Business Context
- Step 2: Run Code Review
- Step 3: Classify and Report
- Step 4: Fix
- Output Format
- Custom Review Rules
- Gotchas
- Validation
- References
which ocr || echo "NOT INSTALLED" ocr llm test npm install -g @alibaba-group/open-code-review export OCR_LLM_URL=https://api.anthropic.com/v1/messages export OCR_LLM_TOKEN=<api-key> export OCR_LLM_MODEL=claude-opus-4-6 export OCR_USE_ANTHROPIC=true ocr config set llm.url https://api.anthropic.com/v1/messages ocr config set llm.auth_token <api-key> ocr config set llm.model claude-opus-4-6
What does the open-code-review skill do?
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.
How do I install it?
Run `npx skills add alibaba/open-code-review --skill open-code-review --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From alibaba/open-code-review, a repository with 18,702 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.