open-code-review
自动生成行级审查意见,适合 PR/提交审查流程化。
需要安装第三方 ocr CLI 并可能访问远程模型或网络。
调用 ocr CLI 对 Git 变更做 AI 驱动的逐行代码审查。
用 alibaba/open-code-review 的 ocr CLI 对 Git 变更做逐行 AI 审查,能生成结构化的行级评论并在需要时自动应用修复建议。适合审查 PR、commit、已暂存或未暂存的改动,或对比分支时寻找 bug、安全漏洞、性能和代码质量问题。特点是基于 Git diff 给出可复现的评论和补丁,能按规则检测多类问题并输出可直接用的修复建议。
▸ 展开 SKILL.md 英文原文
Performs AI-powered code review on Git changes using the `ocr` CLI from alibaba/open-code-review. Use when the user asks to review code, review a pull request, review staged/unstaged changes, review a commit, or compare branches for code quality issues. Produces line-level review comments and can automatically apply fixes when requested. With appropriate review rules, can detect various types of issues including bugs, security vulnerabilities, performance problems, and code quality concerns.
帮我安装这个 skill:https://raw.githubusercontent.com/alibaba/open-code-review/main/skills/open-code-review/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/alibaba/open-code-review/main/skills/open-code-review/SKILL.md"# Open Code Review A skill for invoking [open-code-review](https://github.com/alibaba/open-code-review) (`ocr`) — an open-source AI code review CLI that reads Git diffs and generates structured, line-level review comments. ## Prerequisites check Before starting a review, verify the environment: ```bash # 1. Check the CLI is installed which ocr || echo "NOT INSTALLED" # 2. Verify LLM connectivity ocr llm test ``` If `ocr` is not installed, install it first: ```bash npm install -g @alibaba-group/open-code-review ``` If `ocr llm test` fails, the user must configure an LLM. Guide them with one of these options: **Option A — Environment variables (highest priority, recommended for CI):**