refactor
✓外科手术式代码重构可在不改变行为的情况下提高可维护性。涵盖提取函数、重命名变量、分解上帝函数、提高类型安全性、消除代码异味以及应用设计模式。比 repo-rebuilder 不那么剧烈;用于逐步改进。
SKILL.md
Improve code structure and readability without changing external behavior. Refactoring is gradual evolution, not revolution. Use this for improving existing code, not rewriting from scratch.
| Extract Method | Turn code fragment into method | | Extract Class | Move behavior to new class | | Extract Interface | Create interface from implementation | | Inline Method | Move method body back to caller | | Inline Class | Move class behavior to caller | | Pull Up Method | Move method to superclass | | Push Down Method | Move method to subclass |
| Rename Method/Variable | Improve clarity | | Introduce Parameter Object | Group related parameters | | Replace Conditional with Polymorphism | Use polymorphism instead of switch/if | | Replace Magic Number with Constant | Named constants | | Decompose Conditional | Break complex conditions | | Consolidate Conditional | Combine duplicate conditions |
可引用信息
为搜索与 AI 引用准备的稳定字段与命令。
- 安装命令
npx skills add https://github.com/cin12211/orca-q --skill refactor- 分类
- </>开发工具
- 认证
- ✓
- 收录时间
- 2026-02-05
- 更新时间
- 2026-02-18
快速解答
什么是 refactor?
外科手术式代码重构可在不改变行为的情况下提高可维护性。涵盖提取函数、重命名变量、分解上帝函数、提高类型安全性、消除代码异味以及应用设计模式。比 repo-rebuilder 不那么剧烈;用于逐步改进。 来源:cin12211/orca-q。
如何安装 refactor?
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/cin12211/orca-q --skill refactor 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用
这个 Skill 的源码在哪?
https://github.com/cin12211/orca-q
详情
- 分类
- </>开发工具
- 来源
- skills.sh
- 收录时间
- 2026-02-05