Bad code isn't a character flaw, it's what happens under deadline pressure. This is the disciplined, test-backed way to fix it one small step at a time — not a rewrite.
About the book
Martin Fowler's core loop is deceptively simple: verify tests pass, apply one small structural change, verify tests still pass. Refactoring never changes what code does, only how it's organized — which is exactly why big-bang rewrites fail, since they tangle structural change with behavioral change until nobody can tell what broke what. The book pairs a catalog of code smells (where to look) with named transformations like Extract Method and Decompose Conditional (what to do).
Best used for
—Extracting a method or decomposing a tangled conditional safely
—Diagnosing a code smell and picking the right named refactoring for it
—Restructuring code before adding a feature, without resorting to a rewrite
“Martin Fowlers 'Refactoring' is in my opinion the best book about this subject.”
— Damian, Goodreads
Install this skill
Run this command in your terminal. The skill will be available in all your Claude Code projects.