parsing-source

Generate syntax trees from source code using tree-sitter.

26|2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/xberg-io/plugins --skill parsing-source
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: parsing-source
Source: https://github.com/xberg-io/plugins/tree/main/plugins/tree-sitter-language-pack/.cursor-plugin/skills/parsing-source
Command: npx skills add https://github.com/xberg-io/plugins --skill parsing-source

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tree-sitter, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows users to easily generate syntax trees from source code files using tree-sitter, providing a way to inspect node structure, debug grammars, or feed s-expressions to other tools.

Core Features & Use Cases

  • Syntax Tree Generation: Parse source files and output a concrete syntax tree, available in s-expression or JSON format.
  • Language Detection: Automatically detect the language of the source file or specify it with a flag.
  • Use Case: Users can use this skill to analyze the structure of a code file to understand the relationships between its nodes or to debug a grammar file.

Quick Start

Run the ts-pack parse <file> command with the path to the source file you want to generate a syntax tree for.

Frequently Asked Questions about parsing-source

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a syntax tree from source code using tree-sitter?

To generate a syntax tree from source code, run the `ts-pack parse <file>` command. This utilizes tree-sitter's parsing capabilities to analyze the source file and output its structure as an s-expression or JSON.

What is tree-sitter syntax tree generation used for in code analysis?

Tree-sitter syntax tree generation is used to inspect node structures within a source file, debug grammar files, and produce s-expressions. It helps developers understand code relationships and feed structural data to other analysis tools.

Can I automatically detect the programming language when parsing source files?

Yes, you can automatically detect the language of a source file during parsing. Alternatively, you can manually specify the language by passing a flag when running the `ts-pack parse` command.

Do I need to install the tree-sitter library to generate s-expressions from source files?

Yes, you need the tree-sitter library installed. The Skill relies on this dependency to download and parse source code streams automatically, generating the desired s-expressions without requiring manual intervention.

What formats are available for syntax tree output?

The syntax tree output is available in s-expression and JSON formats. These outputs allow you to easily inspect the concrete syntax tree structure, analyze node relationships, or integrate with other debugging tools.

How does tree-sitter compare to other tools for debugging source code grammars?

Tree-sitter generates concrete syntax trees from source files without manual intervention, making it highly efficient for grammar debugging. It directly outputs structural s-expressions or JSON, allowing you to inspect node relationships quickly.