open-code-reviewlisted
Install: claude install-skill JZKK720/cubecloud-skills-bundle-kit
# 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: Gather Business Context
Before running the review, inspect the review target (commits, branch, working copy) and synthesise a short `--background` string that captures the intent of the changes. This improves review quality by giving the LLM context about what the code is trying to achie