tdd
Skill0 starsChanged 20 days agoMITView on GitHub
Drives an <app> change test-first: red, green, refactor, with integration tests at the agreed seams.
193 other projects use a version of this, 62 of them edited.
Adopted by
Most recently taken up by
- F3-Nation/f3-nationedited, first seen Nov 30, 2026
- quarkiverse/quarkus-reactive-messaging-nats-jetstreamedited, first seen Nov 30, 2026
- Rain-kl/OpenFlareedited, first seen Nov 30, 2026
- Forget-C/Jellyfishedited, first seen Nov 29, 2026
- karanmrn/karanagentskillstheir own version, first seen Nov 29, 2026
- karanmrn/kstacktheir own version, first seen Nov 29, 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
jaydubya818Skillfigure-it-out
Use when novel or multi-phase work needs an auditable workflow and no narrower playbook fits.
Also in 66 projects that use this
shiwenbin1617Skillketchup-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 24 projects that use this
simo97Skillrequest-refactor-plan
Use this skill when user wants to create a refactor plan.
Also in 47 projects that use this
jaydubya818Skillprinciple-minimize-reader-load
Apply when layers, wrappers, or hidden state make simple behavior hard to follow.
Also in 57 projects that use this
- +3 more from The-Vibe-Company
- +2 more from jaydubya818
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 62
- mattpocock/skills★ 335k16% same
- MODSetter/SurfSense★ 17k14% same
- e2b-dev/E2B★ 15k13% same
- formbricks/formbricks★ 13k16% same
- mdiri-ai/SoduWork★ 9.1k13% same
- Forget-C/Jellyfish★ 7.5k16% same
- ArcReel/ArcReel★ 6.8k16% same
- withcoral/coral★ 5k16% same
- bestofjs/bestofjs★ 3.1k14% same
- crbnos/carbon★ 2.9k14% same
52 more not listed
Wrote their own version · 131
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- trpc/trpc★ 41ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- ccusage/ccusage★ 20ksame name
- ryoppippi/ccusage★ 20ksame name
- open-metadata/OpenMetadata★ 16ksame name
- GreyDGL/PentestGPT★ 16ksame name
- prowler-cloud/prowler★ 15ksame name
121 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 repository24 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- add-linux-packagingSkill
- add-sliceSkill
- add-viewSkill
- claim-checkSkill
- clean-room-rebuildSkill
- corpus-retrievalSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- graphifySkill
- grillingSkill
- learnSkill
- planSkill
- platform-portSkill
- researchSkill
- reviewSkill
- shipSkill
- specSkill
- verified-statusSkill
- visual-reviewSkill
- qt-best-practicesSkill
- qt-portSkill
- qt-reviewSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 189 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Do NOT activate this skill when:
- Distinctive: line 45
Write down the seams under test and confirm them with the requester before writing any test.
- Distinctive: line 49
Never anticipate future tests or add speculative features in the green step.
- Distinctive: line 54
Do not mock your own classes or internal collaborators.
- Distinctive: line 57
Do not assert through a side channel (querying the database instead of using the interface).
- Distinctive: line 60
Do not recompute the expected value the way the code computes it.
- Distinctive: line 63
Do not write all the tests first and then all the implementation.
- Distinctive: line 66
Use the project vocabulary for test names: read the glossary if it exists, and respect the ADRs for the area under test.
- Distinctive: line 71
Never claim a test passes without running it, and never assert on a behavior the test does not actually exercise.
- Distinctive: line 73
Leave the suite green at the end of every slice: a red test in the tree is a broken contract, not a to-do.
“Common” is measured: kept by at least 6 in 10 of the 189 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<app> Test-Driven Development skill
Reusable workflow for the red to green loop, and the reference that keeps the loop producing tests worth keeping. An agent invokes this skill; the agent supplies the behavior, the skill supplies the loop.
When to Activate
Activate this skill when an <app> feature or bug fix is to be built
test-first, when the request mentions red-green-refactor, or when
integration tests are wanted at a public interface.
Do NOT activate this skill when:
- The request is a pure documentation or comment edit.
- The request is to review existing tests (use
review). - The behavior cannot be pinned down yet (grill the plan first, then drive the change).
Core Principles
- Red before green: the failing test comes first, then only enough code to pass it.
- One vertical slice at a time: one seam, one test, one minimal implementation, repeat. Each test is a tracer bullet that responds to what the last cycle taught you.
- Tests verify behavior through public interfaces, never implementation details. The code can change entirely; the tests should not.
- A good test reads like a specification: "a customer can check out with a valid cart" states the capability, not the mechanism.
- Seams are agreed before the first test is written. You cannot test everything, so agreeing the seams up front is how effort lands on the critical paths.
- Expected values come from an independent source of truth: a known-good literal, a worked example, the specification.
Rules
- Write down the seams under test and confirm them with the requester before writing any test. No test is written at an unconfirmed seam.
- Give each proposed seam a one-line note on what it catches and what it misses.
- Never anticipate future tests or add speculative features in the green step.
- Refactoring happens with the suite green, but it is never a step inside the red-to-green cycle: it belongs to the review stage, not to the implementation cycle.
- Do not mock your own classes or internal collaborators. Mock only at system boundaries: external APIs, the clock, randomness, the filesystem, and sometimes the database.
- Do not assert through a side channel (querying the database instead of using the interface). The tell: the test breaks on a refactor that changed no behavior.
- Do not recompute the expected value the way the code computes it. That makes the test pass by construction and it can never disagree with the code.
- Do not write all the tests first and then all the implementation. Horizontal slicing tests imagined behavior and goes insensitive to real changes.
- Use the project vocabulary for test names: read the glossary if it exists, and respect the ADRs for the area under test.
- Integration tests exercise the real boundary: the wired adapter over fakes, or the container-backed suite, with fixtures explicit about which layer they stand in for.
- Never claim a test passes without running it, and never assert on a behavior the test does not actually exercise.
- Leave the suite green at the end of every slice: a red test in the tree is a broken contract, not a to-do.
Research References
| Claim | Source | Year | Link |
| Red before green, one slice at a time, refactoring is not part of the loop | mattpocock/skills, skills/engineering/tdd/SKILL.md | 2026 | skills/engineering/tdd/SKILL.md |
| Good tests verify behavior through public interfaces; tautological tests pass by construction | mattpocock/skills, skills/engineering/tdd/tests.md | 2026 | skills/engineering/tdd/tests.md |
| Mock only at system boundaries, and design for mockability at those boundaries | mattpocock/skills, skills/engineering/tdd/mocking.md | 2026 | skills/engineering/tdd/mocking.md |
| The desktop test types and where each assertion belongs | PLAYBOOK_TESTS.md §2 | - | PLAYBOOK_TESTS.md |
| The gate that turns a red test into a green suite | PLAYBOOK_CLAUDE_CODE.md §10 | - | PLAYBOOK_CLAUDE_CODE.md |
Output Format
Deliver, in order:
- The seams under test, with what each catches and what it misses, and the confirmation that they were agreed.
- The cycle log, one entry per slice: the failing test (and how it fails), the minimal implementation, the passing run.
- The final state: the full test run result and the seam coverage note (what is not covered by design).
Example:
tdd: seam = POST /orders (catches: input validation and pricing, misses:
async fulfillment)
cycle 1: orderTotalTest fails (expected 42.00, got 0.00) -> added the
pricing port -> passesDoes 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.

