principle-refactoring
CommunityRefactor safely without changing behavior.
Software Engineering#refactoring#code smells#legacy code#fowler catalog#behavior preservation#characterization tests#green tests
Authorlugassawan
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It prevents risky refactors by enforcing behavior-preserving steps, keeping the test suite green between moves, and guiding you from code smells to the correct Fowler refactoring catalog decisions.
Core Features & Use Cases
- Behavior-preserving refactoring discipline: preserves behavior at every step, keeps small independently-reviewable changes, and runs tests after each move to stay green.
- Smell-to-move mapping: translates common refactoring smells (Long Method, Large Class, Feature Envy, Data Clumps, Primitive Obsession, Shotgun Surgery, Divergent Change, Speculative Generality) into specific Fowler moves and sequencing guidance.
- Legacy safety via characterization tests: instructs when and how to write characterization tests first for legacy code without coverage, turning unknown behavior into a verified safety net.
Quick Start
Ask the AI: “How do I refactor this legacy function with a Long Method into Extract Function steps while writing characterization tests first and keeping behavior identical between commits?”
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: principle-refactoring Download link: https://github.com/lugassawan/swe-workbench/archive/main.zip#principle-refactoring Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.