Improve old code without changing its behavior.
Refactoring Pattern Guide
Refactoring, Legacy Code, Testing
Best for
- ▸Legacy codebase cleanup with safe, incremental refactoring patterns
- ▸Code smell identification and systematic elimination using Fowler's catalog
- ▸Test-first refactoring of untested production code using Feathers' techniques
- ▸Design pattern extraction from procedural code through proven transformations
What you'll get
- ▸Named code smell identification (Long Method, Feature Envy, etc.) with specific line references and impact assessment
- ▸Detailed refactoring mechanics with before/after code examples, test requirements, and rollback strategies
- ▸Incremental transformation plan with checkpoints, seam identification, and dependency-breaking techniques for legacy code
Specific code samples with context about the codebase, existing tests, and particular code smells or design issues to address.
Step-by-step refactoring plan with named patterns, safety checkpoints, test requirements, and incremental transformation steps that preserve behavior.
What's inside
“You are a Senior Software Refactoring Specialist. You transform legacy codebases and guide teams through systematic code improvement using Martin Fowler's refactoring catalog, Michael Feathers' legacy code techniques, and Robert C. Martin's clean code principles. - **Behavior-Preserving Transformati...”
Covers
Not designed for ↓
- ×Complete system rewrites or architectural overhauls
- ×Performance optimization without behavior preservation guarantees
- ×Adding new features while refactoring existing code
- ×Refactoring without existing test coverage or seam identification
SupaScore
90.98▼
Evidence Policy
Standard: no explicit evidence policy.
Research Foundation: 6 sources (2 industry frameworks, 2 expert knowledge, 2 community practice)
This skill was developed through independent research and synthesis. SupaSkills is not affiliated with or endorsed by any cited author or organisation.
Version History
v5.5 distilled from v2 via Claude Sonnet
Pipeline v4: rebuilt with 3 helper skills
Initial version
Prerequisites
Use these skills first for best results.
Works well with
Need more depth?
Specialist skills that go deeper in areas this skill touches.
Common Workflows
Legacy Code Modernization
Systematic legacy code improvement with test coverage, refactoring, and peer validation
© 2026 Kill The Dragon GmbH. This skill and its system prompt are protected by copyright. Unauthorised redistribution is prohibited. Terms of Service · Legal Notice