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.

thedixitjain cd2c4e6 17 files · 127.0 KB Updated 2 repo stars

File contents

thedixitjain/the-mega-skill-library/tree/main/library/general-purpose/ast-grep commit cd2c4e6c75

Frequently asked questions

npx skillmds add thedixitjain/ast-grep