tdd
Skill8 starsChanged 3 months agoMITView on GitHub
通过连贯的红—绿—重构切片执行测试驱动开发。用户明确要求 TDD、先写测试、红—绿—重构,或在修复缺陷前先补回归测试时使用。新增或修改测试时,始终与 testing-guidelines 搭配;普通测试请求只使用 testing-guidelines,不使用本技能。
194 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- trpc/trpctheir own version, first seen Nov 8, 2026
- wowyuarm/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Contexera/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Dimon94/dveritytheir own version, first seen Nov 8, 2026
- Dimon94/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use capture-learning-tools, design-frontend-dev and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
The-Vibe-CompanySkillcapture-learning-tools
Turn technical conversations, bugs, CI failures, review comments,
Also in 5 projects that use this
The-Vibe-CompanySkilldesign-frontend-dev
Clean Impeccable frontend design skill. Use when the user wants to
Also in 5 projects that use this
tristanphvnSkillketchup-video
Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.
Also in 14 projects that use this
jaydubya818Skillfigure-it-out
Use when novel or multi-phase work needs an auditable workflow and no narrower playbook fits.
Also in 54 projects that use this
jaydubya818Skillprinciple-laziness-protocol
Apply when a refactor is adding wrappers or abstractions instead of simplifying.
Also in 45 projects that use this
- +2 more from The-Vibe-Company
- +5 more from jaydubya818
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- mattpocock/skills★ 309ksame name
- trpc/trpc★ 41ksame name
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- MODSetter/SurfSense★ 17ksame name
- GreyDGL/PentestGPT★ 16ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- brainstormingSkill
- code-reviewSkill
- reliable-task-executionSkill
- repo-map-firstSkill
- review-design-contractsSkill
- simplify-codebaseSkill
- testing-guidelinesSkill
- using-superpowersSkill
The file
Files
让测试先行地实现功能
负责已确认行为、失败证据、实现和局部重构之间的顺序。使用 testing-guidelines 选择并验证测试证据;本技能只负责测试优先的开发循环。
在 RED 前确定行为
从需求、契约、验收标准、不变量或已确认的回归问题开始。进入循环前,先解决会实质改变公开行为或用户可见行为的歧义。不要让测试凭空创造新需求。
每个连贯切片按以下顺序推进:
需求 -> 验收标准 -> 测试用例 -> RED -> GREEN -> REFACTOR
保持 TDD 关卡
- 观察到有意义的 RED。 在实现前运行所选证据;只有目标行为确实缺失或已损坏时,才接受该失败。构建、夹具、导入和环境失败都属于准备失败。
- 实现合理的 GREEN。 仅添加当前切片需要的生产行为,同时保持现有架构和契约。不要为了最快通过而牺牲可维护性或正确性。
- 局部重构。 只改进当前实现已有理由支持的部分,保持所有相关证据为绿,并避免无关清理或大范围重设计。
使用连贯的纵向切片
对每个尚未完成的行为:
- 用
testing-guidelines为该行为选择最小且可信的证据。 - 添加证据并观察到有效的失败。
- 只实现该切片所需的内容。
- 运行聚焦证据并保持通过。
- 只有能改进当前切片时才重构,然后再次验证通过。
一个切片是一项连贯的行为或契约,不一定只对应一个测试函数。完成一个切片后再开始独立行为,确保每次失败和通过都有清晰原因。
无法产生真实 RED 的情况
对于特征测试或保持行为不变的重构,目标行为可能已经存在,因此真实失败既不安全也不可行。说明替代证据,保留当前行为,不要为了模仿 TDD 顺序而制造没有意义的失败。
只有未解决的权限、公开行为,或为了可测试性而进行的重大架构调整会实质改变实现时,才询问用户。普通的执行顺序、接缝和局部重构无需额外审批。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

