通用编程33k · #9138
build-graph
它能做什么
这个技能运行 code-review-graph 工具,为代码仓库建立索引。适合希望智能体在审查或搜索代码前先了解代码结构的开发者。
适用场景
- ✓当你第一次为某个代码仓库设置 code-review-graph 时。
- ✓当你切换了分支或做了大型重构,图谱可能已经过期的时候。
- ✓当你完成一批代码修改后,想刷新知识图谱时。
技能链接
https://github.com/tirth8205/code-review-graph/blob/staging/skills/build-graph/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/tirth8205/code-review-graph/blob/staging/skills/build-graph/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add tirth8205/code-review-graph --skill build-graph
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/tirth8205/code-review-graph/staging/skills/build-graph/SKILL.md -o SKILL.md
可以这样问 AI
“能为这个仓库构建代码审查图谱吗?这样我们可以更快地开始审查。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体检查图谱的状态,运行完整构建或快速更新,并报告进程是否成功。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Build Graph
Build or incrementally update the knowledge graph for this repository.
Steps
- Call
list_graph_stats_tool. Iflast_updatedis null, the graph has never been built. - For a first build, or when the argument is
full, callbuild_or_update_graph_tool(full_rebuild=True). Otherwise callbuild_or_update_graph_tool()for an incremental update. - Report the response:
status(ok,partialorerror) andsummary.
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 installrun an update after each edit and before each commit, so manual builds are rarely needed.
Notes
- The database is
.code-review-graph/graph.dbin the repository root. - Binary files, dependency and build directories, and patterns in
.code-review-graphignoreare skipped. - For the list of supported languages call
get_docs_section_tool(section_name="languages").
常见问题
图谱存放在哪里?
技能说明,它存放在仓库 .code-review-graph 文件夹中的一个数据库文件里。
有些文件会被跳过吗?
会。二进制文件、依赖文件夹以及忽略文件中列出的模式都会被跳过。
需要经常运行吗?
通常不需要。技能说明,钩子会自动保持图谱更新。
详情
作者的原始描述
Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.
热度
- GitHub 星标
- 33k
- 排名
- #9138
- 许可证
- MIT
- 更新时间
- 2026/10/29
评论
- …