ast-grep

Installation
SKILL.md

ast-grep Structural Search

Use ast-grep when the user needs code structure, not just text. The useful outcome is a validated rule plus a clear statement of what it matches and what it may miss.

Triage

Start with the smallest tool that can answer the question.

  • Use rg for exact names, strings, comments, or simple text.
  • Use language tooling for semantic facts such as type resolution, references, imports, or rename safety.
  • Use ast-grep for syntax shape: descendants, ancestors, call forms, decorators, missing constructs, nested contexts, or multi-language structural searches.

If ast-grep is not installed, say so and offer an rg fallback only when the fallback will not pretend to be structural.

Installs
1
GitHub Stars
16
First Seen
Jun 17, 2026
ast-grep — bahayonghang/my-claude-code-settings