AST Structural Code Search
Performs precise, language-aware code searches and analysis using Abstract Syntax Tree (AST) patterns.
This skill enables Claude to perform advanced structural code searches by translating natural language queries into powerful ast-grep rules. Unlike traditional text-based search tools, it utilizes Abstract Syntax Trees to identify specific code structures—such as async functions missing error handling or specific nested function calls—allowing for surgical precision during codebase analysis, refactoring, and auditing across multiple programming languages.
Key Features
01Provides debugging tools to visualize AST and CST structures
02Enables composite logical queries using all, any, and not operators
03Performs language-aware structural matching using Abstract Syntax Trees
045 GitHub stars
05Converts natural language queries into complex ast-grep YAML rules
06Supports relational search logic like 'inside', 'has', and 'precedes'
Use Cases
01Locating specific API patterns nested within particular class methods
02Finding all async functions that use 'await' but lack 'try-catch' blocks
03Identifying architectural anti-patterns and code smells across large projects