Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By joowankim
Legacy code refactoring specialist - clean up your messy code with safe, test-driven refactoring
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin joowankim-declutterSafe, test-driven refactoring plugin for Claude Code
Legacy code cleanup with systematic assessment, behavior-preserving tests, and atomic changes.
# Add the marketplace
/plugin marketplace add joowankim/declutter
# Install the plugin
/plugin install declutter@declutter
/plugin install /path/to/declutter
/assess src/
Identifies code smells, complexity hotspots, and refactoring opportunities.
/declutter src/problematic-module.py
Automatically starts the 5-step workflow:
All tests pass, behavior is preserved, and code quality is improved.
Declutter follows three iron laws:
| Iron Law | Meaning |
|---|---|
| No refactoring without assessment | Never change code before understanding it |
| No code changes without tests | Capture behavior with characterization tests first |
| No completion without verification | Confirm all tests pass |
| Command | Purpose |
|---|---|
/assess | Codebase quality assessment |
/declutter | Start refactoring workflow |
/migrate | Gradual migration |
Declutter uses specialized agents:
| Agent | Role | Model |
|---|---|---|
declutter-analyzer | Code analysis | Sonnet |
declutter-smell-detector | Smell detection | Haiku |
declutter-executor | Refactoring execution | Sonnet |
declutter-reviewer | Final verification | Opus |
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ /assess │ ──▶ │ /declutter │ ──▶ │ Done │
│ Analyze │ │ Refactor │ │ Improved │
└─────────────┘ └─────────────┘ └─────────────┘
│ │
▼ ▼
Assessment 5-Step Workflow
Report (Assess→Plan→Test→Execute→Verify)
See docs/ for detailed documentation:
MIT License - see LICENSE for details.
Share bugs, ideas, or general feedback.
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Disciplined refactoring using small, verifiable steps based on Fowler's 'Refactoring' and Feathers' 'Working Effectively with Legacy Code'
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.
Refactor code following best practices and design patterns
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.
Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claim