What problem does it solve? Text-based search cannot reliably find code by structure, such as all async functions missing error handling or calls inside specific contexts. This Skill translates natural language queries into ast-grep rules that match code by its Abstract Syntax Tree, enabling precise structural search across large codebases. ## Core Features & Use Cases - Rule Authoring Workflow: Guides you from a natural language query through example code, rule writing, testing, and full codebase scanning. - Structural Pattern Matching: Covers atomic rules (pattern, kind, regex), relational rules (inside, has, precedes, follows), and composite rules (all, any, not) with metavariables like $VAR and $$$ARGS. - CLI Testing and Debugging: Shows how to test rules with --inline-rules and --stdin, and debug mismatches using --debug-query to inspect the AST. - Use Case: Find all async JavaScript functions that use await but lack try-catch blocks, by composing a rule with kind, has, and not clauses, then scanning the entire project. ## Quick Start Ask the assistant to write and test an ast-grep rule that finds a specific code pattern in your project, for example all console.log calls inside class methods.