Skip to content
Skillpedia
Testing47k · #6315

open-code-review-delegate

What it does

This tool helps review programming code. It identifies which parts of the code need checking and which rules to follow, leaving the detailed analysis to the main agent's intelligence. It's useful when the main agent should be the one performing the review.

When to use it

  • ✓When you want the main AI agent to analyze the code.
  • ✓To check changes in specific code or a set of files.
  • ✓When comparing different code versions for review.

Skill link

https://github.com/alibaba/open-code-review/blob/main/plugins/open-code-review/skills/open-code-review-delegate/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/alibaba/open-code-review/blob/main/plugins/open-code-review/skills/open-code-review-delegate/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Review the code for me, focusing on security and performance.”

5 new skills a week. 1 minute to read.

open-code-review-delegate: full guide

Code review tools often need their own connection to an AI model, with an API key and a separate bill. If you already pay for a coding agent such as Claude Code or Codex, that is an extra setup you may not want. This skill removes it.

Here the open-code-review command line tool (called ocr) does only the routine preparation. It picks which changed files need review, and it finds the rules that apply to each one. Your own agent then reads the changes and writes the review using the model you already have. The skill also asks the agent to explain changes that affect users or callers of the code, not only to list defects. It suits people who want a review of a pull request, a commit or unsaved work without a second AI account.

Use cases

Check a branch before opening a pull request

You finish a feature on a branch and want a second look before asking a colleague. You ask the agent to review the branch against main. It lists the changed files, applies the matching rules, and reports bugs sorted by severity, such as a missing error check.

Review one suspicious commit

A bug appeared after a recent update and you suspect one commit. You give the agent the commit hash. It reviews only that commit's diff, reads nearby history for context, and tells you whether the change could cause the problem you describe.

Spot changes that break other people's scripts

You removed a command-line option during a cleanup. The skill asks the agent to describe behavior changes even when no bug exists. The agent can point out that scripts still passing that option will now fail, and say where it saw this.

Step by step

  1. 1Install the ocr command line tool with npm install -g @alibaba-group/open-code-review, or use a release binary from GitHub. You do not need an API key or a model endpoint for it.
  2. 2Put the skill folder in ~/.claude/skills/open-code-review-delegate/ or in your project's .claude/skills/, then open your agent inside the Git repository you want reviewed.
  3. 3Ask for a review and say what to compare: your unsaved changes, a branch against main, or one commit. Add business context if it helps, for example what the feature should do.
  4. 4The agent runs ocr to list reviewable files and fetch rules, then reads each diff. It marks every file as reviewed or skipped with a reason.
  5. 5Read the report: findings grouped by severity, a coverage summary, and any behavior changes. Ask the agent to fix the high and critical items if you want.

Example

What to ask

“Review my branch feature/export-csv against main. We changed how dates are written in the export, so check anything that could break people who already use it.”

What you get

The agent reports 9 of 9 files reviewed. It lists one high finding: dates in the CSV writer now lack a timezone, so imports may shift by a day. It also notes a changed behavior: the old date format option was removed, so scripts passing it will now fail.

Tips

  • ✓Tell the agent to compare against the right branch. In range mode the review covers only committed changes, so staged, unstaged and untracked files are left out. Commit your work first or use workspace mode.
  • ✓The review runs on your agent's own model, so your usage limits and costs still apply. Very large changes take many turns, so review a few folders at a time.
  • ✓If a command says it does not know the --format flag, your ocr version is older than 1.9.0. The skill then falls back to text output. Upgrade ocr if you need JSON output.

Alternatives

  • ponytail-audit

    Pick it when you want a full audit of existing code, including slow code and things to remove, rather than a review of a specific set of changes.

  • verify-and-stop

    Pick it when the question is whether finished work meets its requirements, with a clear pass or fail result, instead of a line-by-line review.

  • qa-acceptance

    Pick it when you need acceptance criteria and a test plan for a new feature before or while building it.

Questions and answers

Do I need an API key or a separate AI account?

No. The ocr tool does not call any model in this mode. Your coding agent does the review with the model you already use, so only its normal usage limits and costs apply.

Can it review changes I have not committed yet?

Yes. Workspace mode, which is the default, covers tracked changes and new untracked files. Range mode, which compares branches, only includes committed work.

What happens if the ocr command is missing?

The skill tells the agent to install it with npm if your environment allows. If installing is not allowed, the agent explains what is missing and stops. It will not switch to another review method or ask for a key.

How it works

First, the tool identifies the files to be reviewed and the applicable rules. Then, it gets the differences (what changed) between code versions. Finally, the main agent uses this information to perform the review.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Open Code Review — Delegation Mode

This Codex plugin skill intentionally mirrors the canonical skill at skills/open-code-review-delegate/SKILL.md. Keep both files synchronized when updating OCR delegation instructions; a symlink is avoided because plugin installs may only materialize the plugin subtree.

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.

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

Choose the diff command using the mode and refs from Step 1. Use git --no-pager for every Git call during the review.

The diff commands disable external diff programs, text conversion, and color to produce plain patches.

Range mode (merge_base provided in preview output):

git --no-pager diff --no-ext-diff --no-textconv --no-color <merge_base>..<to> -- "<path>"

Commit mode:

git --no-pager show --no-ext-diff --no-textconv --no-color <commit> -- "<path>"

Workspace mode:

# Tracked files
git --no-pager diff --no-ext-diff --no-textconv --no-color HEAD -- "<path>"
# New untracked files — read directly (entire file is new code)
cat "<path>"

To read context:

git --no-pager log --no-color --oneline -- "<path>"
git --no-pager blame --no-textconv -- "<path>"
git --no-pager show --no-ext-diff --no-textconv --no-color "<ref>:<path>"

For large diffs, add --output="<absolute-diff-file>" to the command for the selected mode. Choose a unique absolute path outside the repository and create its parent directory. Use the same path in file-reading tool calls:

git --no-pager diff --no-ext-diff --no-textconv --no-color --output="<absolute-diff-file>" <merge_base>..<to> -- "<path>"

After Git exits with code 0, read and review the entire file in chunks, then remove it. If Git fails or times out, retry or record skipped with the error. Check unexpectedly empty output against a fresh preview.

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

…

FAQ

What does 'delegation' mean?

It means the tool delegates the main analysis task to the primary AI agent, focusing only on organizing and preparing the necessary information for that analysis.

Do I need programming knowledge to use this?

No, the tool is designed for simple use. You just need to indicate what you want to review.

What are 'rules'?

These are guidelines or standards that the code should adhere to, such as best practices for security or programming style.

Details

Original description by the author

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.

repo: alibaba/open-code-review

Popularity

GitHub stars
47k
Ranking position
#6315
License
Apache-2.0
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills