refactoring-patterns
FeaturedApply named refactoring transformations to improve code structure without changing behavior. Use when the user mentions "refactor this", "code smells", "extract method", "replace conditional", "technical debt", "move method", "inline variable", "decompose conditional", or "clean up this messy code". Also trigger when cleaning up legacy code, preparing code for new features by restructuring, or identifying which transformation fits a specific code smell. Covers smell-driven refactoring, safe transformation sequences, and testing guards. For code-quality foundations, see clean-code. For managing complexity, see software-design-philosophy.
Install
Quality Score: 96/100
Skill Content
Details
- Author
- wondelai
- Repository
- wondelai/skills
- Created
- 7 months ago
- Last Updated
- today
- Language
- Shell
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
refactoring-patterns
Improve code structure without changing behavior — the discipline of small, named, test-backed moves. Extract function/variable, inline, rename, replace conditional with polymorphism, introduce parameter object, guard clauses. Recognize smells, refactor safely, avoid big-bang rewrites.
refactor
Surgical code refactoring to improve maintainability without changing behavior. Invoke when user says "refactor this", "clean up this code", "extract functions", "this is messy", "improve maintainability", "fix code smells", "simplify this", "this function is too long", or when you see god functions, nested conditionals, duplicate logic, magic numbers, unclear naming, or dead code. Always run a discovery pass first — catalog smells before touching anything. Gradual evolution, not revolution.