This skill integrates AST-Grep (sg) into Claude Code to provide syntax-aware code manipulation that far surpasses traditional regex-based tools. By understanding the Abstract Syntax Tree (AST), it enables Claude to perform complex structural searches, identify security vulnerabilities like SQL injection, and execute large-scale refactoring with high precision. It is particularly effective for codebase exploration, API migrations, and enforcing architectural patterns across polyglot environments while minimizing false positives.
主要功能
01Deep integration with Claude's Explore agent for codebase analysis
02YAML-based rule configuration for custom linting and style enforcement
03Automated code transformation and large-scale codemod operations
0420 GitHub stars
05Security vulnerability scanning for over 40 programming languages
06Syntax-aware structural code search using pattern matching
使用场景
01Migrating deprecated API calls and library patterns across massive repositories
02Identifying and fixing security risks like XSS and unparameterized SQL queries
03Finding complex nested code structures that regular expressions cannot capture