Community研究與資料分析github.com

duongphuhiep/dakubo-skills

從指定的符號或程式碼位置追蹤完整的呼叫鏈,直到所有可達的進入點(HTTP 控制器、主函數、頁面元件、路由等)。適用於任何經 CodeGraph 索引的語言。適合在修改函式、方法或類別前進行波及範圍分析。

dakubo-skills 是什麼?

這個技能讓開發者能夠從程式碼中的任意符號、方法或類別出發,向上追蹤其完整的呼叫鏈,直到所有可能的進入點(例如 HTTP 控制器、main 函數、頁面元件或路由)。它利用 CodeGraph 的索引資料,支援多種語言(如 C#、Java、TypeScript、Go 等),並以樹狀結構呈現結果,清晰標示每個呼叫節點的類型、檔案位置以及行號。這項功能對於進行「波及範圍分析」(blast-radius analysis)特別有幫助,讓開發者在重構或修改函式前,能快速評估受影響的程式碼範圍,避免意外破壞其他功能。技能依附於 Bun 執行環境,並透過一個內建腳本(find-call-chain.ts)來查詢 CodeGraph 資料庫,無需 LLM 介入判斷終端節點,而是由腳本自動根據節點類型(如路由、語言名稱模式)或圖深度限制進行停止。若未找到符號,它會建議使用者重新檢查拼寫或更新 CodeGraph 索引。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/duongphuhiep/dakubo-skills/tree/HEAD/package/skills/dakubo-find-call-chain

Installed? Explore more 研究與資料分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

此技能需要 Bun。腳本使用 bun:sqlite。

從指定的程式碼位置向上追蹤呼叫鏈,直到所有可達的進入點。

支援的語言:任何經 CodeGraph 索引的語言(C#、Java、Kotlin、Go、TypeScript、JavaScript、Rust、C、C++、Vue、JSX、TSX、Terraform、Helm YAML 等)

輸入:符號名稱、檔案路徑或 file:line 參考。範例:

  • FindToolNameCollisions
  • ToolsMappingExtensions.cs:145
  • src/services/auth.ts:89
  • CheckCertificate

需求:專案中必須已建立 CodeGraph 索引(.codegraph/ 目錄必須存在)。如果缺少,請告知使用者先執行 codegraph init。


步驟

1. 執行腳本

腳本是此技能基礎目錄中的 scripts/find-call-chain.ts。從專案資料夾執行,因為它會從目前資料夾尋找 .codegraph/:

bun <skill-base-directory>/scripts/find-call-chain.ts "<input>"

將完整輸出原封不動地顯示給使用者。

2. 多個符號匹配

如果腳本輸出「Multiple symbols matched」,請列出顯示的候選項目,並要求使用者以 file:line 參考重新執行,以指定他們想要的符號。

3. 找不到符號

如果腳本以「No symbol found」結束:

  • 嘗試其他拼寫方式或使用 file:line 參考
  • 確認 CodeGraph 索引是最新的:codegraph index

終端節點偵測(內建於腳本中 — 無需 LLM 判斷)

當符合以下條件時,腳本會停止遍歷某個分支:

條件範例
kind = route(CodeGraph 原生)任何框架的路由節點
語言名稱模式匹配*Controller(C#/Java)、*Activity(Kotlin)、main(Go/Rust/C)、*Page/*Route(TS/JS)
無呼叫者呼叫圖中的葉節點
深度上限(6 層)在樹中標記為 ⚠ depth cap
偵測到循環在樹中標記為 ⟳ cycle

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

duongphuhiep/dakubo-skills

Use when the user wants to respond to a code review remark by adding a clarifying comment to the source code — so the reviewer understands the reasoning and won't raise the same remark again. Triggers on "answer remark #N", "add comment to address reviewer concern", "document why we did X", or any request to resolve a review finding through in-code explanation rather than a code change.

duongphuhiep/dakubo-skills

Use when the user wants to reply to a code review remark on a GitHub pull request and resolve its thread. Triggers on "answer remark #N in the PR", "reply to the reviewer", or "resolve this review comment".

duongphuhiep/dakubo-skills

Use when the user wants to see unresolved PR comments, review remarks, or outstanding feedback on a pull request.

duongphuhiep/dakubo-skills

Consolidates multiple fragmented OpenSpec capability folders under openspec/specs/ into a single main feature spec, through a staged/approved workflow. Use this whenever the user says openspec/specs/ is cluttered, has too many similar or overlapping capability folders, asks to merge/consolidate/combine specs, wants to clean up specs split across several separate change archives (e.g. specs/user-show/, specs/user-detail/ that should really be one specs/user-management/), or asks to check/apply a pending merged spec under openspec/specs/.merged-specs/. Do NOT use this for a normal single /opsx:archive of one change — only for merging several already-archived, already-existing spec folders together.

相關技能