tree-sitter-language-pack-extracting-code-structure

tree-sitter-language-pack-extracting-code-structure is a skill for Claude Code from xberg-io/tree-sitter-language-pack. It costs 52 tokens per session (1,279 once invoked), scanned A, original, MIT.

A code-structure extractor that reads source files and returns JSON about functions, classes, imports, exports, symbols, comments, documentation strings, and syntax problems.

In plain words
What is it for?
Use it to list definitions, inspect imports and exports, collect documentation, or check syntax diagnostics.
Why use it?
It removes the need to manually inspect files or build a parser for common code-navigation questions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tree-sitter-language-pack plugin — 7 skills, 1 MCP server shipped together

Good fit Use it to list definitions, inspect imports and exports, collect documentation, or check syntax diagnostics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-extracting-code-structure
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.

Any agent
npx skills add xberg-io/tree-sitter-language-pack --skill tree-sitter-language-pack-extracting-code-structure
Clone the repo
git clone --depth 1 https://github.com/xberg-io/tree-sitter-language-pack

Made for: Claude Code.

Or install tree-sitter-language-pack, the plugin that ships this one along with the rest of its 7 skills, 1 MCP server.

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 tree-sitter-language-pack-extracting-code-structure

README.md
[![agentmods](https://agentmods.dev/badge/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-extracting-code-structure/github.svg)](https://agentmods.dev/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-extracting-code-structure)
Your own site
<a href="https://agentmods.dev/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-extracting-code-structure"><img src="https://agentmods.dev/badge/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-extracting-code-structure/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 tree-sitter-language-pack-extracting-code-structure

Your own site · 80×15
<a href="https://agentmods.dev/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-extracting-code-structure"><img src="https://agentmods.dev/badge/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-extracting-code-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,279 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.
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.00052 $0.01279
Opus 5.5 $0.00021 $0.00512
Sonnet 5.5 $0.00010 $0.00256
Haiku 4.5 $0.00005 $0.00128

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

Security

Grade A, and why

tree-sitter-language-pack-extracting-code-structure 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.

plugin/.ai-rulez/skills/tree-sitter-language-pack-extracting-code-structure/SKILL.md · 134 lines

How it starts

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

Extracting code structure

ts-pack process <file> runs the code-intelligence pipeline over a source file and prints JSON. Use it when the user wants structured metadata — "list the functions", "what does this file import", "find the exported symbols", "pull the docstrings" — rather than a raw syntax tree.

Quick recipe

# Default features: structure + imports + exports
ts-pack process src/app.ts

# Pick features explicitly (only what you ask for is computed)
ts-pack process src/app.ts --structure --imports --symbols --docstrings

# Everything
ts-pack process src/app.ts --all

When no feature flags are given, process defaults to --structure --imports --exports. Passing any single extraction flag (--structure --imports --exports --comments --docstrings --symbols --diagnostics) turns off that default set, so list every feature you want. --chunk-size and --language are modifiers, not extraction flags: they do not disable the defaults (e.g. --chunk-size 500 alone still emits structure+imports+exports and adds chunks).

Feature flags

Flag Extracts
--structure Functions, classes, methods, modules (spans, nesting, visibility).
--imports Import statements and their sources.
--exports Exported symbols and their kinds.
--comments Inline and block comments.
--docstrings Docstrings attached to definitions.
--symbols All identifiers (for search/indexing).
--diagnostics Syntax errors and error nodes with positions.
--all Enable every feature above.
--chunk-size <bytes> Syntax-aware chunks — see tree-sitter-language-pack-chunking-for-llms.
--language <name> (-l) Override language (auto-detected from extension otherwise).

Result shape

process always prints JSON. Top-level keys:

{
  "language": "python",
  "metrics": { "total_lines": 0, "code_lines": 0, "comment_lines": 0, "blank_lines": 0, "total_bytes": 0, "node_count": 0, "error_count": 0, "max_depth": 0 },
  "structure": [],
  "imports": [],
  "exports": [],
  "comments": [],
  "docstrings": [],
  "symbols": [],
  "diagnostics": [],
  "chunks": []
}

Read the full file on GitHub · 134 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 First seen · 134 lines · 52 tokens per session scan A 676085bc52e2

Subscribe to this mod's changes

tree-sitter-language-pack-extracting-code-structure is a skill published in the GitHub repository xberg-io/tree-sitter-language-pack (476 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 1,279 once invoked, about $0.0002 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-10-15.

Related

Other skills, from other repositories

dev-cycle

Crawlberg iteration loops codified as Taskfile tasks — alef install/generate/format/bump, core and binding builds, e2e generate/build/test cycles, cleanup tiers, and the mock-server / stale-.so / precompiled-NIF / generated-e2e gotchas. Load when running or debugging crawlberg build, alef regeneration, or e2e…

xberg-io/crawlberg · 86 tokens

dotnet-reverse

A guide for analyzing compiled .NET and C# programs, including managed Windows executables and libraries. Reverse engineering means studying compiled software to understand how it works, and decompiling turns it back into readable approximate source code.

zhaoxuya520/reverse-skill · 144 tokens

printing-press-polish

Polish a generated CLI to pass verification and become publish-ready. Runs diagnostics (dogfood, verify, scorecard, go vet, gosec), automatically fixes all issues (verify failures, static-analysis findings, dead code, descriptions, README, MCP tool quality), reports the before/after delta, and offers to publish. Use…

mvanhorn/cli-printing-press · 125 tokens

check-bin-obj-clash

Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing/overwritten…

dotnet/skills · 160 tokens

dump-collect

Configure and collect crash dumps for modern .NET applications. USE FOR: enabling automatic crash dumps for CoreCLR or NativeAOT, capturing dumps from running .NET processes, setting up dump collection in Docker or Kubernetes, using dotnet-dump collect or createdump. DO NOT USE FOR: analyzing or debugging dumps…

dotnet/skills · 96 tokens

binlog-failure-analysis

Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating…

dotnet/skills · 79 tokens