Comprehensive skill for 89 refactoring techniques and 22 code smells with practical examples. Use when the user asks to refactor code, detect code smells, improve code quality, reduce complexity, or clean up technical debt. Covers composing methods, moving features between objects, organizing data, simplifying conditionals and method calls, dealing with generalization, and detecting smells across bloaters, OO abusers, change preventers, dispensables, and couplers with before/after comparisons and step-by-step mechanics.
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Comprehensive skill for 89 refactoring techniques and 22 code smells with practical examples. Use when the user asks to refactor code, detect code smells, improve code quality, reduce complexity, or clean up technical debt. Covers composing methods, moving features between objects, organizing data, simplifying conditionals and method calls, dealing with generalization, and detecting smells across bloaters, OO abusers, change preventers, dispensables, and couplers with before/after comparisons and step-by-step mechanics.
allowed-tools
Read Grep Glob Bash
user-invocable
false
Refactoring
A thorough reference covering 89 refactoring techniques and code smells — featuring PHP 8.3+ examples, rationale, step-by-step mechanics, and before/after comparisons.
Refactoring Techniques (67)
Composing Methods
Extract Method — Pull code fragments into named methods → reference
Inline Method — Substitute a method call with its body → reference
Extract Variable — Give complex expressions meaningful names through explanatory variables → reference
Inline Temp — Substitute a temporary variable with its expression → reference
Replace Temp with Query — Swap temp variables for method calls → reference
Split Temporary Variable — Assign separate variables for separate purposes → reference
Remove Assignments to Parameters — Introduce local variables rather than reassigning parameters → reference
Replace Method with Method Object — Convert a complex method into its own class → reference
Substitute Algorithm — Swap an algorithm for a clearer alternative → reference
Moving Features Between Objects
Move Method — Relocate a method to the class that depends on it most → reference
Move Field — Relocate a field to the class that depends on it most → reference
Extract Class — Divide a class that handles too much → reference
Inline Class — Consolidate a class that does too little → reference