By finereli
Safely refactor legacy code using small, verifiable steps based on Fowler's Refactoring and Feathers' Working Effectively with Legacy Code, applying techniques like extracting functions, renaming, and moving code to improve structure without altering behavior.
npx claudepluginhub finereli/refactoringA disciplined refactoring plugin based on principles from "Refactoring" (Fowler) and "Working Effectively with Legacy Code" (Feathers).
If you're in this directory:
claude plugins install .
Or specify the scope:
claude plugins install . --scope user # Available in all your projects
claude plugins install . --scope project # Only in current project
Install from GitHub:
claude plugins install https://github.com/elifiner/refactoring
Or with SSH:
claude plugins install git@github.com:elifiner/refactoring.git
Invoke the refactoring skill with:
/refactor [file or code to analyze]
The skill follows a two-phase approach:
> /refactor src/services/orderProcessor.js
Code Smell Analysis:
🔴 HIGH IMPACT (start here):
- Line 45: processOrder() is 150 lines, does 5 different things
- Lines 67-89: Validation logic duplicated in 3 places
🟡 MEDIUM IMPACT:
- Line 120: Deep nesting (4 levels) in calculateTotal()
Recommendation: Start with extracting validation logic.
This unlocks easier testing and future changes.
Proceed with extracting validation? (y/n)
This plugin follows a strict discipline:
See the detailed guide for complete explanations and examples in multiple languages.
refactoring/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata
├── skills/
│ └── refactor/
│ ├── SKILL.md # Main skill workflow
│ └── guide.md # Detailed refactoring guide
└── README.md # This file
The skill will help you identify when NOT to refactor:
To modify this plugin:
skills/refactor/.claude-plugin/plugin.jsonclaude --plugin-dir .claude plugins install .MIT
Refactor code following best practices and design patterns
Share bugs, ideas, or general feedback.
Extract functions, simplify complex code, and reduce cognitive complexity
Agent and skills for code simplification and refactoring to improve code quality while preserving functionality
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Develop, test, build, and deploy Godot 4.x games with Claude Code. Includes GdUnit4 testing, web/desktop exports, CI/CD pipelines, and deployment to Vercel/GitHub Pages/itch.io.
Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification