tsa-graph

tsa-graph is a skill for Claude Code, Codex from aimasteracc/tree-sitter-analyzer. It costs 194 tokens per session (1,259 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 CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aimasteracc/tree-sitter-analyzer/tsa-graph
Any agent
npx skills add aimasteracc/tree-sitter-analyzer --skill tsa-graph
Clone the repo
git clone --depth 1 https://github.com/aimasteracc/tree-sitter-analyzer

Made for: Claude Code, Codex.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 194 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00194 $0.01259
Opus 5 $0.00097 $0.00629
Sonnet 5 $0.00039 $0.00252
Haiku 4.5 $0.00019 $0.00126

Measured 4d ago against content hash 40c44ff35d69, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d ago.

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 · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 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
Need search + snippets + callers/callees together? search action=chain
What does FUNCTION call? nav action=callees
What calls FUNCTION? nav action=callers
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

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.

When a question needs several graph hops plus source snippets, prefer the chain surface:

search action=chain query="search('score_file').explore(max_files=3).callers(depth=1).callees(depth=1)"

Multi-step case (refactor planning)

Fan out 3 in parallel:

  1. nav action=callers (who depends on this — blast radius)
  2. nav action=callees (what this depends on — what may need updating)
  3. search action=symbol with the symbol name (find aliases / shadows)

Read the full file on GitHub · 135 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. 4d 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 (48 stars, last pushed today), licensed MIT. It adds 194 tokens to every session and 1,259 once invoked, about $0.0010 per session on Opus 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-business-scope-of-work

Use this skill when the user says 'scope of work', 'SOW', 'define scope', 'project scope', 'write SOW', 'scope document', or is defining project boundaries, deliverables, and acceptance criteria for a formal engagement. Do NOT use for proposals, contracts, or invoicing.

cwinvestments/memstack · 70 tokens

goal

Use when the user says 'goal', 'set a goal', 'define the goal', 'plan this properly', or starts a task that needs a clear finish line and verification. Structures work into TASK / WHY / OUTCOME / CONSTRAINTS / VERIFICATION before execution begins.

cwinvestments/memstack · 58 tokens

n8n-subworkflows

Build reusable, composable n8n sub-workflows. Use when extracting shared logic, building anything multi-step or reused across workflows, or any workflow over 10 nodes — and whenever the user mentions sub-workflows, Execute Workflow, reuse, shared/common logic, modular workflows, "Define Below" inputs…

czlonkowski/n8n-mcp · 121 tokens

n8n-code-tool

Write JavaScript or Python for the n8n Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode) — the AI-agent-callable tool, NOT the workflow Code node. Use when building a Code Tool attached to an AI Agent, writing code that an LLM will invoke, parsing the query input, returning a string result, defining an input schema…

czlonkowski/n8n-mcp · 221 tokens

plan-eng-review

Eng manager-mode plan review. Lock in the execution plan — architecture, data flow, diagrams, edge cases, test coverage, performance. Walks through issues interactively with opinionated recommendations. Use when asked to "review the architecture", "engineering review", or "lock in the plan". Proactively suggest when…

GCWing/BitFun · 116 tokens

pre-landing-review

Pre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust boundary violations, conditional side effects, and other structural issues. Use when explicitly asked for the specialized pre-landing workflow. Product /review requests are handled by BitFun's unified Review mechanism instead.…

GCWing/BitFun · 74 tokens