freeskillv2.0.0✓ verified

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.

$npx vanara install refactoring-patterns

Free & open source (Apache-2.0) — view the source on GitHub.

Overview

Refactoring is changing the internal structure of code without changing its observable behavior. It is not "cleanup whenever," and it is not rewriting. It is a disciplined sequence of small, *named*, behavior-preserving moves, each verified by tests, each committable on its own. Done right it is nearly risk-free; done wrong — without tests, mixed with feature work, or as a big-bang rewrite — it is

What it covers

Details

Tier
Free
Version
2.0.0
Depth
3 references · 2 examples · 1 runnable scripts
Verification
1/1 runnable checks passing
Runs on
Your own Claude Code — no API keys
← All skills