tdd
Skill8 starsChanged 6 months agoMITView on GitHub
使用测试驱动开发实现核心逻辑,适用于用户要求 TDD、红绿重构、先写测试再实现、用测试约束 AI 写代码,或需要为关键业务规则建立回归保护时使用。
Files
TDD
目标
用测试先框住行为,再实现代码。重点是控制实现方向,减少 AI 自由发挥。
工作方式
- 先确认要保护的核心行为。
- 写最小失败测试,测试名称表达业务行为。
- 运行测试,确认失败原因正确。
- 写最小实现让测试通过。
- 运行测试,确认通过。
- 必要时重构,但不能改变测试保护的行为。
适合场景
- 核心业务规则
- 状态流转
- 工具函数
- 数据转换
- 权限判断
- 复杂条件分支
参考
- 测试选择:
references/tests.md - mock 策略:
references/mocking.md - 重构节奏:
references/refactoring.md - 接口设计:
references/interface-design.md
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- mattpocock/skills★ 309ksame name
- Yeachan-Heo/oh-my-claude-sisyphus★ 40ksame name
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- QuivrHQ/quivr★ 40ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- MODSetter/SurfSense★ 17ksame name
- GreyDGL/PentestGPT★ 16ksame name
- open-metadata/OpenMetadata★ 16ksame name
- prowler-cloud/prowler★ 15ksame name
183 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.
Used alongsideProjects with it also use ketchup-video, principle-laziness-protocol 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.
3metaJunSkillketchup-video
Catch the user up like /ketchup, with a short subtitled video of slides for what happened and the waiting calls as text under it. Use for /ketchup-video.
Also in 10 projects that use this
jaydubya818Skillprinciple-laziness-protocol
Apply when a refactor is adding wrappers or abstractions instead of simplifying.
Also in 43 projects that use this
jaydubya818Skillprinciple-make-operations-idempotent
Apply when an operation must tolerate retries after partial completion.
Also in 43 projects that use this
bnemaSkillsetup-pstack
Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.
Also in 25 projects that use this
- +8 more from jaydubya818
In this repository17 other files it gives its agents.
- code-quality-reviewSkill
- code-reviewSkill
- create-list-pageSkill
- diagnoseSkill
- dynamic-form-knowledgeSkill
- feature-doc-maintainerSkill
- frontend-designSkill
- git-commit-messageSkill
- grill-with-docsSkill
- improve-codebase-architectureSkill
- manual-test-casesSkill
- page-reviewSkill
- requirement-analysisSkill
- requirement-story-writerSkill
- testcase-excelSkill
- testing-vue-vitestSkill
- vue-component-reviewSkill
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.

