From tree-sitter-language-pack
Parses source files into tree-sitter syntax trees (s-expression or JSON format) for inspecting node structure, debugging grammars, or piping to other tools.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tree-sitter-language-pack:parsing-sourceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`ts-pack parse <file>` parses one source file with the matching
ts-pack parse <file> parses one source file with the matching
tree-sitter grammar and prints the resulting concrete syntax tree. Use it
when the user wants the tree itself — to inspect node structure, debug a
grammar, or feed an s-expression to another tool.
# S-expression (default) — auto-detects language from the file extension
ts-pack parse src/main.rs
# JSON form: { "language", "sexp", "has_errors" }
ts-pack parse src/main.rs --format json
| Flag | Short | Default | Purpose |
|---|---|---|---|
--language <name> | -l | auto | Override the language (skip extension detection). |
--format <fmt> | -f | sexp | sexp or json. |
The parser library for the language downloads on first use and is cached.
The language is auto-detected from the file extension. Override it when the extension is missing, misleading, or you are reading from stdin:
# Misleading extension or no extension:
ts-pack parse script --language bash
# stdin (use "-" as the file):
cat snippet.py | ts-pack parse - --language python
stdin cannot be auto-detected by path; always pass --language with -.
For content-based detection without a path, use the SDK
(detect_language_from_content) — see the detecting-languages skill.
A nested (node_type child ...) tree. Compact, good for eyeballing
structure or piping to a grammar tool.
{
"language": "rust",
"sexp": "(source_file (function_item ...))",
"has_errors": false
}
Read has_errors to know whether the parse produced any error nodes — a
fast syntax check. For positioned, per-error detail use
ts-pack process <file> --diagnostics (see extracting-code-structure).
# Inspect a TypeScript file's tree
ts-pack parse src/app.ts
# Machine-readable, then check for syntax errors with jq
ts-pack parse src/app.ts --format json | jq '.has_errors'
# Parse a heredoc as Python
printf 'def f():\n return 1\n' | ts-pack parse - -l python
parse gives you the raw tree. If the user wants structured metadata
(functions, imports, exports, symbols, docstrings) rather than the tree,
use ts-pack process — see the extracting-code-structure skill.
npx claudepluginhub xberg-io/plugins --plugin tree-sitter-language-packProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.