通用编程33k · #9139
debug-issue
它能做什么
这个技能指导智能体使用 code-review-graph 工具进行结构化的调试。适合在代码库中追查漏洞的开发者。
适用场景
- ✓当你有错误信息或堆栈跟踪,需要找到问题的起点时。
- ✓当最近的一次修改可能引起了错误,你想加以确认时。
- ✓当你需要在修改代码前看清某个修复会影响哪些部分时。
技能链接
https://github.com/tirth8205/code-review-graph/blob/staging/skills/debug-issue/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/tirth8205/code-review-graph/blob/staging/skills/debug-issue/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add tirth8205/code-review-graph --skill debug-issue
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/tirth8205/code-review-graph/staging/skills/debug-issue/SKILL.md -o SKILL.md
可以这样问 AI
“用户在保存草稿时会崩溃。能追踪是哪条代码路径导致的吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体在图谱中搜索相关代码,追踪调用者和被调用者,检查最近的修改,然后阅读实现代码和测试。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Debug Issue
Trace a bug through the knowledge graph before reading source.
Steps
- Call
semantic_search_nodes_toolto find code related to the issue. - Call
query_graph_toolwithcallers_ofandcallees_ofto trace the call chain in both directions. - Call
get_flow_toolfor the execution path that reaches the suspect code. Its entry point is where the bug is triggered. - Call
detect_changes_toolto check whether a recent change caused the issue. - Call
get_impact_radius_toolon the suspect files to see what a fix would affect.
Token Efficiency Rules
- Call
get_minimal_context_tool(task="<your task>")before any other graph tool. - Pass
detail_level="minimal"wherever a tool accepts it. Use "standard" only when minimal is not enough. - Prefer a targeted
query_graph_toolcall over a broad listing call. - Budget: about five tool calls and 800 tokens of graph output per task.
- Read the implementation and its tests before changing code. The graph narrows scope; it does not replace the source.
常见问题
它能代替阅读代码吗?
不能。技能说明,图谱只是缩小搜索范围,任何修改之前仍需阅读源代码和测试。
它如何检查最近的修改?
它使用变更检测工具,查看最近的编辑是否可能是原因。
它使用多少次工具调用?
技能为每个任务设定了约五次图谱调用的预算,以保持高效。
详情
作者的原始描述
Systematically debug issues using graph-powered code navigation
热度
- GitHub 星标
- 33k
- 排名
- #9139
- 许可证
- MIT
- 更新时间
- 2026/10/29
评论
- …