首页/ AI 技能 / @skilllib/skill-2117939930272411500
Skill站外收录 @skilllib/skill-2117939930272411500

superpowers-tdd

践行测试驱动开发流程,通过先编写失败测试再实现功能最后重构的闭环,确保代码行为可验证、变更受保护,适用于新功能开发、缺陷修复及代码重构等场景。

0.0 (0) 118 次安装 原作者 编程导航
收录于 2026-01-22
测试与安全 AI 技能

Skills.MD

# TDD Skill ## When to use this skill - new features that can be unit tested - bug fixes (always add a regression test if practical) - refactors (protect behavior with tests first) ## Rules - Prefer **red -> green -> refactor**. - If tests are hard, still add **verification**: minimal repro script, integration test, or clear manual steps. - Keep tests focused: one behavior per test where possible. - Name tests by behavior, not implementation details. ## Process 1. Define the behavior change (what should be true after). 2. Write/adjust a test to capture it (make it fail first if possible). 3. Implement the minimal change to pass. 4. Refactor if needed (keep passing). 5. Run the relevant test suite + any linters. ## Output requirements When you change code, include: - what tests you added/changed - how to run them - what they prove

评论 0

还没有评论,来抢沙发。