What problem does it solve? Regex-based search matches text, not code structure, producing false positives and missing semantic patterns. This Skill enables AST-aware code search, security vulnerability scanning, and large-scale refactoring that understands syntax across 40+ programming languages. ## Core Features & Use Cases - Structural Pattern Search: Find code patterns using AST meta-variables like $VAR and $$$ARGS instead of fragile regex, covering nested calls, class hierarchies, and import dependencies. - Security Scanning: Detect SQL injection, XSS, hardcoded credentials, command injection, and other OWASP Top 10 vulnerabilities with YAML rules and sgconfig.yml. - Codemod Transformations: Rewrite code at scale with pattern-to-pattern fixes, such as migrating axios to fetch or converting var to const, with dry-run preview support. - Use Case: Rename a deprecated function across hundreds of files by running sg with a pattern and rewrite rule, previewing changes with dry-run before applying. ## Quick Start Ask the AI to find all console.log calls in your JavaScript source directory using an ast-grep structural pattern.