bashrusakh/opencode-agents/open-code-review
Claude Code and agent skill by bashrusakh/opencode-agents
- community
Checking that the SKILL.md file is still in the repository.
Provides Alibaba Open Code Review's native `ocr review` workflow using an independently configured LLM provider. Use when user/project policy requires managed OCR or when the reviewer determines it materially improves confidence for the current risk. Produces line-level review comments; fixes only when requested and permitted by the active workflow.
Install
npx vskill@latest install bashrusakh/opencode-agents/open-code-reviewSKILL.md
The same SKILL.md was published earlier as bashrusakh/opencode-agents/open-code-review.
Open Code Review
A skill for invoking open-code-review (ocr) — an open-source AI code review CLI that reads Git diffs and generates structured, line-level review comments.
This Skill documents the normal ocr review workflow. OCR delegation mode is a separate workflow/Skill: in delegation mode OCR performs deterministic file selection and rule resolution while the host agent performs the review itself.
Workflow
Step 1: Gather Business Context
Analyze the review target (commits, branch, or changes) to extract concise business context. Pass this context via --background or --background-file to improve review quality.
Step 2: Run Code Review
Do not pre-check OCR availability on the managed-review common path. Skip probes such as command -v ocr, which ocr, or ocr --version; run the requested ocr review directly. Enter the installation path only if that invocation fails because ocr is not found; installation remains subject to the active workflow's user-approval gate for new tooling and must not happen automatically.
Run the OCR command with appropriate flags. Always pass business context when available:
For longer Markdown context, prefer:
--background-file takes precedence over --background when both are supplied.
Review Target
- Default (no target arguments): reviews staged, unstaged, and untracked changes (workspace mode)
- Specific commit:
--commit <ref>or-c <ref>reviews one commit against its parent - Branch/range comparison:
--from <ref> [--to <ref>]reviews committed changes from the merge-base to the target ref; when--tois omitted, the target defaults toHEAD. - Repository root:
--repo <path>runs against another repository root instead of the current directory - Exclude paths:
--exclude <patterns>adds comma-separated gitignore-style exclusions and merges them with rule-file exclusions - Custom rule file:
--rule <path>selects an explicit review-rule JSON file
Only one diff mode may be used: either range mode (--from with optional --to) or --commit; these modes are mutually exclusive.
Behavior and Impact Analysis
For a fresh commit or range review (--commit or --from), run Review and Analysis together with --analysis by default. Use --format json unless the caller requests another supported format. Preserve the caller's repository, revision selection, background context, and output path; adding Analysis must not change the requested review target.
Omit --analysis for workspace reviews, --preview, --resume, and --format sarif, or when the user explicitly asks to skip Analysis. If the user explicitly requests Analysis in an unsupported mode, explain the conflict instead of silently changing the target or output format.
Agent Output
Always use --audience agent when another agent will consume the result. It suppresses human progress UI and emits the final review summary.
For machine-readable or integration output, --format / -f supports:
text(default)jsonsarif
For large reviews, use --output <path> / -o <path> and read the complete file instead of piping stdout through head or tail:
An empty output path or - means stdout. A real output file is created lazily, so a failed run does not truncate an existing file before the first write.
If --output fails specifically with unknown flag: --output, the installed CLI predates that flag. Do not silently fall back to potentially truncated stdout. Ask whether to upgrade with:
After an approved successful upgrade, rerun with --output.
Model and Review Controls
Use these when the task or environment needs them:
--provider <name>— override the configured LLM provider for this run--model <name>— override the configured model for this run--effort low|medium|high— override review effort; default is configured value ormedium--no-filter— keep all review comments instead of running OCR's LLM post-filter--concurrency <n>— max concurrent review groups; default8--timeout <minutes>— timeout per concurrent task; default15--max-tools <n>— max tool-call rounds per subtask;0uses the template default (100), values1-49are raised to50, and the resolved override only takes effect when it is greater than the template default (so this flag can raise the limit, not lower it)--max-git-procs <n>— max concurrent Git subprocesses; default16--max-tokens <n>— per-group prompt token ceiling;0uses configured or template default--max-tokens-budget <n>— total input+output token budget for the review;0means unlimited--analysis— run behavior/impact Analysis alongside Review for supported fresh commit/range targets; see the mode restrictions above--analysis-max-tokens-budget <n>— separate soft token limit for Analysis only;0means unlimited, and usage is reported inanalysis_meta.usage--tools <path>— override the embedded tools configuration with a JSON tools config--preview/-p— show what would be reviewed without running the LLM
--max-tokens-budget is checked before every LLM round, not only when dispatching a new group. A subtask already over budget gets one bounded final round to submit findings and is reported as failed(budget); no further subtasks are dispatched, and partial results are still published.
Timeout and Effort
Effective timeout per review group is approximately --timeout multiplied by the review-round count selected by effort. With the current defaults, --timeout 15 and medium effort (2 rounds) gives a 30-minute group budget; low/high correspond to 1/3 rounds and therefore approximately 15/45 minutes.
Set any surrounding shell/tool timeout to at least the effective OCR budget plus reasonable headroom.
Resume and Session Workflow
OCR persists review sessions. Use:
ocr session also accepts the alias ocr sessions; list accepts ls, and compare accepts diff.
A session ID from ocr session list can be passed to ocr review --resume <session-id>, but review resume is supported only for explicit range or commit review. Workspace resume is not supported.
Valid patterns:
Do not use --resume with --preview.
Common Invocation Patterns
| User says | Command to run | |
|---|---|---|
| "review my changes" / "review the working copy" | ocr review --audience agent -b "context" | |
| "review this PR" / "review feature branch" | ocr review --audience agent -b "context" --from main --to <branch> --analysis --format json | |
| "review the current branch against main" | ocr review --audience agent -b "context" --from main --analysis --format json | |
| "review commit abc123" | ocr review --audience agent -b "context" --commit abc123 --analysis --format json | |
| "review with a specific model" | ocr review --audience agent --provider <provider> --model <model> -b "context" | |
| "resume that branch review" | ocr review --audience agent --from <from> --to <to> --resume <session-id> | |
| "what would be reviewed?" | ocr review --preview |
On failure: If ocr review exits non-zero (for example because an LLM connection fails), do not retry blindly. Match the failure to the Troubleshooting guidance before rerunning.
Step 3: Report
OCR output includes structured severity (critical / high / medium / low) and category (bug / security / performance / maintainability / test / style / documentation / other) on each comment. Present results grouped by severity, discarding low severity items that are likely false positives or nitpicks.
For combined Review and Analysis runs, report the two outcomes separately. In ocr.review-with-analysis/v2 JSON:
- Review: report findings from
commentsand coverage fromreview_status
and manifest.coverage when available. A zero exit code or empty comments does not by itself prove that every selected file was reviewed.
- Analysis: summarize before/after behavior, affected workflows, and
decisions supported by analysis. Distinguish analysis_meta.execution_status from analysis_meta.declared_completion (the model's assessment). For example, execution_status: completed with declared_completion: partial means the investigation ran but left questions open. If Analysis was skipped or failed, say why when known and retain the Review findings; do not infer that behavior is unchanged.
If the combined schema or Analysis metadata is missing, report Analysis as unverified. If the caller requested text, use the Review summary and appended Analysis Report instead of expecting the JSON schema.
Step 4: Fix
Before applying fixes, check whether the user requested automatic fixes:
- If the user explicitly requested "review and fix" or similar, proceed with automatic fixes when the active agent/project policy allows mutation
- If the user requested review only, do not modify code without separate authorization
When fixing issues and suggestions:
- Focus on critical, high, and medium severity items
- Apply fixes directly only when safe, well-defined, and allowed by the active workflow
- For complex fixes requiring manual intervention, clearly describe what needs to be done
- Do not commit or publish changes unless the active workflow/user authorization permits it
Output Format
Each comment in OCR's output can contain:
path: file pathcontent: review comment textstart_line/end_line: line range (both0means positioning failed)category: issue category (bug,security,performance,maintainability,test,style,documentation,other)severity: issue severity (critical,high,medium,low)suggestion_code: optional fix suggestionexisting_code: optional original code snippetthinking: optional model reasoning field when emitted by the selected output path/model
Present results grouped by severity using this template:
Only state "Review complete — no critical, high, or medium issues found in N files" when Review coverage supports that conclusion. Otherwise report the known coverage and gaps instead of implying a complete review. For combined runs, also report the Analysis outcome separately.
Handling Mispositioned Comments
When start_line and end_line are both 0, the comment failed to locate the exact position in the file. In such cases:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/open-code-review/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 Nov 2026, 24 days ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bashrusakh/opencode-agents/open-code-review)