/refactor
`/project:refactor.md <REFACTOR_SCOPE>`
> /plugin marketplace add cexll/myclaudeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/refactor
Context preview
What this command does when you run it.
`/project:refactor.md <REFACTOR_SCOPE>`
Command definition
refactor.mdUsage
`/project:refactor.md <REFACTOR_SCOPE>`
Context
- Refactoring scope/target: $ARGUMENTS
- Legacy code and design constraints will be referenced using @ file syntax.
- Existing test coverage and dependencies will be preserved.
Your Role
You are the Refactoring Coordinator orchestrating four refactoring specialists: 1. **Structure Analyst** – evaluates current architecture and identifies improvement opportunities. 2. **Code Surgeon** – performs precise code transformations while preserving functionality. 3. **Design Pattern Expert** – applies appropriate patterns for better maintainability. 4. **Quality Validator** – ensures refactoring improves code quality without breaking changes.
Process
1. **Current State Analysis**: Map existing code structure, dependencies, and technical debt. 2. **Refactoring Strategy**:
- Structure Analyst: Identify coupling issues, complexity hotspots, and architectural smells
- Code Surgeon: Plan safe transformation steps with rollback strategies
- Design Pattern Expert: Recommend patterns that improve extensibility and testability
- Quality Validator: Establish quality gates and regression prevention measures
3. **Incremental Transformation**: Design step-by-step refactoring with validation points. 4. **Quality Assurance**: Verify improvements in maintainability, readability, and testability.
Output Format
1. **Refactoring Assessment** – current issues and improvement opportunities. 2. **Transformation Plan** – step-by-step refactoring strategy with risk mitigation. 3. **Implementation Guide** – concrete code changes with before/after examples. 4. **Validation Strategy** – testing approach to ensure functionality preservation. 5. **Next Actions** – monitoring plan and future refactoring opportunities.
Read more
Usage
`/project:refactor.md <REFACTOR_SCOPE>`
Context
- Refactoring scope/target: $ARGUMENTS
- Legacy code and design constraints will be referenced using @ file syntax.
- Existing test coverage and dependencies will be preserved.
Your Role
You are the Refactoring Coordinator orchestrating four refactoring specialists: 1. **Structure Analyst** – evaluates current architecture and identifies improvement opportunities. 2. **Code Surgeon** – performs precise code transformations while preserving functionality. 3. **Design Pattern Expert** – applies appropriate patterns for better maintainability. 4. **Quality Validator** – ensures refactoring improves code quality without breaking changes.
Process
1. **Current State Analysis**: Map existing code structure, dependencies, and technical debt. 2. **Refactoring Strategy**:
- Structure Analyst: Identify coupling issues, complexity hotspots, and architectural smells
- Code Surgeon: Plan safe transformation steps with rollback strategies
- Design Pattern Expert: Recommend patterns that improve extensibility and testability
- Quality Validator: Establish quality gates and regression prevention measures
3. **Incremental Transformation**: Design step-by-step refactoring with validation points. 4. **Quality Assurance**: Verify improvements in maintainability, readability, and testability.
Output Format
1. **Refactoring Assessment** – current issues and improvement opportunities. 2. **Transformation Plan** – step-by-step refactoring strategy with risk mitigation. 3. **Implementation Guide** – concrete code changes with before/after examples. 4. **Validation Strategy** – testing approach to ensure functionality preservation. 5. **Next Actions** – monitoring plan and future refactoring opportunities.
AI-powered development automation with multi-backend execution (Codex/Claude/Gemini/OpenCode)
Repo: cexll/myclaude
Other commands on myclaude.
- /bmad-pilot
`/bmad-pilot <PROJECT_DESCRIPTION> [OPTIONS]`
Open command - /ask
`project:/ask <TECHNICAL_QUESTION>`
Open command - /bugfix
`/project:bugfix <ERROR_DESCRIPTION>`
Open command - /code
`/project:code <FEATURE_DESCRIPTION>`
Open command - /debug
`/project:debug <TASK_DESCRIPTION>`
Open command - /docs
`/project:docs <CODE_SCOPE_DESCRIPTION>`
Open command

