Review Pr

tirth8205/code-review-graph/skills/review-pr

作者 tirth82056b12d11625cbec3b6773e076cb3d136464fa90e5无许可证收录于 2026年10月9日更新于 2026年10月9日

Review a PR or branch diff using the knowledge graph for full structural context. Outputs a structured review with blast-radius analysis.

AI 生成的概览

借助知识图谱审查 PR 或分支差异,提供结构上下文与影响范围分析。

功能
引导智能体针对基础分支审查拉取请求或分支的全部提交。它使用知识图谱工具检测带风险评分的变更函数、测试缺口和受影响流程,并针对高风险函数查询调用方与测试。最终输出结构化审查,包含摘要、风险等级、影响范围、逐文件变更与影响、缺失测试以及建议。
适用场景
适用于审查拉取请求或分支差异,并希望获得调用方、依赖方和测试覆盖等结构上下文的场景。适合关注影响范围与缺失测试、而非仅逐行评论的审查。
运行要求
需要仓库的 git 访问权限,以及说明中提到的知识图谱工具(上下文、图谱构建/更新、变更检测、审查上下文、影响范围、语义搜索)。不附带脚本,仅为说明文档。

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>
### Recommendations1. <action>

Tips

  • Use semantic_search_nodes_tool to find related code the PR may have missed.

来源与署名

来源:tirth8205/code-review-graph位于skills/review-pr提交6b12d11

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架