-
Notifications
You must be signed in to change notification settings - Fork 5
feat(skills): 新增 CodeRabbit CLI skill #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6da632f
feat(skills): add coderabbit cli skill
DCjanus 5aba2c1
docs(skills): generalize coderabbit base branch examples
DCjanus 501c1d5
docs(skills): document coderabbit long-running behavior
DCjanus e230a92
docs(skills): remove timeout command example
DCjanus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| name: coderabbit-cli | ||
| description: 指导如何使用 CodeRabbit CLI 进行 Code Review。 | ||
| --- | ||
|
|
||
| 让 AI agent 调用本地 `coderabbit` CLI,对当前改动做代码审查。重点是选对 diff 范围,并优先使用 `--prompt-only`。 | ||
|
|
||
| ## 使用约定 | ||
|
|
||
| - 这是给 AI agent 用的 review 工具,不是让 agent 代替人类交互式操作 TUI。 | ||
| - 默认优先 `--prompt-only`,让 CodeRabbit 直接产出给 AI agent 的提示内容。 | ||
| - 只有在确实需要阅读纯文本 review 原文时,才使用 `--plain`。 | ||
| - 每次只 review 和当前任务直接相关的 diff,避免把无关改动混进审查范围。 | ||
| - 单次 review 可能较慢,且存在频率限制;不要在短时间内重复触发多轮无意义审查。 | ||
| - 对用户汇报时,优先总结 CodeRabbit 的有效发现,不要直接大段转储原始输出。 | ||
| - 向用户汇报整理后的待处理项时,使用数字编号,方便用户按编号指定后续处理项。 | ||
| - 如果 CodeRabbit 的建议与代码现状或任务目标冲突,agent 应自行判断并说明取舍理由。 | ||
| - 若最终没有采纳某条建议,应明确写出不采纳原因,例如误报、已有覆盖、与既定约束冲突。 | ||
| - 推荐流程:先确认当前任务涉及的改动范围,再选择合适的 `review` 参数并运行 `coderabbit review --prompt-only ...`;将输出整理为可执行项,能直接修复的就修复,需要用户决策的再汇报;大改后如有必要,再补一轮 review,默认不要超过 1 到 2 轮。 | ||
|
|
||
| ## 常用命令 | ||
|
|
||
| ```bash | ||
| coderabbit review --prompt-only --type uncommitted # 审查当前未提交改动 | ||
| coderabbit review --prompt-only --base main # 审查当前分支相对 main 的改动 | ||
| coderabbit review --prompt-only --base-commit HEAD~3 # 审查 HEAD~3 之后引入的改动 | ||
| coderabbit review --prompt-only --base main --config coderabbit.yaml # 追加仓库内 review 指令文件 | ||
| coderabbit review --prompt-only --cwd /abs/path/to/repo --base main # 指定目标仓库目录 | ||
| ``` | ||
|
|
||
| ## 参考 | ||
|
|
||
| - 查看主命令帮助:`coderabbit --help` | ||
| - 查看 review 参数:`coderabbit review --help` | ||
| - 官方页面:[CodeRabbit CLI page](https://www.coderabbit.ai/cli) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.