Open Code Review Delegation Mode

VerifiedCaution

Use open-code-review CLI for deterministic file selection and rule resolution while the host agent performs the actual code review with its own LLM capabilities.

Sby Skills Guide Bot
DevelopmentIntermediate
8/6/2026
Claude CodeCursorCodex
#code-review#git-diff#delegation#ocr-cli#review-rules

Recommended for

Automated summary

This skill has the host agent perform the code review itself while the OCR tool handles only deterministic work: file selection and rule resolution.

Strengths

  • Clean separation between deterministic tooling (preview, file filtering, rules) and the agent's own reasoning
  • No LLM endpoint to configure on the OCR side, so no extra API keys or review costs
  • Explicit seven-step workflow with the right git commands for workspace, range, and commit modes
  • Standardized comment schema (path, line range, category, severity) plus severity-based triage

Limitations

  • Requires the `ocr` CLI to be installed first, via npm or a GitHub release binary
  • Assumes the agent can run shell commands and read diffs, which restricts portability
  • Review quality rests entirely on the host model; OCR itself provides no detection guarantees
When to use it

Use it when an agent with its own reasoning capabilities should produce a structured code review without wiring a separate LLM endpoint into OCR.

When not to use it

Skip it when the `ocr` CLI cannot be installed or the agent has no shell access to run the git and ocr commands.

Security analysis

Caution
Quality score86/100

The skill is transparent and non-malicious: it performs code review support using git, reads files, and depends on an external OCR CLI. The main risks are operational rather than destructive—global npm installation of a third-party package, execution of that CLI, and broad repository access through bash/git. No exfiltration, obfuscation, or destructive commands are present, so it warrants caution rather than risky.

Findings
  • •Requires installing and executing an external CLI (`ocr`) globally via `npm install -g @alibaba-group/open-code-review`, introducing supply-chain and privilege considerations.
  • •Uses bash/git to read repository contents and diffs, which may expose sensitive code to the host agent.
  • •No allowed-tools are declared despite instructing shell, npm, and git operations; host should enforce tool permissions explicitly.
  • •Optional fix step can modify files directly, though only when the user explicitly requests review-and-fix.
How this analysis is made

Examples

Review workspace changes
Use the open-code-review delegate skill to review my uncommitted changes: run `ocr delegate preview`, fetch the rules for the reviewable files, then review each diff and report findings by severity.
Review a feature branch
Review the diff between main and my feature branch using OCR delegation mode. Preview with `ocr delegate preview --from main --to feature`, get the rules, and give me the high and critical issues only.
Review and fix a commit
Run delegation-mode review on commit abc123. After the review, apply the critical and high fixes directly and describe the medium ones that need my input.

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 [--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 <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

For each reviewable file:

  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

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

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 |

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.

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-msh3uuka/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-msh3uuka' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/open-code-review-delegation-mode-msh3uuka/download' --output '.skill-downloads/open-code-review-delegation-mode-msh3uuka/SKILL.md.part' && mv '.skill-downloads/open-code-review-delegation-mode-msh3uuka/SKILL.md.part' '.skill-downloads/open-code-review-delegation-mode-msh3uuka/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-msh3uuka/SKILL.md' && test -s '.skill-downloads/open-code-review-delegation-mode-msh3uuka/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/open-code-review-delegate' && cp -R '.skill-downloads/open-code-review-delegation-mode-msh3uuka' '.claude/skills/open-code-review-delegate'

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

Codex
test -f '.skill-downloads/open-code-review-delegation-mode-msh3uuka/SKILL.md' && test -s '.skill-downloads/open-code-review-delegation-mode-msh3uuka/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/open-code-review-delegate' && cp -R '.skill-downloads/open-code-review-delegation-mode-msh3uuka' '.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-msh3uuka'

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

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-msh3uuka/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