mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
* feat: add open-code-review skill for agent integration Add skills/open-code-review/SKILL.md that teaches coding agents how to invoke ocr for code review, classify issues by priority, and optionally apply fixes. * feat: add Claude Code plugin for open-code-review Add .claude-plugin/marketplace.json and plugins/open-code-review/ with plugin configuration and review command, enabling installation as a Claude Code slash command plugin. * docs: add agent integration section to README (EN/ZH) Add 'Integration into Coding Agents' section covering three methods: skill installation, Claude Code plugin, and direct command file copy. Bilingual update for both README.md and README.zh-CN.md. * docs: update manual setup curl URLs to new plugin path
1.4 KiB
1.4 KiB
| description |
|---|
| Run OpenCodeReview (OCR) to review code changes and autonomously apply fixes. |
Invoke the professional code review Agent CLI tool OpenCodeReview (OCR) to review current code changes, and let the Agent autonomously decide whether to apply fixes.
Workflow
Step 1: Run Code Review
Run the OCR command:
ocr review --audience agent [user-args]
- Default (no user arguments): reviews staged, unstaged, and untracked changes (workspace mode).
- If the user provides
--commitor--c: pass through as-is. - If the user provides
--fromand--to: pass through as-is. - (Optional) Provide
--background "requirement context"to review whether the requirements are correctly implemented. - Capture full stdout. Set a 5-minute timeout.
- If the
ocrcommand is not found, install it by runningnpm i -g @alibaba-group/open-code-review.
Step 2: Filter and Evaluate
For each comment, assess its validity and quality:
- High: Obvious bugs, security issues, clear mistakes, or well-founded suggestions with precise fix proposals
- Medium: Reasonable concerns but context-dependent, style/performance suggestions, or fixes that require manual implementation
- Low: Likely false positives, lacking sufficient context, nitpicks, or meaningless suggestions
Silently discard low-confidence comments. Display the remaining comments.
Step 3: Fix
Automatically fix issues and suggestions that are worth adopting.