structural-search

Installation
SKILL.md

Structural Search

Search code by its abstract syntax tree (AST) structure. Finds semantic patterns that regex cannot match reliably.

Tools

Tool Command Use For
ast-grep sg -p 'pattern' AST-aware code search

Pattern Syntax

Pattern Matches Example
$NAME Named identifier function $NAME() {}
$_ Any single node console.log($_)
$$$ Zero or more nodes function $_($$$) {}

Top 10 Essential Patterns

Related skills
Installs
30
GitHub Stars
17
First Seen
Jan 24, 2026