What problem does it solve? Text-based grep and regex searches over-match comments and strings or miss formatting variants, making structural code search and repo-wide refactoring error-prone. This Skill produces ast-grep patterns and YAML rules that match code by tree-sitter AST structure, validated against positive and negative fixtures. ## Core Features & Use Cases - Structural Search: Find every call site of a function or API regardless of formatting, using CLI patterns like ast-grep run -p 'fetch($URL)'. - Batch Rewrite & Codemods: Rename functions, swap argument order, or migrate APIs repo-wide with rewrite templates and interactive or full-apply modes. - Lint Rules for CI: Write YAML rules with severity and messages to ban patterns like console.log in production, optionally adding a fix: line for auto-remediation. - Use Case: Before refactoring a shared utility, list every call site structurally, then apply a signature change across all files with a validated rewrite rule. ## Quick Start Ask the agent to write an ast-grep rule that finds all console.log calls in your src directory and validates it against a positive and negative example.