sl:ast-search

Search codebases for structural patterns using AST-based tree-sitter rules.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/HuynhHoangPhuc/solon --skill sl-ast-search
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sl:ast-search
Source: https://github.com/HuynhHoangPhuc/solon/tree/main/plugins/solon-cli/skills/ast-search
Command: npx skills add https://github.com/HuynhHoangPhuc/solon --skill sl-ast-search

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Semantic code search using AST-based patterns to locate code by structure rather than text.

Core Features & Use Cases

  • AST-based search using tree-sitter patterns to identify code structures rather than exact text.
  • Multi-language support enabling searches across Rust, TypeScript, Python, Go, Java, and more.
  • Use case: quickly locate function definitions, decorators, or language constructs that match a pattern across a large repository.

Quick Start

Provide a structural pattern and language to search code with sl ast search.

Frequently Asked Questions about sl:ast-search

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

FAQPage Schema
What is AST-based semantic code search and how does it differ from plain text matching?

You can use AST pattern matching to locate function definitions, decorators, or language constructs across Rust, TypeScript, Python, Go, and Java by providing a structural pattern and language specification to search an entire repository.

Can I use tree-sitter patterns to search across multiple programming languages in one codebase?

Yes, tree-sitter AST search supports multi-language codebases, allowing you to find structural patterns across Rust, TypeScript, Python, Go, Java, and more within a single repository query.

Do I need ast-grep installed to perform structural code searches?

Yes, you must install the ast-grep tool to execute tree-sitter pattern matching, as the Skill relies on it to apply structural search rules and locate matching code constructs in your repository.

How do I find function definitions and decorators using structural pattern matching?

You provide a structural pattern and specify the programming language to find function definitions and decorators. The AST search matches code by syntax tree structure rather than relying on exact text matches.

What is the best way to search for specific code constructs in a large repository?

Using AST-based tree-sitter patterns is the best way to search large repositories, as it matches structural code constructs rather than plain text, accurately locating specific functions or patterns across multiple programming languages.

Why does plain text search fail to find refactored code patterns?

Plain text search fails because it matches exact strings, missing refactored code where variable names or formatting changed. AST-based semantic search solves this by matching the structural pattern of the syntax tree.