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 從公開儲存庫中收錄這些內容。

檢舉或申請下架