通用编程33k · #9144
review-pr
它能做什么
这个技能指导智能体使用 code-review-graph 工具审查拉取请求或分支的所有提交。适合处理拉取请求的开发者和审阅者。
适用场景
- ✓当你希望在合并前对拉取请求进行结构化审查时。
- ✓当你需要确认公共 API 的修改是否已更新所有调用者时。
- ✓当你想获得覆盖分支中每个提交的风险摘要时。
技能链接
https://github.com/tirth8205/code-review-graph/blob/staging/skills/review-pr/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/tirth8205/code-review-graph/blob/staging/skills/review-pr/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add tirth8205/code-review-graph --skill review-pr
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/tirth8205/code-review-graph/staging/skills/review-pr/SKILL.md -o SKILL.md
可以这样问 AI
“能把 feature-login 分支与 main 对比审查,并告诉我有哪些风险吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体将分支与 main 进行比较,检查风险函数及其调用者和测试,然后阅读影响最大的文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Review PR
Review all commits of a pull request or branch against its base branch.
Steps
- Identify the changes. With a branch name run
git diff --name-only main...<branch>; otherwise diff the current branch againstmain(ormaster). Use that ref asbasebelow. - Call
get_minimal_context_tool(task="review PR", base="main"). If it returnsstatus: not_ready, callbuild_or_update_graph_tool()and continue. - Call
detect_changes_tool(base="main", detail_level="minimal")for risk-scored changed functions, test gaps and affected flows across the whole branch. - For high-risk functions call
query_graph_tool(pattern="callers_of", target="<function>")andquery_graph_tool(pattern="tests_for", target="<function>"). Flag public API changes whose callers were not updated. - Call
get_review_context_tool(base="main")for source snippets, orget_impact_radius_tool(base="main")for the full dependent list, only when step 3 leaves a high-risk item unclear. - Read the changed source of the highest-impact files first. Do not load whole files unless the change needs it.
Output
## PR Review: <title>
### Summary
<1-3 sentences>
### Risk
- Overall: Low / Medium / High
- Blast radius: <n> files, <m> functions
- Test coverage: <covered> of <changed> changed functions
### Files
#### <path>
- Changes: <what>
- Impact: <who depends on it>
- Issues: <bugs, style, concerns>
### Missing Tests
- <function> in <file>
### Recommendations
1. <action>
Tips
- Use
semantic_search_nodes_toolto find related code the PR may have missed.
常见问题
它使用哪个基础分支?
它使用你指定的分支;如果没有指定,则将当前分支与 main 或 master 比较。
输出是什么样的?
它是一份结构化的审查报告,包含摘要、风险等级、文件以及测试覆盖数量。
它会标记 API 的修改吗?
会。它会标记那些未更新调用者的公共 API 修改。
详情
作者的原始描述
Review a PR or branch diff using the knowledge graph for full structural context. Outputs a structured review with blast-radius analysis.
热度
- GitHub 星标
- 33k
- 排名
- #9144
- 许可证
- MIT
- 更新时间
- 2026/10/29
评论
- …