This skill needs Bun. The script uses bun:sqlite.
Trace the call chain from the given code location up to all entry points that can reach it.
Languages supported: any language indexed by CodeGraph (C#, Java, Kotlin, Go, TypeScript, JavaScript, Rust, C, C++, Vue, JSX, TSX, Terraform, Helm YAML, …)
Input: A symbol name, file path, or file:line reference. Examples:
FindToolNameCollisionsToolsMappingExtensions.cs:145src/services/auth.ts:89CheckCertificate
Requirement: CodeGraph must be indexed in this project (.codegraph/ directory must exist). If it is missing, tell the user to run codegraph init first.
Steps
1. Run the script
The script is scripts/find-call-chain.ts in the base directory of this skill. Run it from the project folder, because it finds .codegraph/ from the current folder:
bun <skill-base-directory>/scripts/find-call-chain.ts "<input>"
Show the full output to the user verbatim.
2. Multiple symbol matches
If the script prints "Multiple symbols matched", list the candidates shown and ask the user to re-run with a file:line reference for the one they want.
3. No symbol found
If the script exits with "No symbol found":
- Try alternative spellings or a
file:linereference - Verify CodeGraph is up to date:
codegraph index
Terminal node detection (built into the script — no LLM judgment)
The script stops walking a branch when:
| Condition | Examples |
|---|---|
kind = route (CodeGraph native) | Any framework's route node |
| Language name pattern match | *Controller (C#/Java), *Activity (Kotlin), main (Go/Rust/C), *Page/*Route (TS/JS) |
| No callers found | Leaf node in the call graph |
| Depth cap (6 hops) | Marked ⚠ depth cap in the tree |
| Cycle detected | Marked ⟳ cycle in the tree |