By joowankim
Legacy code refactoring specialist - clean up your messy code with safe, test-driven refactoring
Use for deep analysis of complex legacy code - architectural review, design pattern opportunities, and strategic refactoring recommendations. Read-only, uses Opus for complex reasoning.
Use when analyzing legacy code for quality issues - identifies smells, patterns, and refactoring opportunities. Read-only analysis agent.
Use for complex refactoring tasks requiring careful reasoning - large-scale restructuring, design pattern application, architecture changes. Uses Opus for complex transformations.
Use when executing refactoring tasks - applies safe changes with test preservation. Follows the safe-refactoring skill strictly.
Use when identifying design pattern opportunities - recommends appropriate patterns for code improvement.
Codebase assessment skill - evaluates code quality, identifies hotspots, and prioritizes refactoring opportunities
Refactoring planning skill - creates prioritized, actionable refactoring plans
Core skill for safe refactoring - enforces test-first approach and atomic changes
Code smell detection based on Martin Fowler's refactoring catalog - identifies quality issues and refactoring opportunities
Systematic debugging skill - structured approach to finding and fixing bugs during refactoring
Uses power tools
Uses Bash, Write, or Edit tools
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.
Safe, 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.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin joowankim-declutterCode cleanup, refactoring automation, and technical debt management with context restoration
Disciplined refactoring using small, verifiable steps based on Fowler's 'Refactoring' and Feathers' 'Working Effectively with Legacy Code'
Refactor code following best practices and design patterns
Agent and skills for code simplification and refactoring to improve code quality while preserving functionality
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
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.