Ast Grep

Use ast-grep (sg) for AST-aware code search and rewrite across 25 languages. Trigger for structural code matching or deterministic codemods: find every function/call/class/import shaped like X, rewrite console.log to logger.info, strip `as any`, migrate require() to import, find empty catch blocks or missing await, and scan/apply YAML rules. Prefer this over rg/grep when the target is syntax shape rather than text; use rg for string contents, comments, filenames, or regex-style byte searches.

majiayu000 e68bd45 2 files · 14.3 KB Updated 567 repo stars

File contents

majiayu000/claude-skill-registry-data/tree/main/other/ast-grep commit e68bd45b20

Frequently asked questions

npx skillmds add majiayu000/ast-grep