tdd
Skill12 starsChanged 43 days agoApache-2.0View on GitHub
Test-driven development workflow. Enforces red/green/refactor discipline: write failing tests first, implement the minimum code to pass, then clean up. Use when the user invokes /tdd with a feature to implement (e.g., "/tdd implement the vocab export endpoint", "/tdd add useMyHook"). Never skips ahead to implementation before confirming tests fail.
194 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 versions194 projects use a version of this.
Word for word · 0
None found.
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 repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- clarifySkill
- commitSkill
- cywSkill
- demo-videoSkill
- diff-reviewSkill
- extract-hooksSkill
- handoffSkill
- plan-duelSkill
- plan-initSkill
- plan-init-v1Skill
- plan-phaseSkill
- plan-phase-v1Skill
- plan-runSkill
- plan-run-v1Skill
- review-panelSkill
- security-review-codebaseSkill
- web-verifySkill
- xcSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. 0 are common, 22 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
22
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
- Distinctive: line 28
Read the code and tests nearest the feature before writing anything.
- Distinctive: line 39
Write tests before any implementation
- Distinctive: line 41
Run tests; confirm the failure is caused by that absent behavior, not by a broken test
- Distinctive: line 42
If tests pass immediately, the feature already exists — stop and report that to the user
- Distinctive: line 44
Write the tests in the appropriate location following the project's existing conventions for test file placement and naming.
- Distinctive: line 70
Write the minimum code to make the failing tests pass:
- Distinctive: line 72
No extra features, no future-proofing
- Distinctive: line 73
No refactoring of adjacent code
- Distinctive: line 74
Follow existing patterns in the same file/module (naming, error handling, async style)
- Distinctive: line 78
All tests in the new file must pass.
- Distinctive: line 79
Run the full test suite (or at minimum the affected layer) to confirm no regressions.
- Distinctive: line 80
When this loop runs inside a plan that sets its own rule for which tests to run while working, that rule wins.
- Distinctive: line 83
If tests still fail, fix the implementation — do not modify the tests to make them pass.
- Distinctive: line 89
If the implementation has obvious duplication, poor naming, or violates project conventions:
- Distinctive: line 92
Run tests again to confirm they still pass
- Distinctive: line 93
Do not add new behavior during refactor
- Distinctive: line 95
If nothing needs cleanup, skip this phase.
- Distinctive: line 101
After tests are green, report what the new tests cover and what they leave out, which files they live in, the exact command that runs them, …
- Distinctive: line 109
Do not skip running tests between phases — the red→green transition is the whole point
- Very specific: line 110
Do not add eslint-disable, # noqa, or test-specific conditionals in production code to make tests pass
- Distinctive: line 112
Do not modify tests to make them pass — fix the implementation instead
- Distinctive: line 113
Use existing test utilities and fixtures — do not duplicate infrastructure that already exists
- Distinctive: line 114
Follow the project's CLAUDE.md / AGENTS.md conventions (whichever exists) throughout
“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
TDD Workflow
Overview
Phases run in strict order. Never proceed to the next phase without running tests and confirming the expected outcome.
- Understand — read existing code, tests, and project structure before writing anything
- Red — write failing test(s); confirm they fail for the right reason
- Green — write the minimum implementation to make tests pass
- Refactor — clean up; confirm tests still pass
- Report — summarize what's covered and what's missing
Phase 1 — Understand
Read the code and tests nearest the feature before writing anything. Work out what behavior must exist, which layer it lives in (pure function, API/DB, hook, component, full flow), and which runner and command test that layer in this project. Follow the nearest existing tests' placement, naming, fixtures and assertion style, and reuse the project's test helpers (conftest.py fixtures, MSW handlers, render wrappers) instead of adding new infrastructure.
Phase 2 — Red (write failing tests)
Rules:
- Write tests before any implementation
- Tests must exercise behavior that does not exist yet — this is intentional
- Run tests; confirm the failure is caused by that absent behavior, not by a broken test
- If tests pass immediately, the feature already exists — stop and report that to the user
Write the tests in the appropriate location following the project's existing conventions for test file placement and naming.
After writing tests — run them and confirm RED:
Show the failure output. A correct red takes either shape:
- Something that does not exist yet — the name, the attribute, or the signature
you are calling has nothing behind it:
ImportError,ModuleNotFoundError,Cannot find module,AttributeError, aTypeErrornaming an argument the function does not accept yet, or aNotImplementedErrorraised by a stub. These are the common shapes, not a closed set: what makes a red correct is that the behavior is absent, not which exception carries the news. Adding a parameter to an existing function reds as aTypeError, and that is a legitimate red — not a broken test to be repaired. - New behavior on an API that already exists — a failing assertion: the call runs and returns the old answer. This is the usual red when extending existing code, and it is a valid red, not a broken test.
Either one means proceed to Phase 3. If it fails for any other reason (syntax error, wrong import path, fixture or setup error), fix the test first — the test must be correct before the implementation begins.
Phase 3 — Green (minimum implementation)
Write the minimum code to make the failing tests pass:
- No extra features, no future-proofing
- No refactoring of adjacent code
- Follow existing patterns in the same file/module (naming, error handling, async style)
After implementing — run tests and confirm GREEN:
All tests in the new file must pass. No previously passing tests may regress. Run the full test suite (or at minimum the affected layer) to confirm no regressions. When this loop runs inside a plan that sets its own rule for which tests to run while working, that rule wins.
If tests still fail, fix the implementation — do not modify the tests to make them pass.
Phase 4 — Refactor (optional)
If the implementation has obvious duplication, poor naming, or violates project conventions:
- Clean it up
- Run tests again to confirm they still pass
- Do not add new behavior during refactor
If nothing needs cleanup, skip this phase.
Phase 5 — Report
After tests are green, report what the new tests cover and what they leave out, which files they live in, the exact command that runs them, and which tests you ran to check for breakage and whether they passed.
Important constraints
- Do not skip running tests between phases — the red→green transition is the whole point
- Do not add
eslint-disable,# noqa, or test-specific conditionals in production code to make tests pass - Do not modify tests to make them pass — fix the implementation instead
- Use existing test utilities and fixtures — do not duplicate infrastructure that already exists
- Follow the project's
CLAUDE.md/AGENTS.mdconventions (whichever exists) throughout
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.

