.claude/skills/tdd-assistant/SKILL.md
[UDS] 引導測試驅動開發(TDD)流程:紅-綠-重構
npx skillsauth add asiaostrich/universal-dev-standards tddInstall 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, 推送, 保护分支, 质量门禁.