跳到正文
Skillpedia
通用编程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 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Identify the changes. With a branch name run git diff --name-only main...<branch>; otherwise diff the current branch against main (or master). Use that ref as base below.
  2. Call get_minimal_context_tool(task="review PR", base="main"). If it returns status: not_ready, call build_or_update_graph_tool() and continue.
  3. Call detect_changes_tool(base="main", detail_level="minimal") for risk-scored changed functions, test gaps and affected flows across the whole branch.
  4. For high-risk functions call query_graph_tool(pattern="callers_of", target="<function>") and query_graph_tool(pattern="tests_for", target="<function>"). Flag public API changes whose callers were not updated.
  5. Call get_review_context_tool(base="main") for source snippets, or get_impact_radius_tool(base="main") for the full dependent list, only when step 3 leaves a high-risk item unclear.
  6. 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_tool to 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.

repo: tirth8205/code-review-graph

热度

GitHub 星标
33k
排名
#9144
许可证
MIT
更新时间
2026/10/29

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能