Open Code Review Delegation Mode

VerifiedCaution

Delegation mode for open-code-review: the host agent performs code review using its own LLM capabilities, while OCR handles deterministic file selection and rule resolution.

Sby Skills Guide Bot
DevelopmentIntermediate
8/8/2026
Claude CodeCursorWindsurfCodex
#code-review#delegation#git-diff#cli#llm-free

Recommended for

Automated summary

This skill lets the host agent perform the code review itself, relying on OCR only for deterministic work: file selection and rule resolution.

Strengths

  • Cleanly separates deterministic engineering (file filtering, rules) from the intelligent review handled by the agent
  • Requires no LLM endpoint configuration on the OCR side, simplifying setup
  • The six-step workflow (preview, rules, diffs, review, formatting, reporting) is precise and repeatable
  • Enforces coverage verification with a coverage rate and explicit reasons for skipped files

Limitations

  • Depends on the `ocr` CLI being installed via npm or a GitHub release binary
  • Assumes the host agent is comfortable running git commands to build diffs per mode (range, commit, workspace)
  • The prescribed comment output format may not match other review conventions
When to use it

Use when you want your host agent to drive the review itself while delegating file selection and rule resolution to OCR.

When not to use it

Avoid this skill if the `ocr` CLI is not installed or if you prefer a fully automated review driven by an external LLM configured within OCR.

Security analysis

Caution
Quality score85/100

The skill is a legitimate code-review workflow and does not contain destructive, exfiltrating, or obfuscated instructions. However, it directs the agent to install and run an external CLI, invoke git commands, read files, and optionally apply fixes, so it uses powerful tools for legitimate purposes and warrants a caution rating rather than safe.

Findings
  • •Instructs installing and executing a third-party global npm CLI (`@alibaba-group/open-code-review`), which has normal supply-chain and local execution risk.
  • •Runs `ocr`, `git diff`, `git show`, and `cat` against repository contents; this is read-oriented but still executes local tooling.
  • •Step 7 optionally applies High/Critical fixes directly, which can modify repository files and should be explicitly gated by user request.
How this analysis is made

Examples

Review workspace changes
Run a delegated code review on my current workspace changes using OCR: preview the reviewable files, fetch the rules, get the diffs, and report findings grouped by severity.
Compare two branches
Use delegation mode to review the diff between main and my feature branch. Start with `ocr delegate preview --from main --to feature`, then review each file and give me a coverage summary.
Review a single commit
Do a delegated code review of commit abc123. Use OCR to select files and resolve rules, then review the diff yourself and format comments with path, content, and severity.

name: open-code-review-delegate description: > 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, using OCR only for deterministic engineering: file selection and rule resolution. Use when the host agent should drive the review with its own LLM capabilities. license: Apache-2.0 compatibility: > Requires the ocr CLI installed (via npm install -g @alibaba-group/open-code-review or GitHub release binary). Does NOT require a configured LLM endpoint — delegation mode is LLM-free on the OCR side. metadata: author: alibaba homepage: https://github.com/alibaba/open-code-review version: "1.0.0"

Open Code Review — Delegation Mode

A skill for performing AI code review where OCR provides deterministic engineering (file filtering, rule resolution) and the host agent performs the actual review using its own intelligence and tools.

Prerequisites

which ocr || echo "NOT INSTALLED"

If ocr is not installed:

npm install -g @alibaba-group/open-code-review

No LLM configuration is needed for delegation mode.

Workflow

Step 1: Preview — Determine What to Review

ocr delegate preview --format json [--from <ref> --to <ref>] [--commit <hash>] [--exclude <patterns>]

This outputs:

  • mode (workspace / range / commit)
  • from / to / commit / merge_base — ref metadata for constructing git commands
  • Reviewable file list — paths, status, insertions/deletions
  • Excluded files — with exclusion reason

Common invocations:

| Scenario | Command | |----------|---------| | Workspace changes | ocr delegate preview | | Branch comparison | ocr delegate preview --from main --to feature | | Single commit | ocr delegate preview -c abc123 |

Step 2: Get Rules for Files

ocr delegate rule --format json <path1> <path2> ...

Pass the reviewable file paths from Step 1. Output is grouped by rule content — files sharing the same rule appear under one group, avoiding repetition.

Step 3: Get Diffs

Use git directly based on the mode/ref info from Step 1:

Range mode (merge_base provided in preview output):

git diff <merge_base>..<to> -- <path>

Commit mode:

git show <commit> -- <path>

Workspace mode:

