AST-Aware Code Refactoring

0•

Performs syntax-aware code transformations and bulk refactoring across multiple files using Abstract Syntax Trees.

The AST-Aware Code Refactoring skill empowers Claude to execute complex, large-scale code migrations and architectural changes with structural precision. By leveraging ast-grep, it moves beyond simple text-based search and replace to understand the underlying syntax of your codebase. This ensures that transformations like API migrations, syntax modernization, and systematic renames are applied correctly to logic while ignoring similar patterns in comments or strings, significantly reducing the risk of manual errors in high-impact refactors.

主要功能

01Bulk transformation across multiple files and directories
020 GitHub stars
03Support for 15+ languages including TypeScript, Python, and Rust
04Rule-based refactoring for complex architectural migrations
05Interactive refactoring plans with before-and-after previews
06Syntax-aware pattern matching using Abstract Syntax Trees

使用场景

01Migrating from deprecated library APIs to modern alternatives across a large repository
02Systematically renaming functions and classes while preserving structural integrity
03Modernizing legacy syntax patterns such as converting var to const or require to import