Build Graph

tirth8205/code-review-graph/skills/build-graph

作者 tirth82056b12d11625cbec3b6773e076cb3d136464fa90e5無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.

AI 產生的概覽

透過圖形工具建立或增量更新程式碼審查知識圖譜。

功能
此技能指示代理先檢查圖譜統計資料,再為儲存庫建立或更新程式碼審查知識圖譜,可選擇完整重建或增量更新。它會回報工具回應的狀態與摘要,並說明圖譜資料庫位於儲存庫根目錄的 .code-review-graph/graph.db。它也說明會略過二進位檔案、相依性與建置目錄,以及 .code-review-graphignore 中的樣式。
適用情境
適用於儲存庫首次設定、切換分支或大規模重構之後,或圖譜看起來已過時的情況。由於已安裝的鉤子會在每次編輯後與每次提交前更新圖譜,通常很少需要手動建立。
執行需求
需要圖形工具(list_graph_stats_tool、build_or_update_graph_tool,以及用於語言文件的 get_docs_section_tool),並需要一個包含 .code-review-graph 目錄的儲存庫。不附帶指令碼,僅為指示。

Build Graph

Build or incrementally update the knowledge graph for this repository.

Steps

  1. Call list_graph_stats_tool. If last_updated is null, the graph has never been built.
  2. For a first build, or when the argument is full, call build_or_update_graph_tool(full_rebuild=True). Otherwise call build_or_update_graph_tool() for an incremental update.
  3. Report the response: status (ok, partial or error) and summary.

When to Use

  • First set-up of a repository, or after a branch switch or large refactor.
  • When the graph looks stale. Hooks installed by code-review-graph install run an update after each edit and before each commit, so manual builds are rarely needed.

Notes

  • The database is .code-review-graph/graph.db in the repository root.
  • Binary files, dependency and build directories, and patterns in .code-review-graphignore are skipped.
  • For the list of supported languages call get_docs_section_tool(section_name="languages").

來源與署名

來源:tirth8205/code-review-graph位於skills/build-graph提交6b12d11

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架