# Tracked files
git diff HEAD -- <path>
# New untracked files — read directly (entire file is new code)
cat <path>

Step 4: Review Each File

Create a checklist containing every reviewable_files entry. For each reviewable file:

Use (path, status) as the checklist identity. Workspace mode can report the same path twice when a staged deletion is followed by an untracked recreation.

  1. Get its diff (Step 3)
  2. Consult its Rule Group (from Step 2) for the review checklist
  3. Conduct a thorough review, using appropriate context tools as needed
  4. Mark the file reviewed, or skipped with a concrete reason

For large changes, review in bounded batches grouped by shared rules and diff size. Do not stop after finding the first high-severity issue.

Step 5: Format Output

Each comment must follow this structure:

| Field | Type | Required | Description | |-------|------|----------|-------------| | path | string | yes | Relative file path | | content | string | yes | Review comment describing the issue | | start_line | integer | no | Start line in the new file | | end_line | integer | no | End line in the new file | | category | enum | no | bug, security, performance, maintainability, test, style, documentation, other | | severity | enum | no | critical, high, medium, low |

Step 6: Classify and Report

Before reporting, verify that every previewed file is accounted for. Include total_files, reviewed_files, skipped_files, and coverage_rate in the summary. A skipped file must include its reason.

Group findings by severity:

  • Critical/High: Bugs, security issues, data loss risks — always report
  • Medium: Performance concerns, error handling gaps, maintainability issues — report with context
  • Low: Style nits, minor suggestions — report only if clearly valuable

Discard likely false positives silently.

Step 7: Fix (Optional)

If the user requested "review and fix":

  • Apply High/Critical fixes directly
  • Describe Medium fixes that require manual intervention
  • Skip Low-priority items unless trivial

Sub-commands Reference

| Command | Purpose | |---------|---------| | ocr delegate preview | Which files to review + mode/ref metadata | | ocr delegate rule <path...> | Review rules grouped by content |

Shared Flags

| Flag | Description | |------|-------------| | --from <ref> | Source ref for range mode | | --to <ref> | Target ref for range mode | | -c, --commit <hash> | Single commit mode | | --repo <path> | Repository root (default: cwd) | | --rule <path> | Custom rule.json path | | --exclude <patterns> | Comma-separated exclude patterns | | -b, --background <text> | Business context | | -B, --background-file <path> | Business context from Markdown file | | -f, --format <text\|json> | Output format; use json for agent integrations |

Gotchas

  • No LLM needed on OCR side — delegation mode never calls an LLM. All intelligence comes from the host agent.
  • Rules are grouped — Files sharing the same rule are grouped together in the output. You can pass any number of paths per call; for large changes, fetch rules per-batch as you review.
  • Working directory matters — ocr delegate operates on the Git repo at the current directory. Use --repo /path to override.
  • Untracked files in workspace mode — preview includes untracked files. For these, read the file directly instead of using git diff.
  • Background context — pass --background to preview when you have requirement context; it appears in the output for your reference during review.
  • Coverage is mandatory — every reviewable_files entry must end as reviewed or explicitly skipped; do not silently omit files.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/open-code-review-delegation-mode-msjwk5tn' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/open-code-review-delegation-mode-msjwk5tn/download' --output '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md.part' && mv '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md.part' '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Environment declared by the author: Requires the `ocr` CLI installed (via `npm install -g @alibaba-group/open-code-review` or GitHub release binary). Does NOT require a configured LLM endpoint — delegation mode is LLM-free on the OCR side.

Original excerpt: Prerequisites
which ocr || echo "NOT INSTALLED"

If ocr is not installed:

npm install -g @alibaba-group/open-code-review

No LLM configuration is needed for delegation mode.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md' && test -s '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/open-code-review-delegate' && cp -R '.skill-downloads/open-code-review-delegation-mode-msjwk5tn' '.claude/skills/open-code-review-delegate'

Cursor
test -f '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md' && test -s '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/open-code-review-delegate' && cp -R '.skill-downloads/open-code-review-delegation-mode-msjwk5tn' '.cursor/skills/open-code-review-delegate'

Codex
test -f '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md' && test -s '.skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/open-code-review-delegate' && cp -R '.skill-downloads/open-code-review-delegation-mode-msjwk5tn' '.agents/skills/open-code-review-delegate'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/open-code-review-delegation-mode-msjwk5tn'

openskills read 'open-code-review-delegation-mode-msjwk5tn'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/open-code-review-delegation-mode-msjwk5tn/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills