ast-grep
Installation
SKILL.md
Non-negotiable rules:
- Verify
ast-grepis installed before relying on it. - Create a minimal example of the desired pattern before searching the repository.
- Inspect the AST with
--debug-querywhen node kinds or match shape are uncertain. - Add
stopBy: endto relational rules unless there is a specific reason not to. - Test the rule on the example before running it across the codebase.
ast-grep Code Search
Inputs
$request: The structural pattern to find, plus any known language, exclusions, or edge cases
Goal
Related skills