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.
npx skills add xberg-io/tree-sitter-language-pack --skill tree-sitter-language-pack-detecting-languagesgit clone --depth 1 https://github.com/xberg-io/tree-sitter-language-packWrote 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.
[](https://agentmods.dev/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-detecting-languages)<a href="https://agentmods.dev/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-detecting-languages"><img src="https://agentmods.dev/badge/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-detecting-languages/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.
<a href="https://agentmods.dev/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-detecting-languages"><img src="https://agentmods.dev/badge/skills/xberg-io/tree-sitter-language-pack/tree-sitter-language-pack-detecting-languages.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00055 | $0.00745 |
| Opus 5.5 | $0.00022 | $0.00298 |
| Sonnet 5.5 | $0.00011 | $0.00149 |
| Haiku 4.5 | $0.00006 | $0.00075 |
Grade A, and why
tree-sitter-language-pack-detecting-languages 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 25d 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.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Detecting languages
tree-sitter-language-pack maps a file to one of 371 supported languages. Detection works from a file path, a bare extension, or — via the SDK — the file content itself.
On the CLI: detection is implicit
There is no standalone ts-pack detect command. parse and process
auto-detect the language from the file extension and act on it:
ts-pack parse src/app.ts # detects "typescript", parses
ts-pack process app.py # detects "python", extracts
When detection fails (no extension, ambiguous, or stdin), pass --language:
cat snippet | ts-pack parse - --language go
To check whether a language name is supported and cached without parsing
anything, use list and info:
ts-pack list --filter type # languages whose name contains "type"
ts-pack list --manifest # every language in the remote manifest
ts-pack info typescript # is it known? is it downloaded? cache path?
In the SDK: explicit detection
The core exposes three detection functions, including content-based detection that the CLI does not surface:
| Function | Detects from |
|---|---|
detect_language_from_path(path) |
Full path (uses the extension). |
detect_language_from_extension(ext) |
A bare extension like "rs". |
detect_language_from_content(content) |
Raw source text — no path needed. |
Each returns the language name or null/None when no grammar matches.
Python
from tree_sitter_language_pack import (
detect_language_from_path,
detect_language_from_extension,
detect_language_from_content,
)
detect_language_from_path("src/app.py") # "python"
detect_language_from_extension("rs") # "rust"
detect_language_from_content(open("x").read()) # from the shebang line, if present
Node.js / TypeScript
import { detectLanguageFromPath, detectLanguageFromContent } from "@xberg-io/tree-sitter-language-pack";
const lang = detectLanguageFromPath("src/app.ts") ?? detectLanguageFromContent(source);
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.
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.
- 25d ago Changed fd4e7a8f6c8e
- 1mo ago First seen · 91 lines · 55 tokens per session scan A 2272930ef5f5
tree-sitter-language-pack-detecting-languages is a skill published in the GitHub repository xberg-io/tree-sitter-language-pack (489 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 745 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.
tree-sitter-language-pack-detecting-languages compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tree-sitter-language-pack-detecting-languagesxberg-io/tree-sitter-language-pack | Skill | 489 | yesterday | MIT | A | 55 | Claude Code |
| crawl-engine-mapxberg-io/crawlberg | Skill | 197 | yesterday | MIT | A | 48 | Claude Code |
| gographozgurcd/gograph | Skill | 234 | yesterday | MIT | A | 91 | Claude Code |
| crawlbergxberg-io/crawlberg | Skill | 197 | yesterday | MIT | A | 104 | Claude Code |
| crawlberg-automating-the-browserxberg-io/crawlberg | Skill | 197 | yesterday | MIT | A | 58 | Claude Code |
| crawlberg-crawling-a-sitexberg-io/crawlberg | Skill | 197 | yesterday | MIT | A | 46 | Claude Code |
| crawlberg-scraping-html-to-markdownxberg-io/crawlberg | Skill | 197 | yesterday | MIT | A | 41 | Claude Code |