跳到正文
cccskills
免费在 GitHub 公开

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`.

中文简介正在准备中。当前显示原文说明。

xberg-io/tree-sitter-language-pack星标 478(GitHub 478 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md3.3 KB
  • index.md583 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

<!-- AI-RULEZ :: GENERATED FILE — DO NOT EDIT Content-Hash: blake3:a2e80363e28ad0e5f3112ab4c73c46e76fa6f9a6d875d1c56af89fc86546f9f5 Source-Hash: blake3:f6af1693d7e3d301871730c180582f140a9c6aeee0d040ba3edbfb33b5d38409 Schema-Version: v1 -->

Managing parsers

Parser libraries download on demand the first time a language is used and are cached on disk. Manage that cache explicitly for offline work, CI prefetch, reproducible builds, or to reclaim space.

Note: parser cache management (download, clean, init) is done via the ts-pack CLI directly. The OpenCode tools expose only parse/process/info.

Prefetch (offline / CI)

ts-pack download python rust typescript   # specific languages
ts-pack download --all                    # every available language
ts-pack download --groups all             # by group
ts-pack download python --fresh           # clean cache first, then download

The manifest currently defines exactly one group, all. Group names are manifest data, not a fixed list — enumerate them with manifest_groups() rather than hardcoding. Run download in your CI setup step so later parse/process calls hit the cache instead of the network.

Inspect

ts-pack list                 # all available languages
ts-pack list --downloaded    # only languages currently cached
ts-pack list --manifest      # everything in the remote manifest
ts-pack list --filter script # filter by name substring

ts-pack info python          # known? downloaded? cache path?
ts-pack cache-dir            # print the effective cache directory

Clean

ts-pack clean           # prompts for confirmation
ts-pack clean --force   # skip the prompt (use in scripts/CI)

clean removes all cached parser libraries; they re-download on next use.

Config file (init)

ts-pack init writes a language-pack.toml to the current directory pinning a cache location and/or a language set. This writes a file to the working directory.

ts-pack init --languages python,rust --cache-dir .ts-pack-cache

Resulting language-pack.toml:

cache_dir = ".ts-pack-cache"
languages = ["python", "rust"]

With no flags, init writes a commented template. When --languages is given, init also triggers the download for those languages. (init takes only --languages and --cache-dir — for group-based prefetch use ts-pack download --groups <names>.) Commit language-pack.toml to pin the parser set across a team or CI.

Typical CI flow

ts-pack init --languages python,rust,typescript --cache-dir .ts-pack-cache
# ... later steps run parse/process offline against the warm cache ...
ts-pack list --downloaded   # assert the expected parsers are present

When to reach for the other skills

Once parsers are cached, use tree-sitter-language-pack-parsing-source to get syntax trees and tree-sitter-language-pack-extracting-code-structure to pull metadata. info/list here also serve the language-support checks described in tree-sitter-language-pack-detecting-languages.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

api

免费

Use tree-sitter-language-pack api reference documentation.

中文简介正在准备中。当前显示原文说明。

xberg-io/tree-sitter-language-pack4782026年10月26日 更新

cli

免费

Use tree-sitter-language-pack cli reference documentation.

中文简介正在准备中。当前显示原文说明。

xberg-io/tree-sitter-language-pack4782026年10月26日 更新

mcp

免费

Use tree-sitter-language-pack mcp reference documentation.

中文简介正在准备中。当前显示原文说明。

xberg-io/tree-sitter-language-pack4782026年10月26日 更新

Parse and extract code intelligence from 372 programming languages using tree-sitter grammars. Use when writing code that parses source, extracts structure/imports/exports/symbols/docstrings/comments, detects a language, runs syntax diagnostics, or produces syntax-aware chunks for LLMs — in Rust, Python, Node.js/TypeScript, or the ts-pack CLI. Covers installation, the CLI surface, the SDK surface, and parser-cache management.

中文简介正在准备中。当前显示原文说明。

xberg-io/tree-sitter-language-pack4782026年10月26日 更新

Use when the user wants to split source code into chunks for an LLM context window without breaking syntax mid-construct. Covers `ts-pack process --chunk-size`, why syntax-aware splits beat fixed-byte splits, picking a size, and the chunk JSON shape.

中文简介正在准备中。当前显示原文说明。

xberg-io/tree-sitter-language-pack4782026年10月26日 更新

Use when the user wants to know which programming language a file or snippet is. Covers implicit detection in `ts-pack parse`/`process`, confirming support with `ts-pack list`/`info`, and the SDK detection functions for path, extension, and raw content.

中文简介正在准备中。当前显示原文说明。

xberg-io/tree-sitter-language-pack4782026年10月26日 更新

查看 xberg-io 的全部技能

报告此技能的问题