R
refactor-plan
by @githubv
4.5(300)
Plans multi-file refactoring, including correct sequencing and rollback steps, ensuring a safe and controlled refactoring process.
Installation
npx skills add github/awesome-copilot --skill refactor-plancompare_arrows
Before / After Comparison
1 组Before
Lack of thorough planning for multi-file refactoring can lead to code disorganization, impaired functionality, or difficulty in rolling back changes. This increases refactoring risks and consumes significant time and effort to fix issues.
After
Obtain a detailed refactoring plan, including the correct sequence and rollback steps. The refactoring process becomes safe and controllable, effectively reducing risks and ensuring code quality and system stability.
SKILL.md
Refactor Plan
Create a detailed plan for this refactoring task.
Refactor Goal
{{refactor_description}}
Instructions
- Search the codebase to understand current state
- Identify all affected files and their dependencies
- Plan changes in a safe sequence (types first, then implementations, then tests)
- Include verification steps between changes
- Consider rollback if something fails
Output Format
## 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?
User Reviews (0)
Write a Review
Effect
Usability
Docs
Compatibility
No reviews yet
Statistics
Installs10.8K
Rating4.5 / 5.0
Version
Updated2026年5月23日
Comparisons1
User Rating
4.5(300)
5
23%
4
51%
3
23%
2
2%
1
0%
Rate this Skill
0.0
Compatible Platforms
🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI
Timeline
Created2026年3月16日
Last Updated2026年5月23日