refactor-plan
Plan a multi-file refactor with proper sequencing and rollback steps
Best use case
refactor-plan is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Plan a multi-file refactor with proper sequencing and rollback steps
Teams using refactor-plan should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/refactor-plan/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How refactor-plan Compares
| Feature / Agent | refactor-plan | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Plan a multi-file refactor with proper sequencing and rollback steps
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Refactor Plan
Create a detailed plan for this refactoring task.
## Refactor Goal
{{refactor_description}}
## Instructions
1. Search the codebase to understand current state
2. Identify all affected files and their dependencies
3. Plan changes in a safe sequence (types first, then implementations, then tests)
4. Include verification steps between changes
5. Consider rollback if something fails
## Output Format
```markdown
## Refactor Plan: [title]
### Current State
[Brief description of how things work now]
### Target State
[Brief description of how things will work after]
### Affected Files
| File | Change Type | Dependencies |
|------|-------------|--------------|
| path | modify/create/delete | blocks X, blocked by Y |
### Execution Plan
#### Phase 1: Types and Interfaces
- [ ] Step 1.1: [action] in `file.ts`
- [ ] Verify: [how to check it worked]
#### Phase 2: Implementation
- [ ] Step 2.1: [action] in `file.ts`
- [ ] Verify: [how to check]
#### Phase 3: Tests
- [ ] Step 3.1: Update tests in `file.test.ts`
- [ ] Verify: Run `npm test`
#### Phase 4: Cleanup
- [ ] Remove deprecated code
- [ ] Update documentation
### Rollback Plan
If something fails:
1. [Step to undo]
2. [Step to undo]
### Risks
- [Potential issue and mitigation]
```
Shall I proceed with Phase 1?Related Skills
sprint-planning-helper
Sprint Planning Helper - Auto-activating skill for Enterprise Workflows. Triggers on: sprint planning helper, sprint planning helper Part of the Enterprise Workflows skill category.
soak-test-planner
Soak Test Planner - Auto-activating skill for Performance Testing. Triggers on: soak test planner, soak test planner Part of the Performance Testing skill category.
refactoring-ui
Audit and fix visual hierarchy, spacing, color, and depth in web UIs. Use when the user mentions "my UI looks off", "fix the design", "Tailwind styling", "color palette", or "visual hierarchy". Covers grayscale-first workflow, constrained design scales, shadows, and component styling. For typeface selection, see web-typography. For usability audits, see ux-heuristics. Trigger with 'refactoring', 'ui'.
plantuml-diagram-generator
Plantuml Diagram Generator - Auto-activating skill for Visual Content. Triggers on: plantuml diagram generator, plantuml diagram generator Part of the Visual Content skill category.
planning-disaster-recovery
Execute use when you need to work with backup and recovery. This skill provides backup automation and disaster recovery with comprehensive guidance and automation. Trigger with phrases like "create backups", "automate backups", or "implement disaster recovery".
penetration-test-planner
Penetration Test Planner - Auto-activating skill for Security Advanced. Triggers on: penetration test planner, penetration test planner Part of the Security Advanced skill category.
load-test-scenario-planner
Load Test Scenario Planner - Auto-activating skill for Performance Testing. Triggers on: load test scenario planner, load test scenario planner Part of the Performance Testing skill category.
jmeter-test-plan-creator
Jmeter Test Plan Creator - Auto-activating skill for Performance Testing. Triggers on: jmeter test plan creator, jmeter test plan creator Part of the Performance Testing skill category.
incident-response-planner
Incident Response Planner - Auto-activating skill for Security Advanced. Triggers on: incident response planner, incident response planner Part of the Security Advanced skill category.
dashboard-layout-planner
Dashboard Layout Planner - Auto-activating skill for Data Analytics. Triggers on: dashboard layout planner, dashboard layout planner Part of the Data Analytics skill category.
analyzing-capacity-planning
This skill enables Claude to analyze capacity requirements and plan for future growth. It uses the capacity-planning-analyzer plugin to assess current utilization, forecast growth trends, and recommend scaling strategies. Use this skill when the user asks to "analyze capacity", "plan for growth", "forecast infrastructure needs", or requests a "capacity roadmap". It is also useful when the user mentions specific capacity metrics like CPU usage, memory, database storage, network bandwidth, or connection pool saturation. This skill is ideal for proactive infrastructure planning and preventing performance bottlenecks.
refactor-module
Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles and community best practices.