SKILL.md--- name: open-code-review description: > Review workspace changes, PRs, commits, or branch comparisons with OCR's native review pipeline and independently configured model provider. Produces line-level findings and explains the behavior and impact of committed changes by default. Fixes code only when requested. Use when the user wants native mode or has an OCR provider configured. To use the host agent's model without separate OCR credentials, choose open-code-review-delegate instead. 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" --- # 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. ## 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 **GitHub PR mode:** A bare positive number (e.g. `42`) selects a PR in the GitHub CLI's default repository for this checkout, which can be upstream of a fork. The `pr` prefix is optional. For a PR number or GitHub PR URL, run `python3 "$SKILL_DIR/scripts/review_pr.py" <id-or-url>` once, resolving `SKILL_DIR` from this installed skill. Forward an explicit `--repo OWNER/REPO` or `--background`. Read the printed `run.json` and its result file; report the resolved PR URL, reviewed revisions, freshness, and artifact path with Step 3. On failure report the failed step, not a fallback branch review. Only PR mode needs Python 3 and authenticated `gh`. The GitHub PR helper requires `OCR_HOME` to be unset or empty. For custom or mounted storage, run the native `ocr review` command directly. PR mode uses built-in and user review rules, not rules from the PR. It stops if MCP servers are configured or the PR changes Git filtering metadata; do not bypass a policy stop. **Otherwise run `ocr review` directly.** Do not probe with `command -v ocr` or `ocr --version` first; that adds an unnecessary tool call on the normal path. For a workspace review, omit revision flags and `--analysis`. **Pass business context via `--background`** when available: ```bash ocr review --audience agent --background "business context here" ``` **Argument handling:** - **Background context** (RECOMMENDED): use `--background "context"` or `-b "context"` to provide business context for better review quality - **Default**