Skip to content
FunCoding

refactor

基于 Martin Fowler 方法论做系统化重构。Use when users ask to refactor code, improve structure, reduce technical debt, clean up legacy code, or improve maintainability.

Star
2,307
License
MIT
Last commit
Aug 6, 2026

03-skills/refactor/SKILL.md

View on GitHub

Code Refactoring Skill / 重构技能

这个 skill 用于安全、渐进式地做重构,重点强调:

  • 外部行为不变
  • 小步迭代
  • 测试先行
  • 每个阶段都可回退

工作流概览

  1. Research & Analysis
  2. Test Coverage Assessment
  3. Code Smell Identification
  4. Refactoring Plan Creation
  5. Incremental Implementation
  6. Review & Iteration

核心原则

  1. Behavior Preservation
  2. Small Steps
  3. Test-Driven
  4. Continuous
  5. Collaborative

输出要求

  • 先说明问题和目标
  • 再给分阶段计划
  • 每步都说明风险和验证方式

Similar Skills

receiving-code-review

OBobra/superpowers298k2,631 new stars in the last 7 days

requesting-code-review

OBobra/superpowers298k2,631 new stars in the last 7 days

systematic-debugging

OBobra/superpowers298k2,631 new stars in the last 7 days

code-review

MAmattpocock/skills288k10,178 new stars in the last 7 days

codebase-design

MAmattpocock/skills288k10,178 new stars in the last 7 days

scaffold-exercises

MAmattpocock/skills288k10,178 new stars in the last 7 days