Debug Issue

tirth8205/code-review-graph/skills/debug-issue

作者 tirth82056b12d11625cbec3b6773e076cb3d136464fa90e5無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Systematically debug issues using graph-powered code navigation

AI 產生的概覽

在閱讀原始碼前,透過程式碼知識圖譜追蹤缺陷,利用圖譜查詢工具縮小排查範圍。

功能
此技能引導代理採用系統化的除錯流程,並借助圖譜驅動的程式碼導覽工具來進行。它要求先對與問題相關的程式碼執行語意搜尋,追蹤呼叫者與被呼叫者,沿著執行流程找出觸發點,檢查近期變更,並評估修正的影響範圍。它也訂定了權杖效率規則,包括先呼叫最小脈絡工具、盡量使用最小詳細程度,以及每個任務約五次工具呼叫與 800 個圖譜輸出權杖的預算。它會產出縮小後的缺陷範圍,但明確指出圖譜不能取代閱讀實作程式碼及其測試。
適用情境
適用於在已建立知識圖譜索引且相關圖譜工具可用的程式碼庫中,除錯已回報的問題。適合需要定位可疑程式碼、追蹤執行路徑如何到達該處,並在修改原始碼前了解修正可能影響範圍的情境。
執行需求
需要存取圖譜工具,例如 semantic_search_nodes_tool、query_graph_tool、get_flow_tool、detect_changes_tool、get_impact_radius_tool 與 get_minimal_context_tool,並需要已在該圖譜中建立索引的程式碼庫。此技能不附帶指令碼,僅為指示。

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.

來源與署名

來源:tirth8205/code-review-graph位於skills/debug-issue提交6b12d11

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架