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确认测试覆盖率- 执行
/review自我审查代码
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, 推送, 保护分支, 质量门禁.