AI-Optimized Refactoring Patterns
Implements safe code restructuring patterns and eliminates AI-specific technical debt like additive-only changes and wrapper inflation.
This skill provides a comprehensive framework for safe refactoring during AI-assisted development, specifically addressing common AI behaviors like code duplication and 'thin wrapper' inflation. It equips Claude with language-agnostic decision criteria, size-check heuristics, and verification checklists to ensure structural improvements never compromise functional integrity. By identifying and correcting patterns such as 'rename-without-delete' and 'compatibility shim hoarding,' it helps maintain clean, maintainable codebases while managing technical debt throughout the development lifecycle.
Key Features
01Identification of AI-specific anti-patterns like additive-only changes and wrapper inflation
020 GitHub stars
03Safe refactoring patterns including extraction, consolidation, and dead code removal
04Strict verification checklists to ensure behavior-preserving changes and zero regressions
05TDD-integrated decision criteria to distinguish refactoring from new feature work
06Standardized size-check heuristics for functions, files, and parameter counts
Use Cases
01Conducting structural code reviews to identify and remove unnecessary abstraction layers
02Planning large-scale code health improvements and module decomposition sessions
03Addressing technical debt during automated issue execution and TDD loops