open-code-review-deleg…
Delegation mode for open-code-review (OCR). Instead of OCR calling an LLM endpoint, this skill instructs the host agent to perform the code review itself,…
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
$ npx -y skills add alibaba/open-code-review --skill open-code-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/open-code-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: 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. license: Apache-2.0 compatibility: > Requires the `ocr` CLI installed (via `npm install -g @alibaba-group/open-code-review` or GitHub release binary). Requires a configured supported LLM provider before first run (protocols: Anthropic, OpenAI Chat Completions, OpenAI Responses, AWS Bedrock). metadata: author: alibaba homepage: https://github.com/alibaba/open-code-review version: "1.0.0"
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.
Analyze the review target (commits, branch, or changes) to extract concise business context. Pass this context via `--background` to improve review quality.
Run the OCR command with appropriate flags. **Always pass business context via `--background`** when available:
ocr review --audience agent --background "business context here" [user-args]
**Argument handling:**
**Common invocation patterns:**
| User says | Command to run | |-----------|---------------| | "review my changes" / "review the working copy" | `ocr review --audience agent -b "context"` | | "review this PR" / "review feature branch" | `ocr review --audience agent -b "context" --from main --to <branch>` | | "review commit abc123" | `ocr review --audience agent -b "context" --commit abc123` | | "what would be reviewed?" (dry-run) | `ocr review --preview` |
**Output mode:**
**On failure:** If `ocr review` exits non-zero (e.g. an LLM connection error), do not retry blindly — consult the Troubleshooting section below for the matching fix before re-running.
OCR output includes structured `severity` (critical / high / medium / low) and `category` (bug / security / performance / maintainability / test / style / documentation / other) on each comment. Present results grouped by severity, discarding `low` severity items that are likely false positives or nitpicks.
Before applying fixes, check whether the user requested automatic fixes:
When fixing issues and suggestions:
Each comment in OCR's output contains:
Present results grouped by severity using this template:
## Code Review Results **Files reviewed**: N **Issues found**: X critical, Y high, Z medium ### Critical - **`path/to/file.java:42`** [bug] — Brief description > Recommendation: How to fix ### High - **`path/to/file.java:26`** [bug] — Brief description > Recommendation: How to fix ### Medium - **`path/to/file.ts:88`** [performance] — Brief description > Recommendation: How to fix (if applicable)
If no critical, high, or medium severity issues remain after filtering, state: "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.
Delegation mode for open-code-review (OCR). Instead of OCR calling an LLM endpoint, this skill instructs the host agent to perform the code review itself,…