What problem does it solve?
This skill solves the difficulty of performing precise, shape-aware code searches and refactors that standard text-based grep tools cannot handle, such as matching specific function call patterns or complex structural declarations.
Core Features & Use Cases
- Structural Search: Find code based on its abstract syntax tree (AST) rather than raw text, allowing you to ignore comments or formatting variations.
- Automated Refactoring: Safely rewrite code patterns across an entire repository using pattern-based replacement templates.
- Use Case: Use this to find all instances of a specific function call across a large codebase or to modernize deprecated API usage by replacing old method signatures with new ones globally.
Quick Start
Use the ast-grep skill to find all instances of the connect method called on any receiver in the current rust codebase.