vibecoding

CodeGraph

官网:codegraph — Understand any codebase as a graph

问题:项目文件太大导致我30w输入100输出库库烧钱

问题本质是agent在开发时由于我提示词没有精准到文件或片段,导致它需要总览一遍代码再思考输出

了解到CodeGraph给项目做知识图谱,让agent能快速理解项目并定位文件

引用文章CodeGraph:给 AI 编程助手装上代码知识图谱,省 35% 费用、减少 70% 工具调用 - iTech - 博客园

配置:

把官网链接丢给agent让它自己配

初始化项目

1
2
cd your-project
codegraph init -i

重启 Agent

重启 Claude Code / Cursor / Codex 即可。Agent 检测到 .codegraph/ 目录会自动使用 CodeGraph 工具。

卸载

改主意了?一行命令从所有 Agent 中移除:

1
codegraph uninstall