open-code-review

Reviews Git diffs with the ocr CLI and reports line-level issues by priority.

1|Updated May 25, 2020
One-click install
npx skills add https://github.com/titaneric/dotfiles --skill open-code-review-titaneric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: open-code-review
Source: https://github.com/titaneric/dotfiles/tree/main/dot_agents/skills/open-code-review
Command: npx skills add https://github.com/titaneric/dotfiles --skill open-code-review-titaneric

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @alibaba-group/open-code-review.

What problem does it solve? Manually reviewing every commit, pull request, or working-tree change is slow and inconsistent. This Skill runs AI-driven code review over Git diffs and returns structured, line-level comments classified by priority so you can focus on real bugs, security issues, and performance problems. ## Core Features & Use Cases - Flexible review targets: Review staged/unstaged/untracked workspace changes, a single commit, or a diff between two branches or refs. - Priority-classified findings: Comments are grouped into High, Medium, and Low priority, with optional fix suggestions and automatic fixing when requested. - Custom review rules: Define project-specific rules in JSON (per glob pattern) to enforce team conventions, with preview support via ocr rules check. - Use Case: Before merging a feature branch, ask for a review of the diff against main; the Skill runs ocr review --from main --to feature, then reports high-priority bugs and applies safe fixes after your approval. ## Quick Start Ask the assistant to review your current uncommitted changes for bugs and security issues and list the findings by priority.

Frequently Asked Questions about open-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review uncommitted changes with AI code review?

Run ocr review with no extra arguments to review staged, unstaged, and untracked changes in the current Git repository. Use --audience agent for clean output and pass business context with --background to improve review quality.

How to review a pull request or compare two branches with ocr?

Use ocr review --from main --to your-branch to review the diff between two refs, which covers pull request scenarios. For a single commit, use --commit <sha> to review it against its parent.

What LLM providers does open-code-review support?

The ocr CLI supports Anthropic and OpenAI-compatible endpoints. Configure via OCR_LLM_URL, OCR_LLM_TOKEN, and OCR_LLM_MODEL environment variables, or persist settings with ocr config set, then verify with ocr llm test.

Can I define custom code review rules for my project?

Yes, place a rule.json file in .opencodereview/ at the repo root or pass --rule <path>. Rules map glob patterns to review instructions, and ocr rules check <file> previews which rule applies to a given file.

Why does ocr review fail or produce no comments?

Failures usually mean no LLM is configured or reachable; run ocr llm test first. Very large diffs may be truncated at the 58888 token limit, and the command must run inside a Git repository or use --repo to point at one.