[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BZ06VHS1DSX0VSN1X16PD7":3,"skill-same:01M6BZ06VHS1DSX0VSN1X16PD7":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6BZ06VHS1DSX0VSN1X16PD7","tree-sitter-language-pack-using-the-mcp-server","tree-sitter MCP 服务使用","Use when parsing source, extracting code structure, or detecting a language through the tree-sitter-language-pack MCP server's tools, rather than shelling out to the ts-pack CLI. Covers the tool surface, the auto-installing launcher, and when MCP beats the CLI or SDK.","当需要通过 tree-sitter-language-pack 的 MCP 服务器工具（而非调用 ts-pack 命令行）来解析源码、提取代码结构或检测语言时使用。涵盖工具接口、自动安装启动器，以及何时选用 MCP 而非命令行或 SDK。","xberg-io\u002Ftree-sitter-language-pack","xberg-io","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F241328462?v=4","01M6BYYMACFMK5WNT338Y71K58","Xberg.io","01M6BYYMEGM63ZCEYZJRTVS9JT",485,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fplugin\u002F.ai-rulez\u002Fskills\u002Ftree-sitter-language-pack-using-the-mcp-server\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43],"MCP","mcp server","server","language pack","tree sitter","tree sitter language pack using the mcp server","cli","sdk","code","playbook","Tools","parsing","tool","2026-11-10 10:12:30",false,"---\ntype: Playbook\ntitle: Tree Sitter Language Pack Using The Mcp Server\ndescription: Use when parsing source, extracting code structure, or detecting a language through the tree-sitter-language-pack MCP server's tools, rather than shelling out to the ts-pack CLI. Covers the tool surface, the auto-installing launcher, and when MCP beats the CLI or SDK.\nx-ai-rulez:\n  kind: skill\n  id: tree-sitter-language-pack-using-the-mcp-server\n  metadata:\n    name: tree-sitter-language-pack-using-the-mcp-server\n---\n\n# Using the MCP Server\n\nThe `tree-sitter-language-pack` MCP server exposes `ts-pack`'s parsing and\ncode-intelligence capabilities as MCP tools, so an MCP-compatible client (Claude\nCode, Claude Desktop) can parse source, extract structure, and detect languages\ndirectly, with no CLI invocation or glue code.\n\n## Standalone skill installation\n\nInstalling this skill alone does not register an MCP server or include the plugin launcher.\nInstall the CLI (for example, `brew install xberg-io\u002Ftap\u002Fts-pack`), then configure your MCP client with\n`ts-pack mcp` as its stdio command. The full product plugin supplies registration where\nthe runtime supports MCP.\n\n## How it runs in this plugin\n\nThe plugin auto-registers the server. Its command is the bundled launcher\n`scripts\u002Fmcp-launch.sh`, which execs `ts-pack mcp`. On first run the launcher\nresolves a `ts-pack` binary: it reuses one already on `PATH` or cached in the\nplugin's `bin\u002F`, then tries `npx`, then Homebrew, then downloads a prebuilt\nfrom the tool's latest GitHub release. Override the channel with\n`TS_PACK_LAUNCHER=auto|npx|brew|download`.\n\nThe `mcp` subcommand ships in a recent release of the tool. If an older\n`ts-pack` is already on `PATH`, it may not expose `mcp` yet — upgrade the binary\n(`brew upgrade`, re-download, or rebuild) to pick it up.\n\nTo run it manually:\n\n```bash\nts-pack mcp        # for Claude Code \u002F Claude Desktop (stdio)\n```\n\n## The tools\n\n**Parsing and code intelligence:**\n\n- **parse** — syntax tree from `source`; requires an explicit `language`, with\n  optional `format` (`sexp` or `json`). It does not detect language from a path —\n  use `detect_language` first if you only have a path.\n- **process** — code intelligence: structure, imports, exports, symbols, docstrings, comments, diagnostics, chunks. Use `all` flag to enable all features.\n- **detect_language** — identify language by `path` or `content` (those are\n  the only two parameters; extension detection is implicit in `path`).\n\n**Language and cache management:**\n\n- **list_languages** — available, downloaded, or manifest languages; optional filter by name.\n- **info** — show language availability and cache status.\n- **download** — prefetch parsers: specific languages, language groups, all, or fresh updates.\n- **cache_dir** — return the cache directory path.\n- **clean_cache** — remove all cached parsers.\n\n## Resources\n\n- `ts-pack:\u002F\u002Flanguages` — catalog of all known languages.\n- `ts-pack:\u002F\u002Flanguages\u002Fdownloaded` — currently cached languages.\n- `ts-pack:\u002F\u002Flanguage\u002F{name}` — per-language metadata template.\n\n## Prompt and completions\n\n- **analyze-code** — code-analysis prompt (args: `language`, optional `focus`).\n- **Language-name autocomplete** — available language names in completions.\n\n## When to prefer MCP over the CLI or SDK\n\n- **Prefer MCP** inside an agent session: the agent calls parsing directly as a\n  tool, with no shell-out and no process management.\n- **Prefer the CLI** for one-shot parsing\u002Fextraction and shell\u002FCI pipelines.\n- **Prefer the SDK** when embedding parsing in application code or running custom\n  tree-sitter queries.\n","# Using the MCP Server\n\nThe `tree-sitter-language-pack` MCP server exposes `ts-pack`'s parsing and\ncode-intelligence capabilities as MCP tools, so an MCP-compatible client (Claude\nCode, Claude Desktop) can parse source, extract structure, and detect languages\ndirectly, with no CLI invocation or glue code.\n\n## Standalone skill installation\n\nInstalling this skill alone does not register an MCP server or include the plugin launcher.\nInstall the CLI (for example, `brew install xberg-io\u002Ftap\u002Fts-pack`), then configure your MCP client with\n`ts-pack mcp` as its stdio command. The full product plugin supplies registration where\nthe runtime supports MCP.\n\n## How it runs in this plugin\n\nThe plugin auto-registers the server. Its command is the bundled launcher\n`scripts\u002Fmcp-launch.sh`, which execs `ts-pack mcp`. On first run the launcher\nresolves a `ts-pack` binary: it reuses one already on `PATH` or cached in the\nplugin's `bin\u002F`, then tries `npx`, then Homebrew, then downloads a prebuilt\nfrom the tool's latest GitHub release. Override the channel with\n`TS_PACK_LAUNCHER=auto|npx|brew|download`.\n\nThe `mcp` subcommand ships in a recent release of the tool. If an older\n`ts-pack` is already on `PATH`, it may not expose `mcp` yet — upgrade the binary\n(`brew upgrade`, re-download, or rebuild) to pick it up.\n\nTo run it manually:\n\n```bash\nts-pack mcp        # for Claude Code \u002F Claude Desktop (stdio)\n```\n\n## The tools\n\n**Parsing and code intelligence:**\n\n- **parse** — syntax tree from `source`; requires an explicit `language`, with\n  optional `format` (`sexp` or `json`). It does not detect language from a path —\n  use `detect_language` first if you only have a path.\n- **process** — code intelligence: structure, imports, exports, symbols, docstrings, comments, diagnostics, chunks. Use `all` flag to enable all features.\n- **detect_language** — identify language by `path` or `content` (those are\n  the only two parameters; extension detection is implicit in `path`).\n\n**Language and cache management:**\n\n- **list_languages** — available, downloaded, or manifest languages; optional filter by name.\n- **info** — show language availability and cache status.\n- **download** — prefetch parsers: specific languages, language groups, all, or fresh updates.\n- **cache_dir** — return the cache directory path.\n- **clean_cache** — remove all cached parsers.\n\n## Resources\n\n- `ts-pack:\u002F\u002Flanguages` — catalog of all known languages.\n- `ts-pack:\u002F\u002Flanguages\u002Fdownloaded` — currently cached languages.\n- `ts-pack:\u002F\u002Flanguage\u002F{name}` — per-language metadata template.\n\n## Prompt and completions\n\n- **analyze-code** — code-analysis prompt (args: `language`, optional `focus`).\n- **Language-name autocomplete** — available language names in completions.\n\n## When to prefer MCP over the CLI or SDK\n\n- **Prefer MCP** inside an agent session: the agent calls parsing directly as a\n  tool, with no shell-out and no process management.\n- **Prefer the CLI** for one-shot parsing\u002Fextraction and shell\u002FCI pipelines.\n- **Prefer the SDK** when embedding parsing in application code or running custom\n  tree-sitter queries.\n",{"type":49,"title":50,"x-ai-rulez":51,"description":7},"Playbook","Tree Sitter Language Pack Using The Mcp Server",{"id":5,"kind":52,"metadata":53},"skill",{"name":5},"main","c14405493731b34089b4aae085abe5527b5000c7","plugin\u002F.ai-rulez\u002Fskills\u002Ftree-sitter-language-pack-using-the-mcp-server",71,"https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack","https:\u002F\u002Fdocs.tree-sitter-language-pack.xberg.io","https:\u002F\u002Fgithub.com\u002Fxberg-io","https:\u002F\u002Fxberg.io","Open-source content intelligence with a Rust core: documents, web, LLMs and code, with native bindings for every major language.","2026-11-15 00:20:30",{"source":9,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add xberg-io\u002Ftree-sitter-language-pack --skill tree-sitter-language-pack-using-the-mcp-server",{"tool":70,"command":71},"bunx","bunx skills add xberg-io\u002Ftree-sitter-language-pack --skill tree-sitter-language-pack-using-the-mcp-server",{"tool":73,"command":74},"pnpm","pnpm dlx skills add xberg-io\u002Ftree-sitter-language-pack --skill tree-sitter-language-pack-using-the-mcp-server","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fplugin\u002F.ai-rulez\u002Fskills\u002Ftree-sitter-language-pack-using-the-mcp-server\u002FSKILL.md",true,[78],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"index.md","REFERENCE","参考文档",344,"https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fplugin\u002F.ai-rulez\u002Fskills\u002Ftree-sitter-language-pack-using-the-mcp-server\u002Findex.md",[85,114,127,147,169,187],{"skillNo":86,"name":87,"nameZh":88,"description":89,"descriptionZh":90,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":91,"categories":92,"keywords":97,"publishedAt":44},"01M6BZ48YBWAZH9X1XZ6QVA5TD","tree-sitter-language-pack","tree-sitter 代码智能解析","Parse and extract code intelligence from 371 programming languages using tree-sitter grammars. Use when writing code that parses source, extracts structure\u002Fimports\u002Fexports\u002Fsymbols\u002Fdocstrings\u002Fcomments, detects a language, runs syntax diagnostics, or produces syntax-aware chunks for LLMs — in Rust, Python, Node.js\u002FTypeScript, or the ts-pack CLI. Covers installation, the CLI surface, the SDK surface, and parser-cache management.","使用 tree-sitter 语法从 371 种编程语言中解析并提取代码智能信息。适用于编写解析源代码、提取结构\u002F导入\u002F导出\u002F符号\u002F文档字符串\u002F注释、检测语言、运行语法诊断或为大模型（LLM）生成语法感知分块的代码——支持 Rust、Python、Node.js\u002FTypeScript 或 ts-pack CLI。涵盖安装、CLI 接口、SDK 接口以及解析器缓存管理。","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fskills\u002Ftree-sitter-language-pack\u002FSKILL.md",[93,94],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CBEPE1MJTS9ARYEK7J8BH4","代码解析与结构分析",[98,34,35,99,100,101,102,103,39,104,37,105,106,107,108,109,110,111,112,113],"tree sitter language pack","tree","language","pack","rust","writing","llms","node","parser","typescript","io","structure","chunks","imports","parse","when",{"skillNo":115,"name":5,"nameZh":6,"description":7,"descriptionZh":116,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":117,"categories":118,"keywords":121,"publishedAt":44},"01M6BZ461Q0A0TZJG56G6J5QF0","当需要通过 tree-sitter-language-pack 的 MCP 服务器工具来解析源代码、提取代码结构或检测语言（而非调用 ts-pack CLI）时使用。涵盖工具接口、自动安装启动器，以及 MCP 相较于 CLI 或 SDK 的优势场景。","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fskills\u002Ftree-sitter-language-pack-using-the-mcp-server\u002FSKILL.md",[119,120],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},[36,31,98,32,33,34,35,99,100,101,39,37,122,123,124,125,109,126,41,113],"detecting","extracting","launcher","auto","source",{"skillNo":128,"name":129,"nameZh":130,"description":131,"descriptionZh":132,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":133,"categories":134,"keywords":137,"publishedAt":44},"01M6BZ437CE3DZQ22GYHMNMMVK","tree-sitter-language-pack-parsing-source","源代码语法树解析","Use when the user wants a tree-sitter syntax tree for a source file — an s-expression dump or JSON tree. Covers `ts-pack parse`, language auto-detection vs `--language`, stdin input, and reading `has_errors`.","当用户需要为源文件生成 tree-sitter 语法树时使用——以 s-表达式转储或 JSON 树的形式呈现。涵盖 `ts-pack parse`、语言自动检测与 `--language` 的对比、标准输入（stdin）输入以及读取 `has_errors`。","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fskills\u002Ftree-sitter-language-pack-parsing-source\u002FSKILL.md",[135,136],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},[42,138,98,34,35,99,126,100,101,139,140,141,142,143,144,125,145,146,112,113],"tree sitter language pack parsing source","file","json","syntax","for","errors","expression","use","reading",{"skillNo":148,"name":149,"nameZh":150,"description":151,"descriptionZh":152,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":153,"categories":154,"keywords":157,"publishedAt":44},"01M6BZ40QMB2C6QF2N09MM15GF","tree-sitter-language-pack-managing-parsers","解析器缓存管理","Use when the user needs to manage the tree-sitter parser cache — prefetch parsers for offline or CI runs, list what is downloaded, inspect a language, find the cache directory, or clean it. Covers `ts-pack download`, `list`, `info`, `cache-dir`, `clean`, and `init`.","当用户需要管理 tree-sitter 解析器缓存时使用——为离线或 CI 运行预取解析器、列出已下载内容、检查某种语言、查找缓存目录或清理缓存。涵盖 `ts-pack download`、`list`、`info`、`cache-dir`、`clean` 和 `init`。","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fskills\u002Ftree-sitter-language-pack-managing-parsers\u002FSKILL.md",[155,156],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[158,159,98,34,35,99,100,101,160,161,162,163,164,142,165,166,167,145,168,113],"parsers","tree sitter language pack managing parsers","ci","init","prefetch","cache","find","inspect","manage","clean","info",{"skillNo":170,"name":171,"nameZh":172,"description":173,"descriptionZh":174,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":175,"categories":176,"keywords":179,"publishedAt":44},"01M6BZ3Y1E46H4CPXVJD6SB03D","tree-sitter-language-pack-extracting-code-structure","代码结构提取","Use when the user wants structured code metadata from a source file — functions, classes, imports, exports, symbols, docstrings, comments, or syntax diagnostics. Covers `ts-pack process` feature flags, the JSON result shape, and the default feature set.","当用户需要从源文件获取结构化代码元数据时使用——包括函数、类、导入、导出、符号、文档字符串、注释或语法诊断。涵盖 `ts-pack process` 的功能开关、JSON 结果结构以及默认功能集。","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fskills\u002Ftree-sitter-language-pack-extracting-code-structure\u002FSKILL.md",[177,178],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},[180,98,39,34,35,123,109,99,100,101,181,182,183,141,184,185,126,111,186,113],"tree sitter language pack extracting code structure","extracting code structure","code structure","SET","default","flags","result",{"skillNo":188,"name":189,"nameZh":190,"description":191,"descriptionZh":192,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":193,"categories":194,"keywords":197,"publishedAt":44},"01M6BZ3VAJEY26GESPCWQ2JSXA","tree-sitter-language-pack-detecting-languages","编程语言检测","Use when the user wants to know which programming language a file or snippet is. Covers implicit detection in `ts-pack parse`\u002F`process`, confirming support with `ts-pack list`\u002F`info`, and the SDK detection functions for path, extension, and raw content.","当用户想知道某个文件或代码片段属于哪种编程语言时使用。涵盖 `ts-pack parse`\u002F`process` 中的隐式检测、通过 `ts-pack list`\u002F`info` 确认是否支持某种语言，以及用于路径、扩展名和原始内容的 SDK 检测函数。","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Ftree-sitter-language-pack\u002Fblob\u002Fmain\u002Fskills\u002Ftree-sitter-language-pack-detecting-languages\u002FSKILL.md",[195,196],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},[198,98,34,35,99,122,100,101,199,139,200,201,202,142,145,203,204,168,112,113],"tree sitter language pack detecting languages","programming language","programming","support","which","functions","with"]