What problem does it solve?
This Skill removes the guesswork from codebase refactors by searching and rewriting code by syntax structure instead of plain text, which makes it far safer for large-scale edits and language-aware linting.
Core Features & Use Cases
- AST-aware search: Find functions, calls, imports, classes, control flow, and other syntax shapes across supported languages.
- Deterministic rewrites: Preview changes first, then apply codemods with built-in safeguards for two-pass mutation workflows.
- Cross-platform setup: Install and resolve the ast-grep binary on macOS, Linux, Windows, WSL, and Git Bash with fallback paths and diagnostics.
- Rule-based scanning: Run reusable YAML rules for repository-wide checks, fixes, and snapshot testing.
- Use Case: A developer can replace console logging, strip unsafe casts, migrate imports, or enforce project-specific code patterns across many files with one guided workflow.
Quick Start
Ask the skill to search for a syntax pattern or rewrite it across your repository, and tell it the target language, path, and whether you want a dry run or an applied change.