ast-grep
Installation
SKILL.md
ast-grep Skill
ast-grep is a structural code search and rewriting tool. Use it when you need to find or modify code based on its AST structure rather than text patterns.
When to Use ast-grep
Use ast-grep when:
- Searching for code patterns (function calls, imports, specific constructs)
- Refactoring code systematically
- Finding deprecated patterns or anti-patterns
- The pattern involves code structure, not just text
Use grep/ripgrep when:
- Searching for literal strings, comments, or documentation
- Simple text matching is sufficient