tdd
Skill0 starsChanged 3 months agoMITView on GitHub
Test-driven development. Use when the user wants a red-green development loop or integration tests.
193 other projects use a version of this, 68 of them edited.
Adopted by
Most recently taken up by
- mattpocock/skillsedited, first seen Oct 8, 2026
- rafaelob/pragmatic-agent-skillstheir own version, first seen Oct 5, 2026
- AlexisBalayre/claude-code-configedited, first seen Oct 5, 2026
- KroxiDev/engineering-skillstheir own version, first seen Oct 5, 2026
- gaia-react/gaiatheir own version, first seen Oct 5, 2026
- uzairansaruzi/p3-stacktheir own version, first seen Oct 5, 2026
Used with
Projects with it also use make-bot-ui, Poteto Mode 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.
eryzerzSkillmake-bot-ui
Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.
Also in 8 projects that use this
jtarorehSkillPoteto Mode
poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.
Also in 5 projects that use this
risadamsSkillwhich-skill
Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.
Also in 7 projects that use this
TheOnlyFusionCubeSkillprinciple-attack-the-premise
Inventory who actually owns or exhibits the imbalance, then challenge the shared premise before writing another patch. Use when two or more fixes that share one premise have failed the same gate.
Also in 11 projects that use this
TheOnlyFusionCubeSkillprinciple-test-behavior-not-implementation
Call the system the way its consumer does and assert meaningful observable output; avoid mocks or assertions that only mirror internal calls. Use when when writing or evaluating tests.
Also in 11 projects that use this
shreyT19Skillprinciple-laziness-protocol
Apply when refactoring, evaluating diff size, or tempted to add abstractions, layers, or signal threading. Bias toward deletion and the smallest change that solves the problem.
Also in 22 projects that use this
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 68
- mattpocock/skills★ 335k71% same
- crbnos/carbon★ 2.7k73% same
- nodetool-ai/nodetool★ 55157% same
- mxyhi/ok-skills★ 49273% same
- aws/graph-explorer★ 48473% same
- amazingloft999-droid/mattpocock-skills★ 42210% same
- bighadj22/codflow★ 33873% same
- ninehills/skills★ 28013% same
- loulanyue/skills★ 23185% same
- ayoubben18/ab-method★ 19254% same
58 more not listed
Wrote their own version · 125
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- open-metadata/OpenMetadata★ 15ksame name
- vinvcn/mattpocock-skills-zh-CN★ 4.6ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- rohitg00/pro-workflow★ 2.9ksame name
- codeaholicguy/ai-devkit★ 1.6ksame name
- backnotprop/pstack★ 991same name
- kdlbs/kandev★ 899same name
- codewithmukesh/dotnet-claude-kit★ 750same name
- truffle-ai/dexto★ 650same name
115 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 repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- codebase-designSkill
- code-reviewSkill
- commission-method-gap-researchSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- grillingSkill
- grill-with-docsSkill
- handoffSkill
- implementSkill
- improve-codebase-architectureSkill
- method-gap-research-statusSkill
- prototypeSkill
- refactor-skillSkill
- research-briefSkill
- researchSkill
- setup-matt-pocock-skillsSkill
- skill-evidence-captureSkill
- skill-evolutionSkill
- skill-evolution-statusSkill
- teachSkill
- to-issuesSkill
- to-prdSkill
- triageSkill
- wait-whatSkill
- wayfinderSkill
- writing-great-skillsSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
When exploring the codebase, read CONTEXT.md (if it exists) so test names and interface vocabulary match the project's domain language, and …
- Distinctive: line 16
Before testing a public invariant or choosing a golden fixture, read tests.md for the required coverage and sensitivity checks.
- Distinctive: line 24
When those sources do not settle the seam, ask: "What's the public interface, and which seams should we test?"
- Distinctive: line 34
Red before green: Write the failing test first, then only enough code to pass it.
“Common” is measured: kept by at least 6 in 10 of the 177 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
Test-Driven Development
TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle — consult them before and during the loop, not after.
When exploring the codebase, read CONTEXT.md (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.
What a good test is
Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification — "user can checkout with valid cart" tells you exactly what capability exists — and survives refactors because it doesn't care about internal structure.
Before testing a public invariant or choosing a golden fixture, read tests.md for the required coverage and sensitivity checks; see mocking.md for mocking guidelines.
Seams — where tests go
A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.
Test only at pre-agreed seams. Before writing any test, write down each seam under test and its authority. A seam ratified in an authoritative PRD, live issue, ADR, or explicit user decision is already agreed; ask the user only when the seam is absent or ambiguous. No test is written at an unconfirmed seam. You can't test everything — agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.
When those sources do not settle the seam, ask: "What's the public interface, and which seams should we test?"
Anti-patterns
- Implementation-coupled — mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed.
- Tautological — the assertion recomputes the expected value the way the code does (
expect(add(a, b)).toBe(a + b), a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth — a known-good literal, a worked example, the spec. - Horizontal slicing — writing all tests first, then all implementation. Bulk tests verify imagined behavior: you test the shape of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in vertical slices instead — one test → one implementation → repeat, each test a tracer bullet that responds to what the last cycle taught you.
Rules of the loop
- Red before green. Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.
- One slice at a time. One seam, one test selector or explicitly named parameterized/subtest case, one minimal implementation per cycle.
- Retain only observed cycles as TDD evidence. A TDD row requires a focused red actually observed failing before the production change it drove. Classify a first-run pass, post-production test edit, or removed selector as non-TDD in reconciliation; never invent a red. Each TDD row names seam authority; test file and exact selector or named case; observed public entry point; red command and intended plus observed failure; green command and result. Each command is complete, or a same-section stable key with its argument. Green remains a separate command position when it repeats red; "same command" and "same suite" are invalid.
- Use an authoritative verifier when it already supplies red. If an authoritative PRD, live issue, ADR, or explicit user decision supplies an already-failing public verifier, confirm that its observed failure is the intended failure for the authorized criterion; that failure may then serve as red, without adding a duplicative test only to satisfy chronology. Keep one focused case per cycle whenever the verifier supports focus. When the verifier is indivisible and reports a finite named failure set that forms one atomic acceptance criterion, one aggregate cycle is allowed: record the verifier path and complete command, fixture or input identity, seam authority, the exact intended and observed red set, the minimal implementation, and the final green result. In this branch, the evidence row may name the verifier and input identity instead of a test file and selector, and pre-review reconciliation records
no changed tests; existing verifier evidenceand compares the existing-verifier evidence identities with their reconciliation identities in both directions. - Reconcile the complete evidence artifact before review. Derive an inventory of every added, modified, renamed, or removed exact selector or named case in the scoped diff using the repository's native test structure. Give each identity one reconciliation row: change kind; file and exact identity; public entry point when one remains; seam authority; and either its TDD evidence row or an explicit non-TDD disposition. Validate every linked TDD row against the fields and command positions above. Compare inventory with reconciliation, and TDD evidence with TDD-custody reconciliation, in both directions; every difference must be empty. A missing field, invalid command, false custody claim, or nonempty difference blocks
/code-review. File- or class-level summaries do not satisfy this gate. For a test through an unratified module, helper, mutable global, side channel, or other boundary, ratify that seam or rewrite at the agreed public boundary; a private-invariant test cannot substitute for public-behavior proof. - Review repairs and refactoring. When
/code-reviewfinds missing or incorrect observable behavior,/implementmust re-enter one new red → green slice. For each actionable finding that/code-reviewmarksTDD re-entry required: yes, append one evidence row keyed by review pass, axis, and finding, run the focused red, then apply only enough production repair to reach green; consume those routing fields as supplied rather than reclassifying the finding here. Never rewrite or extend an earlier row to absorb a later finding. If the same test selector is reused, the new row must name the distinct new parameterized/subtest case and its focused red command. Before final handoff, compare the applicable finding identities in/code-review'sFindings fixed during reviewledger with the appended review-reentry row identities in both directions and require both differences to be empty. A repair that only refactors without changing behavior stays outside the red → green loop. Hand the reconciled, scoped committed change back to/code-review; that skill owns finding classification and the two-axis review,/implementowns the repair loop, and this skill owns TDD evidence.
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.

