coderabbit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CodeRabbit CLI Review

CodeRabbit CLI 审查

Run CodeRabbit (
cr
/
coderabbit
) for automated diff review before push. Pair with
greptile
for the default pre-CI workflow — both tools catch different issues and mirror CI.
在推送前运行CodeRabbit
cr
/
coderabbit
)进行自动化差异审查。搭配**
greptile
**使用可实现默认的预CI工作流——这两款工具能发现不同的问题,与CI流程形成互补。

Relationship to analyze-* skills

与analyze-*技能的关系

The
analyze-code
,
analyze-project
, and
analyze-tests
skills are for manual or agent-driven pre-review checks—they run concrete commands (lintro, ripgrep, coverage, etc.) and produce structured findings before you open a PR.
This skill uses CodeRabbit CLI for external AI diff review. Follow the
lint
and
test
skills (or the
commit
skill, which includes them) before invoking CodeRabbit. Do not duplicate full analyze rubrics here.
analyze-code
analyze-project
analyze-tests
技能用于手动或Agent驱动的预审查检查——它们会运行具体命令(如lintro、ripgrep、coverage等),并在你发起PR前生成结构化的检查结果。
本技能使用CodeRabbit CLI进行外部AI差异审查。在调用CodeRabbit之前,请先执行
lint
test
技能(或包含这两项的
commit
技能)。请勿在此处重复完整的analyze检查规则。

Relationship to greptile

与greptile的关系

Default pre-push flow when CI runs both tools:
text
commit → [greptile ‖ coderabbit] → pr
Each step names the skill to follow.
Run greptile and coderabbit in parallel when possible. Do not re-run on unchanged code.
当CI同时运行这两款工具时,默认的推送前流程如下:
text
commit → [greptile ‖ coderabbit] → pr
每个步骤标明了后续应使用的技能。
尽可能并行运行greptilecoderabbit。请勿对未修改的代码重复运行。

Commands

命令

  • cr -h
    /
    coderabbit --help
    — Show CodeRabbit help
  • coderabbit review --agent --type committed --base main
    — Full branch diff against main (default for agents; matches CI intent)
  • coderabbit review --agent --type uncommitted
    — Uncommitted (staged + unstaged); quick spot check
  • coderabbit doctor
    — Verify install, auth, and Git repo readiness
  • coderabbit review findings
    — Replay findings from the last local review
cr
is an alias for
coderabbit
.
--prompt-only
is deprecated; use
--agent
.
  • cr -h
    /
    coderabbit --help
    — 显示CodeRabbit帮助信息
  • coderabbit review --agent --type committed --base main
    — 针对main分支的完整分支差异审查(Agent默认使用;与CI意图一致)
  • coderabbit review --agent --type uncommitted
    — 未提交的变更(暂存+未暂存);快速抽查
  • coderabbit doctor
    — 验证安装、授权及Git仓库就绪状态
  • coderabbit review findings
    — 重放上次本地审查的结果
cr
coderabbit
的别名。
--prompt-only
已弃用;请使用
--agent

Rules

规则

  • Max 2–3 CodeRabbit runs per change set (Pro plan: 5 CLI reviews per developer — rate limits)
  • Always use
    --agent
    for agent workflows (structured JSON output)
  • Default to
    --base main
    unless the repo uses a different default branch
  • Reviews can take 7–30+ minutes — run in the background when possible
  • Must run from an initialized Git repository root
  • Only use
    -t uncommitted
    for quick pre-commit spot checks
  • 每个变更集最多运行2–3次CodeRabbit(专业版计划:每位开发者可进行5次CLI审查——速率限制
  • Agent工作流请始终使用
    --agent
    (生成结构化JSON输出)
  • 默认使用
    --base main
    ,除非仓库使用其他默认分支
  • 审查可能需要7–30+分钟——尽可能在后台运行
  • 必须从已初始化的Git仓库根目录运行
  • 仅在提交前快速抽查时使用
    -t uncommitted

Usage

使用方法

When asked to run CodeRabbit or as part of pre-push review:
  1. Ensure lint and tests pass (the
    commit
    skill's checklist, or the
    lint
    and
    test
    skills explicitly)
  2. Run
    coderabbit review --agent --type committed --base main
    (background if needed)
  3. Analyze findings; address critical/major issues
  4. After fixes, run one verification pass if CodeRabbit had findings
  5. Track run count (max 2–3 per change set)
Note:
-t committed
with
--base main
reviews the full branch diff.
-t uncommitted
includes staged and unstaged changes (empty after a full commit with a clean tree).
当被要求运行CodeRabbit或作为推送前审查的一部分时:
  1. 确保代码检查和测试通过(
    commit
    技能的检查清单,或明确执行
    lint
    test
    技能)
  2. 运行
    coderabbit review --agent --type committed --base main
    (必要时在后台运行)
  3. 分析审查结果;处理严重/主要问题
  4. 修复后,如果CodeRabbit发现了问题,运行一次验证检查
  5. 记录运行次数(每个变更集最多2–3次)
注意:
-t committed
搭配
--base main
会审查完整的分支差异。
-t uncommitted
包含暂存和未暂存的变更(在完整提交且工作树干净后为空)。

References

参考资料