setup-ast

Diagnose and configure tree-sitter for AST-powered code extraction.

351|31|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/ryanthedev/code-foundations --skill setup-ast
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-ast
Source: https://github.com/ryanthedev/code-foundations/tree/main/skills/setup-ast
Command: npx skills add https://github.com/ryanthedev/code-foundations --skill setup-ast

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Diagnoses and configures tree-sitter for AST-powered code extraction, enabling reliable static analysis and improved code-review workflows.

Core Features & Use Cases

  • Diagnostics: Detect missing or misconfigured tree-sitter setups and grammars.
  • Installation & Setup: Install tree-sitter CLI, clone and build grammars, and configure environment for AST parsing.
  • Use Case: On a new development machine, run this Skill to set up AST parsing so code can be analyzed immediately during reviews.

Quick Start

Run the setup tree-sitter script to initialize tree-sitter and grammars for AST parsing: ./scripts/setup-tree-sitter.sh # Core grammars ./scripts/setup-tree-sitter.sh --all # All grammars ./scripts/setup-tree-sitter.sh --status # Check status

Frequently Asked Questions about setup-ast

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

FAQPage Schema
How do I set up tree-sitter for AST-powered code extraction?

To set up tree-sitter for AST-powered code extraction, run the provided shell script to install the CLI, clone grammars, and configure the environment. Use ./scripts/setup-tree-sitter.sh to initialize core grammars or add --all for every available grammar.

Why does my tree-sitter grammar setup fail or parse code incorrectly?

Your tree-sitter setup fails when the CLI is missing or grammars are misconfigured. This Skill diagnoses the environment by running a status check with ./scripts/setup-tree-sitter.sh --status, detecting missing components, and rebuilding the necessary grammar configurations for reliable parsing.

Do I need git installed to configure tree-sitter grammars?

Yes, you need git installed to configure tree-sitter grammars because the setup process clones grammar repositories directly from remote sources. The Skill also requires tree-sitter-cli to build the grammars and enable AST extraction for code review workflows.

What is the best way to automate tree-sitter installation across development machines?

The best way to automate tree-sitter installation across machines is using the setup-tree-sitter.sh shell script. It standardizes the installation of the CLI and grammars while verifying the environment configuration, ensuring consistent AST parsing capabilities for static analysis on every new machine.

Can I check the status of my tree-sitter configuration without rebuilding grammars?

Yes, you can check your tree-sitter configuration status without rebuilding by running ./scripts/setup-tree-sitter.sh --status. This diagnostic command inspects the environment to detect missing or misconfigured tree-sitter setups and grammars without triggering a full installation process.