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 从公开仓库中收录这些内容。

举报或申请下架