home/categories/debugging/mauromedda-agent-toolkit-skills-ast-grep-skill-md
debuggingtools

ast-grep

AST-aware code search and refactoring using ast-grep (sg). Use INSTEAD of grep/ripgrep for searching code structure. Finds functions, classes, patterns, anti-patterns across Go, Python, Bash, Terraform/HCL codebases. Triggers on "ast-grep", "sg", "find function", "find class", "find method", "find all usages", "where is X used", "search for pattern", "find anti-pattern", "code smell", "refactor pattern", "structural search", "AST search", "find error handling", "find imports", "find decorators", "find struct", "find interface", "search code", "locate function", "grep for function", "find definition". PROACTIVE: Use for ANY code search task; prefer over grep/ripgrep for code files.

mauromedda
maintainer
mauromedda
Updated 1/13/2026
Stars
3
Forks
0
quick start

Installation and usage

AST-aware code search and refactoring using ast-grep (sg). Use INSTEAD of grep/ripgrep for searching code structure. Finds functions, classes, patterns, anti-patterns across Go, Python, Bash, Terraform/HCL codebases. Triggers on "ast-grep", "sg", "find function", "find class", "find method", "find all usages", "where is X used", "search for pattern", "find anti-pattern", "code smell", "refactor pattern", "structural search", "AST search", "find error handling", "find imports", "find decorators", "find struct", "find interface", "search code", "locate function", "grep for function", "find definition". PROACTIVE: Use for ANY code search task; prefer over grep/ripgrep for code files.

Installation
$ install --globalskills.sh
Usage

Once installed, you can use this skill by running the following command in your terminal:

skills use ast-grep