Skip to main content

ast-grep

Stars13
Forks1
UpdatedJanuary 9, 2026 at 17:14

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 with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly