跳到正文
Skillpedia
通用编程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 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“用户在保存草稿时会崩溃。能追踪是哪条代码路径导致的吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体在图谱中搜索相关代码,追踪调用者和被调用者,检查最近的修改,然后阅读实现代码和测试。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Debug Issue

Trace a bug through the knowledge graph before reading source.

Steps

  1. Call semantic_search_nodes_tool to find code related to the issue.
  2. Call query_graph_tool with callers_of and callees_of to trace the call chain in both directions.
  3. Call get_flow_tool for the execution path that reaches the suspect code. Its entry point is where the bug is triggered.
  4. Call detect_changes_tool to check whether a recent change caused the issue.
  5. Call get_impact_radius_tool on 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_tool call 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

repo: tirth8205/code-review-graph

热度

GitHub 星标
33k
排名
#9139
许可证
MIT
更新时间
2026/10/29

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能