[TOOL_PROFILE]
ast-grep
Structural code search and rewrite tool based on AST patterns.
search lang: all
[USE_WHEN]ALLOW
- ✓ Search code by syntax structure instead of plain text
- ✓ Apply structural rewrites with reviewable patterns
[AVOID_WHEN]BLOCK
- ✕ Plain text search is sufficient
- ✕ The language or syntax is not supported by the configured parser
[GUARDRAILS]MANDATORY
- ⚠ Preview structural rewrites before writing changes.
[DETAILS]RAW_META
- Binary
- ast-grep
- Aliases
- sg
- Effects
- read_files, write_files
- Documentation
- https://ast-grep.github.io/
[SIMILAR_TOOLS]03