Refactor Safety Guard
Enforces strict safety protocols and checklists during code refactoring to prevent regressions, context loss, and structural errors.
Refactor Safety Guard is a specialized skill designed to mitigate the risks associated with AI-driven code restructuring. It mandates a 'read-first' protocol to prevent memory-based errors, generates side-by-side comparison tables for verification, and provides specific validation logic for complex UI components and data structures. By addressing common pitfalls like circular dependencies, state initialization conflicts, and 'shotgun fixes,' this skill ensures that optimizations—such as extracting components, merging logic, or renaming variables—maintain the integrity of the original codebase while improving its architecture.