tree-sitter-analyzer: Skill for Claude Code

.claude/skills/tsa-graph/SKILL.md

tsa-graph is a skill for Claude Code from aimasteracc/tree-sitter-analyzer. It costs 251 tokens per session (1,922 once invoked), scanned A, original, MIT.

A code-navigation tool that maps relationships between functions, symbols, files, and modules. A call graph shows which functions call one another, while symbol resolution identifies where code is defined.

In plain words
What is it for?
Use it to find callers and callees, locate a symbol, trace a path between two functions, inspect references, or create an architecture diagram.
Why use it?
It reduces the manual searching needed to understand unfamiliar code and gives more precise cross-file connections than text matching alone.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

This is aimasteracc/tree-sitter-analyzer's own configuration. It tells Claude Code how to work on tree-sitter-analyzer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tree-sitter-analyzer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aimasteracc/tree-sitter-analyzer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aimasteracc/tree-sitter-analyzer/main/.claude/skills/tsa-graph/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/aimasteracc/tree-sitter-analyzer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tsa-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/aimasteracc/tree-sitter-analyzer/tsa-graph/github.svg)](https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-graph)
Your own site
<a href="https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-graph"><img src="https://agentmods.dev/badge/skills/aimasteracc/tree-sitter-analyzer/tsa-graph/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tsa-graph

Your own site · 80×15
<a href="https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-graph"><img src="https://agentmods.dev/badge/skills/aimasteracc/tree-sitter-analyzer/tsa-graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 251 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,922 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00251 $0.01922
Opus 5.5 $0.00100 $0.00769
Sonnet 5.5 $0.00050 $0.00384
Haiku 4.5 $0.00025 $0.00192

Measured yesterday against content hash 0ef22278af73, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tsa-graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/tsa-graph/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

tsa-graph — Code archaeology, one call deep

This skill exposes the graph-focused tools that answer "who is connected to what" — the questions agents waste the most tokens on when they fall back to grep.

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?"

nav action=callers function_name="score_file" language="python" limit=20

Read the full file on GitHub · 172 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +37 lines · +57 tokens per session 0ef22278af73
  2. 2mo ago First seen · 135 lines · 194 tokens per session scan A 40c44ff35d69

Subscribe to this mod's changes

tsa-graph is a skill published in the GitHub repository aimasteracc/tree-sitter-analyzer (61 stars, last pushed today), licensed MIT. It adds 251 tokens to every session and 1,922 once invoked, about $0.0010 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

memstack-development-performance-audit

Use this skill when the user says 'performance audit', 'why is it slow', 'optimize performance', 'page speed', 'Core Web Vitals', 'lighthouse', 'load time', or needs to diagnose and fix frontend or backend performance issues. Do NOT use for code reviews or security audits.

cwinvestments/memstack · 69 tokens

investigate

Systematic debugging with root cause investigation. Four phases: investigate, analyze, hypothesize, implement. Iron Law: no fixes without root cause. Use when asked to "debug this", "fix this bug", "why is this broken", "investigate this error", or "root cause analysis". Proactively invoke this skill (do NOT debug…

GCWing/BitFun · 112 tokens

memorix-troubleshooting

Use when Memorix MCP, setup, project binding, HTTP control plane, hooks, skills, or agent integration is missing, stale, or failing.

AVIDS2/memorix · 36 tokens

debug

Use this skill to locate a runtime bug. Add targeted instrumentation, collect reproduction evidence, and confirm the root cause before changing code.

GCWing/BitFun · 28 tokens

assess-impact

Analyze blast radius before changing specific files. Use before refactoring core components, making breaking API changes, or modifying shared code to identify affected files and stakeholders.

panbanda/omen · 35 tokens

report-debt

Generate comprehensive tech debt assessment with quantified metrics and prioritized issues. Use for sprint planning, stakeholder reports, or justifying refactoring time allocation.

panbanda/omen · 32 tokens