tdd
Skill3 starsChanged 29 days agoMITView on GitHub
Test-driven development, red then green, one vertical slice at a time. Use when building a feature, a rule, a config option or a bug fix test-first, when the user says "TDD", "red-green" or "write the test first", or when a subagent is handed a ticket to build.
194 other projects use a version of this, 59 of them edited.
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-teamedited, first seen Nov 8, 2026
- Contexera/dsh-agent-teamedited, 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 · 59
- mattpocock/skills★ 309k42% same
- QuivrHQ/quivr★ 40k22% same
- The-Vibe-Company/quivr★ 40k22% same
- MODSetter/SurfSense★ 17k41% same
- formbricks/formbricks★ 13k42% same
- ArcReel/ArcReel★ 6.3k42% same
- withcoral/coral★ 4.9k42% same
- bestofjs/bestofjs★ 3.1k40% same
- crbnos/carbon★ 2.8k41% same
- The-Vibe-Company/claude-code-controller★ 2.4k22% same
49 more not listed
Wrote their own version · 135
- trpc/trpc★ 41ksame name
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- GreyDGL/PentestGPT★ 16ksame name
- open-metadata/OpenMetadata★ 16ksame name
- prowler-cloud/prowler★ 15ksame name
- FastLED/FastLED★ 7.5ksame name
- sanity-io/sanity★ 6.4ksame name
125 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 repository22 other files it gives its agents.
- confluence-jira-linksSkill
- diagnosing-bugsSkill
- epic-reviewSkill
- explain-the-numberSkill
- grillingSkill
- handoffSkill
- leader-1-1-prepSkill
- llm-integrationSkill
- no-ai-attributionSkill
- open-in-my-browserSkill
- pick-upSkill
- plain-writingSkill
- regression-proofSkill
- researchSkill
- retroSkill
- security-audit-runnerSkill
- skill-collision-auditSkill
- supervisorSkill
- ticket-digestSkill
- ticket-trimSkill
- ticket-writeSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
6
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
- could be automatic: a setting could enforce it
- Distinctive: line 15
Before exploring, read the project's own testing notes (README, CONTRIBUTING, an architecture doc, AGENTS.md/CLAUDE.md) so test names use …
- Distinctive: line 41
Test only at pre-agreed seams: Before writing any test, write down the seams under test and confirm them with the user (or, for a subagent, …
- Distinctive: line 44
No test is written at an unconfirmed seam.
- Distinctive: line 46
Every heuristic, validator or detector ships with at least one negative test: legitimate input it must stay quiet on.
- Distinctive: line 64
Red before green: Write the failing test first and watch it fail for the reason you expect, then write only enough code to pass it.
- Distinctive: line 67
Run one test file while looping, everything once at the end: Before reporting done, run the project's full gates (typecheck, lint, the …
“Common” is measured: kept by at least 6 in 10 of the 186 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. Credit and license: LICENSE.md in this folder.
Project copy first. If the repository has its own .claude/skills/tdd/SKILL.md, read it and follow it instead of this file. A skill installed for all your projects outranks a project skill with the same name, so without this step a repository's own version of this skill would never run.
Before exploring, read the project's own testing notes (README, CONTRIBUTING, an architecture
doc, AGENTS.md/CLAUDE.md) so test names use the project's words and the tests land where
the project keeps them.
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: "rejects an order with an empty cart" says what capability exists, and it survives refactors because it doesn't care about internal structure.
See tests.md for examples and 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. Most projects have some of these, from cheapest to dearest:
- A pure function or module API with hand-built inputs. No I/O. Most logic belongs here.
- A module with its system boundaries faked: the HTTP client, the clock, the database behind an interface (see mocking.md).
- An integration test against real dependencies: a test database, a fixture site, a container.
- The entry point: the CLI, the HTTP handler, the UI, driven from outside.
Test only at pre-agreed seams. Before writing any test, write down the seams under test and confirm them with the user (or, for a subagent, with the ticket). Give each proposed seam a one-line note on what it catches and what it misses, so the choice between seams is not a guess. No test is written at an unconfirmed seam. Use the lowest seam that reaches the behavior.
Every heuristic, validator or detector ships with at least one negative test: legitimate input it must stay quiet on. A false positive is a bug, and the negative test is how a change proves it did not add one.
Anti-patterns
- Implementation-coupled: mocks internal collaborators, tests private helpers, or verifies through a side channel. 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, so it passes by construction. Expected values come from an independent source: a known-good literal, the spec, the issue.
- Horizontal slicing: writing all tests first, then all implementation. Work in vertical slices: 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 and watch it fail for the reason you expect, then write only enough code to pass it.
- One slice at a time. One seam, one test, one minimal implementation per cycle.
- Run one test file while looping, everything once at the end. Before reporting done, run the project's full gates (typecheck, lint, the whole suite). Judge each by its exit code, never by reading the output for the word "pass", and never through a pipe.
- A fix's test must prove it. For a bug fix, the new test has to fail on the code without
the fix. The
regression-proofskill shows how to check that in a scratch worktree. - Wait on the condition, not the clock. A test that needs something to happen polls for it
with an explicit timeout (
vi.waitFor, Playwright'sexpect.poll, a retry-until helper) and returns as soon as it does. A fixed sleep guesses how long it takes, and the guess loses on a loaded machine or in a full suite. A sleep stays only to show that something did not happen, with a comment naming the event it waits out. - Fake the clock for time-based code. Debounce, quiet windows and retry delays run under the test framework's fake timers, and the test advances the clock. Fake only the timers the code uses: faking everything can freeze an HTTP client's keep-alive. A speed or size claim is asserted as a count (calls, comparisons, bytes), not a duration.
- Refactoring is not part of the loop. It belongs to review, not to the red → green cycle.
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.

