Refactor Safety & Integrity
Enforces a rigorous safety framework and comparison checklists to prevent regression and context loss during code refactoring.
This skill establishes a standardized protocol for high-stakes code refactoring tasks such as component extraction, logic merging, and structural optimization. By enforcing a 'Read-Compare-Verify' workflow, it prevents common AI pitfalls like memory-driven coding errors or unintentional logic simplification. It provides specific checklists for UI components, complex data structures, and conditional branches, ensuring that every refactored element maintains 100% parity with original functionality while identifying hidden traps like circular dependencies or state initialization conflicts.
Key Features
01772 GitHub stars
02Pre-check workflows for service extraction to avoid circular dependency loops.
03Mandatory source-of-truth reading protocol to prevent hallucination-based refactoring.
04UI integrity protection for complex container components like Modals and Drawers.
05Automated comparison table generation for verifying data structures and UI columns.
06Deep-dive verification for complex render functions and JSON-parsing logic.
Use Cases
01Refactoring large monolithic UI components into smaller, reusable sub-modules.
02Merging fragmented conditional logic and legacy if/else branches into unified structures.
03Updating data schemas and interface definitions across multi-service architectures.