aimasteracc/tree-sitter-analyzer/tsa-graph
Claude Code and agent skill by aimasteracc/tree-sitter-analyzer
- community
Checking that the SKILL.md file is still in the repository.
Code archaeology via call graph + symbol resolution. Answer "who calls X", "what does Y call", "where is Z defined", "what's the path from A to B" in one MCP call instead of multi-step grep + read. Uses persisted cross-file resolution (Synapse) so cross-module edges are precise, not regex-guessed. Multi-hop questions ("who calls X and which tests cover them", "untested callers of Y in M", "impact of X") are ONE `search action=uql` call. Use when: - User asks "what calls this function" / "what does this function call" - "Which tests cover the callers of X" / "which callers are untested" - Tracing a bug through layers (impact → caller chain) - Planning refactor of a function/class (need full fanout) - "Where is this symbol defined" / "find all references to X" - "Show me the path from handler → DB" - "Draw a UML class/package/component/sequence diagram" Replaces: grep + read + manual chain-following (~10-30k tokens) with 2-4 MCP calls (~1-3k tokens).
Install
npx vskill@latest install aimasteracc/tree-sitter-analyzer/tsa-graphSKILL.md
tsa-graph — Code archaeology, one call deep
This skill exposes the graph-focused tools that answer "who is connected towhat" — the questions agents waste the most tokens on when they fall back togrep.
When to use
Pick the right tool by question shape:
| Question | Tool | |
|---|---|---|
| Who calls X and which tests cover those callers? | search action=uql query="symbol('X').callers().tests()" | |
| Which callers of Y in module M have no tests? | search action=uql query="symbol('Y').callers().filter(file='M').untested()" | |
Callers of X to depth N, only under src/? | search action=uql query="symbol('X').callers(depth=2).filter(path='src/')" | |
| Impact of changing X (transitive callers + tests + files)? | search action=uql query="symbol('X').impact()" | |
| Need search + snippets + callers/callees together? | search action=chain | |
| What does FUNCTION call? | nav action=callees | |
| What calls FUNCTION? (one hop) | nav action=callers | |
| Which tests exercise FUNCTION? (one symbol) | nav action=test_map | |
| Where is SYMBOL defined? | search action=symbol | |
| What references SYMBOL anywhere? | nav action=xref | |
| Path from CALLER to CALLEE? | nav action=call_path | |
| Resolve "Path" in file X (project or stdlib?) | nav action=resolve | |
| Need architecture diagram output? | viz action=uml |
Don't use when:
- You need the actual body of the function → use
structure action=read - You're hunting a string literal in non-source files → use Grep
Procedure
Single-question case (90% of uses)
Pick the matching tool, call once. Read the response. Done.
Example: "what calls score_file?"
Returns: callers: [{name, file, line, callee_resolution, callee_resolved_file}, ...]. The callee_resolution field tells you local / project / stdlib / unknown so you can filter out noise.
Multi-hop case: one uql call, not one call per caller
If the answer to the first call would make you call nav again for each row (test_map per caller, callers of each caller, a path filter you would apply by hand), ask the whole question as one search action=uql query:
Measured on the 8 RFC-0041 benchmark questions (TSA + rich): 1 call instead of up to 13, about half the tokens per task, and every stage carries its own completeness (stages[].c = complete / incomplete / unknown, with reason codes) — test_map, caller_tree and TQL make no claim at all. Grammar: one search action=help target_action=uql call. Read the total completeness before saying "all" or "none"; untested() rows marked ? are undecided, not untested. Call-graph tests are not coverage (CLAUDE.md rule 5).
Stay on the single tools when the question is one hop and you do not need a claim: nav action=callers (carries its own completeness), nav action=test_map for one symbol's tests and nav action=callees are faster and, for tests/callees, smaller than the uql answer. uql pays ~0.5–1.5 s more tool time per question for the per-input proof.
For search plus source snippets (explore, include), keep the chain surface — uql has no snippet stages:
Multi-step case (refactor planning)
Fan out 3 in parallel:
search action=uql query="symbol('X').impact()"(who depends on this,
transitively, with the tests and files to re-check — blast radius)
nav action=callees(what this depends on — what may need updating)search action=symbolwith the symbol name (find aliases / shadows)
Then if you need a specific reachability path:
Reading the new resolution fields (Synapse)
Each callee entry now carries:
Filter rules of thumb:
resolution=stdlib→ ignore for change-impact (won't be in this repo)resolution=local|projectwith non-nullcallee_symbol_id→ trustworthy edgeresolution=unknown→ may need re-index:uv run tree-sitter-analyzer --ast-cache --ast-cache-mode index --ast-cache-force
CLI equivalents
Anti-patterns
- Don't
grep -rn "def X" tree_sitter_analyzer/— usesearch action=symbol(10x faster, precise) - Don't read 5 files to trace a call chain — use
nav action=call_path - Don't loop
nav action=test_map/nav action=callersover the rows of a
callers answer — that is one search action=uql query (nav appends this hint when it sees the loop)
- Don't ignore
callee_resolution—unknownentries are noise, filter them
Decision surface
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtree_sitter_analyzer/skills/tsa-graph/SKILL.md
Popularity
- Repository stars
- 58
- Repository forks
- 17
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aimasteracc/tree-sitter-analyzer/tsa-graph)