R

refactor-plan

by @githubv
4.5(300)

规划多文件重构,包括正确的顺序和回滚步骤,确保重构过程安全可控。

code-refactoringtechnical-debtcode-qualitysoftware-maintenancedesign-patternsGitHub
安装方式
npx skills add github/awesome-copilot --skill refactor-plan
compare_arrows

Before / After 效果对比

1
使用前

多文件重构缺乏周密计划,可能导致代码混乱、功能受损或难以回滚。这增加了重构风险,耗费大量时间和精力修复问题。

使用后

获得详细的重构计划,包含正确顺序和回滚步骤。重构过程安全可控,有效降低风险,确保代码质量和系统稳定性。

SKILL.md

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

## 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?

用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量10.8K
评分4.5 / 5.0
版本
更新日期2026年5月23日
对比案例1 组

用户评分

4.5(300)
5
23%
4
51%
3
23%
2
2%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

时间线

创建2026年3月16日
最后更新2026年5月23日