locales/zh-CN/skills/tdd-assistant/SKILL.md
引导测试驱动开发(TDD)流程:红-绿-重构。 使用时机:TDD 开发、撰写测试先行的代码、学习 TDD。 关键字:TDD, test-driven, red-green-refactor, 测试驱动, 红绿重构。
npx skillsauth add asiaostrich/universal-dev-standards locales/zh-CN/skills/tdd-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 | 简体中文
引导测试驱动开发(TDD)流程:红-绿-重构。
┌─────┐ ┌───────┐ ┌──────────┐
│ RED │ ────► │ GREEN │ ────► │ REFACTOR │
└─────┘ └───────┘ └──────────┘
▲ │
└────────────────────────────────┘
| 原则 | 说明 | Description | |------|------|-------------| | Fast | 测试快速执行(< 100ms/单元) | Tests run quickly | | Independent | 测试间无共享状态 | No shared state between tests | | Repeatable | 每次结果相同 | Same result every time | | Self-validating | 明确的通过/失败结果 | Clear pass/fail result | | Timely | 在产品代码之前撰写 | Written before production code |
/tdd - 开始互动式 TDD 工作阶段/tdd calculateTotal - 对特定函数进行 TDD/tdd "user can login" - 对用户故事进行 TDD/tdd 完成后,AI 助手应建议:
TDD 循环完成。建议下一步:
- 执行
/checkin通过品质关卡- 执行
/coverage确认测试覆盖率- 执行
/code-review自我审查代码
tools
[UDS] 從規格衍生 BDD 場景、TDD 骨架或 ATDD 表格
development
[UDS] /methodology: 選擇並追蹤開發方法論(SDD/BDD/TDD)。 Use when: 選擇方法論、切換開發模式、查詢當前方法論狀態。 若要查詢各階段對應指令請用 /dev-workflow。
testing
[UDS] Derive BDD scenarios, TDD skeletons, or ATDD tables from specifications
development
[UDS] Create or review specification documents for Spec-Driven Development