ast-grep

Installation
SKILL.md

ast-grep Code Search

Use the ast_grep tool for all ast-grep operations. It has three modes: pattern, rule, and inspect. The tool description contains the full syntax reference — this skill teaches the workflow for writing effective searches.

Workflow

1. Understand the query

Before writing anything, clarify:

  • What code pattern or structure is the target?
  • Which programming language?
  • Are there variations or edge cases to include/exclude?

2. Start with pattern mode

Always try the simplest approach first:

Installs
1
First Seen
Mar 31, 2026