What problem does it solve? Text-based search tools like grep cannot understand code structure, making it hard to find patterns like "async functions without error handling" or safely refactor code across a codebase. This Skill uses ast-grep to perform syntax-aware searches, structural rewrites, and custom linting based on the Abstract Syntax Tree. ## Core Features & Use Cases - Syntax-Aware Search: Find code by AST structure using patterns with meta-variables like console.log($$$ARGS) across JavaScript, TypeScript, Python, Go, Rust, and more. - Structural Refactoring: Preview and apply codebase-wide rewrites with sg run -p 'old' -r 'new' -U, including dry-run previews and file glob filtering. - Custom Linting Rules: Define YAML rules with atomic, relational, and composite logic, then enforce them via sg scan in CI/CD pipelines. - Use Case: Replace all console.log calls with a logger in production code only: preview with sg run -p 'console.log($$$ARGS)' -r 'logger.info($$$ARGS)' --globs '!**/*.test.js' --dry-run src/, then apply with -U. ## Quick Start Ask the assistant to find all async functions without error handling in the src directory using ast-grep.