What problem does it solve? Restructuring legacy or tangled code without breaking existing behavior is risky and slow. This Skill provides proven refactoring patterns and safety checklists so code structure improves while external behavior stays identical. ## Core Features & Use Cases - Safe Refactoring Patterns: Apply Extract Function, Extract Interface, Replace Conditional with Polymorphism, and project-wide renames with caller verification. - Legacy Modernization Strategies: Migrate systems incrementally using the Strangler Fig pattern and Branch by Abstraction. - Dead Code Removal: Detect unused functions with go vet and caller searches, then remove them cleanly. - Use Case: When modernizing a Go monolith, use this Skill to wrap legacy implementations behind interfaces, shift traffic gradually to new implementations, and verify each step with tests before removing old code. ## Quick Start Refactor this long Go function by extracting its validation, calculation, and persistence logic into separate functions while keeping all existing tests passing.