什么是 refactoring?
技术债务修复和代码重组工作流程。改进时使用 代码结构、降低复杂性、提取抽象或付出代价 积累的技术债务。 来源:ar4mirez/samuel。
技术债务修复和代码重组工作流程。改进时使用 代码结构、降低复杂性、提取抽象或付出代价 积累的技术债务。
通过命令行快速安装 refactoring AI 技能到你的开发环境
来源:ar4mirez/samuel。
Structured approach to technical debt remediation. Improve code structure while maintaining behavior through incremental, safe changes.
| Guardrail Violations | Functions >50 lines, files >300 lines | | Complexity Threshold | Cyclomatic complexity >10 | | Code Duplication | Same logic in 3+ places | | Quarterly Review | Regular technical debt assessment | | Pre-Feature | Before adding features to messy code | | Post-Incident | After bugs caused by confusing code |
| Long Method | >50 lines, multiple responsibilities | High | | Large Class | >300 lines, low cohesion | High | | Feature Envy | Method uses other class more than own | Medium | | Data Clumps | Same group of variables together | Medium | | Primitive Obsession | Overuse of primitives vs objects | Medium | | Switch Statements | Large switch blocks | Low |
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/ar4mirez/samuel --skill refactoring技术债务修复和代码重组工作流程。改进时使用 代码结构、降低复杂性、提取抽象或付出代价 积累的技术债务。 来源:ar4mirez/samuel。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/ar4mirez/samuel --skill refactoring 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/ar4mirez/samuel