← [BACK_TO_DIRECTORY]
[TOOL_PROFILE]

ast-grep

high risk

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
[DETAILS]RAW_META
Binary
ast-grep
Aliases
sg
Effects
read_files, write_files
[SIMILAR_TOOLS]03