locales/zh-CN/skills/refactoring-assistant/SKILL.md
引导重构决策、推荐策略,并提供逐步执行工作流程。 使用时机:重构代码、评估重构 vs 重写、处理遗留代码。 关键字:refactor, strategy, legacy, technical debt, 重构, 策略, 遗留代码, 技术债。
npx skillsauth add asiaostrich/universal-dev-standards locales/zh-CN/skills/refactoring-assistantInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
语言: English | 简体中文
引导重构决策、推荐策略,并提供逐步执行工作流程。
| 命令 | 用途 |
|------|------|
| /refactor | 启动交互式重构引导 |
| /refactor decide | 执行重构 vs 重写决策树 |
| /refactor tactical | 建议战术性(日常)策略 |
| /refactor strategic | 引导战略性/架构重构 |
| /refactor legacy | 遗留代码安全策略 |
| /refactor debt | 技术债评估 |
| 策略 | 使用时机 | |------|---------| | 准备式重构 | 新增被阻挡的功能之前 | | 童子军法则 | 任何维护工作中 | | 红-绿-重构 | TDD 开发循环 |
| 策略 | 使用时机 | |------|---------| | 绞杀者无花果 | 逐步替换整个系统 | | 防腐层 | 与遗留系统集成 | | 抽象分支 | 在主干上重构共享代码 |
| 策略 | 使用时机 | |------|---------| | 特征化测试 | 任何遗留代码重构之前 | | 草稿式重构 | 理解黑盒代码 | | 寻找接缝 | 在遗留代码中注入测试替身 |
/refactor 完成后,AI 助手应建议:
重构完成。建议下一步:
- 执行
/checkin通过品质关卡- 执行
/coverage确认重构后覆盖率不下降- 执行
/commit提交重构变更
development
[UDS] 扫描代码库的调试残留与代码质量问题;可自动修正安全模式。 Use when: before committing, during PR review, or periodic codebase cleanup. Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality, 扫描, 清理.
tools
[UDS] 从规格衍生 BDD 场景、TDD 骨架或 ATDD 表格
development
[UDS] 识别重复流程并以正确的开发深度构建 Skill
tools
[UDS] AI 辅助 git push 安全层:质量门禁 + 协作护栏。 Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches. Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保护分支, 质量门禁.