ast-grep
Translates natural language into structural code search rules using ast-grep for precise pattern matching.
Install
npx skills add https://github.com/ast-grep/agent-skill --skill ast-grepStats
| Total installs | 2,096 |
| Weekly installs | 2.1K |
| GitHub stars | 595 |
| First seen | Jan 22, 2026 |
| Source | @ast-grep/agent-skill |
Summary
- Translates natural language queries into ast-grep YAML rules to match code by structure rather than text, supporting complex patterns like "async functions without error handling"
- Provides step-by-step workflow: understand the query, create example code, write the rule, test with CLI, then search the codebase
- Includes debugging tools (--debug-query) to inspect AST structure and understand how code is parsed, plus inline rule testing via --stdin
- Supports both simple pattern-based searches (ast-grep run) and complex rule-based searches with relational operators (has, inside, precedes) and composite logic (all, any, not)
Tags
Related skills
| Skill | Installs | vs ast-grep |
|---|---|---|
| strategic-compact | 1,781 | -315 |
| apify-trend-analysis | 2,740 | +644 |
| agent-device | 1,710 | -386 |
| desktop control | 2,374 | +278 |
| gog | 1,741 | -355 |
FAQ
- How many installs does ast-grep have?
- ast-grep has 2,096 total installs and 2.1K installs this week.
- Where is ast-grep hosted?
- ast-grep is published by @ast-grep/agent-skill at https://github.com/ast-grep/agent-skill.
- How many GitHub stars does ast-grep have?
- ast-grep has 595 GitHub stars.
- When was ast-grep first indexed?
- OrangeBot.AI first indexed ast-grep on Jan 22, 2026.
- How do I install ast-grep?
- Run: npx skills add https://github.com/ast-grep/agent-skill --skill ast-grep