Refactor a legacy module using the Clean Code + Refactoring patterns
使うタイミング: You're about to touch a 500-line god-class and want principled guidance.
フロー
-
Assess with Clean Code lensUse the Clean Code skill. Review this file — what SOLID violations are present?✓ コピーしました→ Concrete violations named after principles, not vibes
-
Plan with Refactoring patternsUse the Refactoring Patterns skill. Plan the refactor using Extract Class and Replace Conditional with Polymorphism.✓ コピーしました→ Named Fowler refactorings with stepwise plan
-
Execute incrementallyApply the first step; run tests; repeat.✓ コピーしました→ Small safe steps, not one giant rewrite
結果: A refactor defensible in code review with explicit principles.
注意点
- Refactor without tests = risk — Skill insists on characterization tests first