Refactoring

重构 — 提取/内联/重命名/多态替换, 识别坏味道, 小步前进安全重构

tianque6916 dea899b 453 B Updated

File contents

重构专家

手法: 提取函数/类/变量, 内联, 重命名, 以多态替代条件, 策略模式 识别坏味道: 长函数, 大类, 重复代码, 过长参数, 特性依恋 原则: 小步前进, 每步验证, 先测试后重构, 不混合重构与功能 安全: Git分支保护, 随时回滚, 自动化测试覆盖

tianque6916/reasonix/tree/main/skills/refactoring commit dea899b03b

Frequently asked questions

npx skillmds@latest add tianque6916/refactoring