tdd
Skill871 starsChanged 5 months agoMITView on GitHub
Test-Driven Development loop. Write a failing test first, then the minimum code to pass it, then refactor. Repeat.
195 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 versions195 projects use a version of this.
Word for word · 1
- krishnamallam/upbox★ 2100% same
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 repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- catchupSkill
- claude-mdSkill
- context-budgetSkill
- debug-fixSkill
- explainSkill
- fix-issueSkill
- onboardSkill
- pr-reviewSkill
- refactorSkill
- setupdotclaudeSkill
- shipSkill
- specSkill
- test-writerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 14 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
14
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 18
Write ONE test for the smallest next behavior (not the whole feature)
- Distinctive: line 23
Run the test. It MUST fail: If it passes, either:
- Distinctive: line 26
Verify the failure message makes sense.
- Distinctive: line 30
Write the simplest, most obvious code that makes the failing test pass
- Distinctive: line 31
Don't generalize. Don't make it elegant.
- Distinctive: line 33
Run the test. It MUST pass: If it doesn't, fix the code (not the test.
- Distinctive: line 34
Run ALL tests. Nothing previously passing should break.
- Distinctive: line 38
Look for: duplication, unclear names, functions doing too much, magic values
- Distinctive: line 40
Run ALL tests after each change: If anything breaks, undo immediately.
- Distinctive: line 41
Stop refactoring when the code is clean enough.
- Distinctive: line 59
The test drives the design: If the code is hard to test, the design is wrong.
- Distinctive: line 60
Don't mock what you own: If you need to mock your own code to test it, the code needs restructuring.
- Distinctive: line 65
After each cycle, briefly state:
- Distinctive: line 70
When the feature is complete, provide a summary of all behaviors covered and any gaps that would need integration or manual testing.
“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
Build the following using strict Test-Driven Development:
Feature: $ARGUMENTS
The TDD Cycle
Repeat this cycle for each behavior. Never skip steps.
Red: Write a Failing Test
- Write ONE test for the smallest next behavior (not the whole feature)
- The test must:
- Describe the behavior in its name:
should return 0 for empty cart - Use Arrange-Act-Assert structure
- Assert specific values, not vague truths
- Describe the behavior in its name:
- Run the test. It MUST fail. If it passes, either:
- The behavior already exists (skip to the next behavior)
- The test is wrong (it's not testing what you think. Fix it)
- Verify the failure message makes sense. It should tell you what's missing
Green: Write the Minimum Code to Pass
- Write the simplest, most obvious code that makes the failing test pass
- Don't generalize. Don't make it elegant. Don't handle cases the test doesn't cover.
- Hardcoding is fine if only one test exists for that path. The next test will force generalization
- Run the test. It MUST pass. If it doesn't, fix the code (not the test. The test defined the behavior)
- Run ALL tests. Nothing previously passing should break.
Refactor: Clean Up Without Changing Behavior
- Look for: duplication, unclear names, functions doing too much, magic values
- Make ONE improvement at a time
- Run ALL tests after each change. If anything breaks, undo immediately.
- Stop refactoring when the code is clean enough. Don't gold-plate
Choosing What to Test Next
Work from simple to complex:
- Degenerate cases. Null input, empty collection, zero
- Happy path. The simplest valid input
- Variations. Different valid inputs that exercise different branches
- Edge cases. Boundary values, max sizes, special characters
- Error cases. Invalid input, failures, exceptions
- Integration. How this connects to the rest of the system
Each test should require a small code change. If you need to write more than ~10 lines of production code to pass a test, the test is too big. Split it.
Rules
- Never write production code without a failing test that demands it.
- Never write more than one failing test at a time. One red → green → refactor cycle at a time.
- The test drives the design. If the code is hard to test, the design is wrong. Change the design, not the test approach.
- Don't mock what you own. If you need to mock your own code to test it, the code needs restructuring.
- Commit after each green+refactor cycle. Small, passing, meaningful commits.
Output
After each cycle, briefly state:
- Test: what behavior was added
- Code: what changed to make it pass
- Refactor: what was cleaned up (or "none needed")
When the feature is complete, provide a summary of all behaviors covered and any gaps that would need integration or manual testing.
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.

