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.
A 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 [email protected]: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
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub finereli/refactoringGive your coding agent architectural memory. Processes git history into developer-notes-style models.
Refactor code following best practices and design patterns
Code cleanup, refactoring automation, and technical debt management with context restoration
Safely refactor with tests as a safety net. Writes tests first if none exist.
Extract functions, simplify complex code, and reduce cognitive complexity
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.