alibaba/open-code-review

open-code-review-delegatealibaba/open-code-review / skills/open-code-review-delegate/SKILL.md

Review workspace changes, PRs, commits, or branch comparisons with the host agent's model.

  • SKILL.md 已保存
  • 英文来源资料
  • 安装与运行未实测
先判断是否解决你的问题

open-code-review-delegate 是什么?

Review workspace changes, PRs, commits, or branch comparisons with the host agent's model. OCR's CLI selects files and resolves rules; the host reviews them for defects and explains changes that affect users or callers. Use when the user has no separate API key for OCR or wants to reuse their coding-agent subscription or model setup. For OCR's full native pipeline with its own model provider, choose open-code-review instead.

以上为来源原文,中文用途说明尚待整理。

同名项目,请核对仓库和目录

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 open-code-review-delegate,然后告诉 Agent 你的任务和实际输入,让它先核对触发条件。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 open-code-review-delegate

请在 Codex 的当前工作环境中安装并检查 open-code-review-delegate 这个 Skill。

项目身份:alibaba/open-code-review / open-code-review-delegate
来源:https://github.com/alibaba/open-code-review/blob/78c2e0e26f62ea150044cb0be2357b93f80f5b86/skills/open-code-review-delegate/SKILL.md
已定位的源文件:skills/open-code-review-delegate/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-22T03:34:45.756Z
中文使用说明
尚待整理,保留英文来源内容
安装与任务测试
本站未执行安装或任务测试
来源复核
已保留来源记录;当前完整用法未逐项人工复核
展开 SKILL.md 原文、章节与历史收录资料

skills/open-code-review-delegate/SKILL.md · 抓取时间 2026-11-22T03:34:45.756Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Review workspace changes, PRs, commits, or branch comparisons with the host agent's model. OCR's CLI selects files and resolves rules; the host reviews them for defects and explains changes that affect users or callers. Use when the user has no separate API key for OCR or wants to reuse their coding-agent subscription or model setup. For OCR's full native pipeline with its own model provider, choose open-code-review instead.

查看源文件章节 / Source sections
  • 原文:Open Code Review — Delegation Mode
  • 工作流程 / Workflow
  • 原文:Step 1: Preview — Determine What to Review
  • 原文:Step 2: Get Rules for Files
  • 原文:Step 3: Get Diffs
  • 原文:Step 4: Review Each File
  • 原文:Step 5: Format Output
  • 原文:Step 6: Classify and Report
  • 原文:Step 7: Fix (Optional)
  • 原文:Sub-commands Reference
  • 原文:Shared Flags
  • 原文:Gotchas
  • 原文:Recovering Oversized Background Context
  • 原文:Troubleshooting CLI Version Compatibility
原文:Step 1: Preview — Determine What to Review

Skip OCR provider setup and `ocr llm test`; the host agent's authentication, usage limits, and costs still apply. ```bash ocr delegate preview --format json [--from <ref> [--to <ref>]] [--commit <hash>] [--exclude <patterns>] ``` With `--from` and no `--to`, both delegate subcommands default to `HEAD`. Range review compares the merge-base to the target commit and excludes staged, unstaged, and untracked changes. Omit range/commit flags for workspace mode; range and commit flags are mutually exclusive. 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` | | Current branch against main | `ocr delegate preview --from main` | | Single commit | `ocr delegate preview -c abc123` |

原文:Step 2: Get Rules for Files

```bash ocr delegate rule --format json [--from <ref> [--to <ref>]] [--commit <hash>] <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. Pass the same range or commit flags as in Step 1 so rules are resolved against the same target. For example, pair `ocr delegate preview --from main` with `ocr delegate rule --from main --format json <path...>`.

原文: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): ```bash git --no-pager diff --no-ext-diff --no-textconv --no-color <merge_base>..<to> -- "<path>" ``` **Commit mode**: ```bash git --no-pager show --no-ext-diff --no-textconv --no-color <commit> -- "<path>" ``` **Workspace mode**: ```bash # 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: ```bash 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: ```bash 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. While reading each diff, ask which existing caller or user workflow, if any, behaves differently. Reuse the same evidence; follow a caller, contract, or test only when it helps establish a concrete before/after scenario. Compare the sides selected in Step 3 (the new side in workspace mode is the live working tree). Assess behavior changes as you review the diff. Do not run `ocr review --analysis` or pass `--analysis` to `ocr delegate`. A removed interface may matter even when there are no new lines to review. If preview excludes a file solely as `deleted`, use its old side as context when needed, without counting it as reviewed. Respect all other exclusions when following evidence.

原文: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

Identify the review mode as delegation. 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. Report a material behavior change even if it is intentional and there are no defects. Name the affected workflow, what happened before and what happens now, and cite the supporting location. For example, removing a public option can break scripts that still pass it. Keep this impact distinct from severity-rated findings and file coverage; if it explains a finding, describe it there only once. Qualify material uncertainties, and omit the impact section when there is no concrete change to report.

文件 SHA256:4e804ebeaf5938eafa3b2b40a079c41066150438f916bd0294119f395804add4

仓库许可证记录:Apache-2.0;skill-declaration-captured-not-interpreted,查看来源。

SKILL.md原文description · 2026-11-22T03:34:45.756Z

Review workspace changes, PRs, commits, or branch comparisons with the host agent's model. OCR's CLI selects files and resolves rules; the host reviews them for defects and explains changes that affect users or callers. Use when the user has no separate API key for OCR or wants to reuse their coding-agent subscription or model setup. For OCR's full native pipeline with its own model provider, choose open-code-review instead.

查看历史简介来源

历史收录数据

来源仓库alibaba/open-code-review
Skill源路径skills/open-code-review-delegate/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源