tdd
Skill1 starsChanged 6 months agoMITView on GitHub
Test-Driven Development workflow using vertical slices. Use when implementing features with TDD, writing tests before code, or doing red-green-refactor cycles.
194 other projects use a version of this, 30 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-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 · 30
- GreyDGL/PentestGPT★ 16k31% same
- sanity-io/sanity★ 6.4k31% same
- openstatusHQ/data-table-filters★ 2.3k31% same
- truffle-ai/dexto★ 65931% same
- amazingloft999-droid/mattpocock-skills★ 42230% same
- brianlovin/claude-config★ 37631% same
- ninehills/skills★ 28031% same
- InditexTech/weavejs★ 26630% same
- letehaha/moneymatter★ 22130% same
- heyongjun666/AICU-Graph★ 20031% same
20 more not listed
Wrote their own version · 164
- 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
- open-metadata/OpenMetadata★ 16ksame name
154 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 repository13 other files it gives its agents.
- agent-cliSkill
- askSkill
- blueprintSkill
- brainstormSkill
- carveSkill
- dispatchSkill
- handoffSkill
- improve-claude-mdSkill
- leanSkill
- llm-councilSkill
- orientSkill
- react-auditSkill
- shipSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 12 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
When invoked with a GitHub issue, fetch the issue body with gh issue view <number> and use it as the scope for the planning step.
- Very specific: line 18
If a plan exists in ./plans/ for the feature being implemented, read it for architectural decisions and phase context.
- Distinctive: line 28
Before writing any code:
- Distinctive: line 30
If a GitHub issue was provided, review its scope and acceptance criteria
- Very specific: line 31
If a plan file exists in ./plans/, review architectural decisions and phase boundaries
- Distinctive: line 37
Ask: "What should the public interface look like?
- Distinctive: line 39
State assumptions before RED: Before writing the first failing test, write down — in a comment in the test file, in the session notes, or …
- Distinctive: line 55
Write ONE test that confirms ONE thing about the system:
- Distinctive: line 77
After all tests pass:
- Distinctive: line 81
Run tests after each refactor step
- Distinctive: line 89
Every changed line must trace to the current test: If a line wasn't required to make the test pass (or to pass an earlier test), it doesn't …
- Distinctive: line 90
Don't "improve" adjacent code: If you spot dead code, an unrelated bug, or a style issue near the code you're editing, mention it in the PR …
- Distinctive: line 91
Don't remove pre-existing dead code unless asked: Only remove orphans your own changes created (unused imports, variables, helpers that …
- Distinctive: line 117
Test names describe behavior: "calculates total for multiple items", not "test calculateTotal"
- Distinctive: line 130
If you feel the need to mock an internal module, the code is doing too much or you're testing at the wrong level.
“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
Usage
/tdd — start TDD from scratch (manual planning)
/tdd #123 — start TDD from GitHub issue #123 (pulls scope + acceptance criteria)
/tdd #123 #124 — batch related issues into one TDD sessionWhen invoked with a GitHub issue, fetch the issue body with gh issue view <number> and use it as the scope for the planning step. The issue's acceptance criteria become the initial behavior list.
If a plan exists in ./plans/ for the feature being implemented, read it for architectural decisions and phase context. Plans are created by /carve and contain vertical slices, durable decisions, and dependency ordering that should inform your test strategy.
Philosophy
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.
Workflow
1. Plan
Before writing any code:
- If a GitHub issue was provided, review its scope and acceptance criteria
- If a plan file exists in
./plans/, review architectural decisions and phase boundaries - Confirm what interface changes are needed
- Confirm which behaviors to test (prioritize — you can't test everything)
- Identify opportunities for deep modules (small interface, deep implementation)
- Get user approval on the plan
Ask: "What should the public interface look like? Which behaviors are most important to test?"
State assumptions before RED. Before writing the first failing test, write down — in a comment in the test file, in the session notes, or in the PR description — the assumptions the test will encode:
- Input shape (types, ranges, required/optional fields)
- Output shape (types, error modes, side effects)
- Boundary conditions (empty input, max input, null/undefined, concurrent calls)
- What is intentionally NOT tested in this iteration
Silent assumptions become test design choices that are expensive to reverse later.
Stop and ask if an AC is ambiguous. If an acceptance criterion in the issue or plan admits more than one reasonable interpretation, do NOT pick silently. Pause, surface the options, and ask. The entire test suite hangs off your interpretation — a wrong guess at this stage cascades through every RED→GREEN cycle that follows.
Issue AC: "Returns user's recent orders." You: "Recent = last 30 days, last 10 orders, or whatever fits one screen? Each gives a different test design."
2. Tracer Bullet
Write ONE test that confirms ONE thing about the system:
RED: Write test for first behavior → test fails
GREEN: Write minimal code to pass → test passesThis proves the path works end-to-end.
3. Incremental Loop
For each remaining behavior:
RED: Write next test → fails
GREEN: Minimal code to pass → passesOne test at a time. Only enough code to pass the current test. Don't anticipate future tests.
4. Refactor
After all tests pass:
- Extract duplication
- Deepen modules (move complexity behind simple interfaces)
- Run tests after each refactor step
Never refactor while RED. Get to GREEN first.
Surgical Scope
Even while GREEN, keep changes surgical:
- Every changed line must trace to the current test. If a line wasn't required to make the test pass (or to pass an earlier test), it doesn't belong in this change.
- Don't "improve" adjacent code. If you spot dead code, an unrelated bug, or a style issue near the code you're editing, mention it in the PR description — don't fix it in this commit.
- Don't remove pre-existing dead code unless asked. Only remove orphans your own changes created (unused imports, variables, helpers that nothing references after your edit).
- Match existing style even if you'd write it differently. Stylistic refactors belong in their own PR.
The test: imagine reading the diff cold. Could every changed line be traced to "needed for test X"? If not, the surplus lines need to come out.
Anti-Pattern: Horizontal Slices
DO NOT write all tests first, then all implementation.
Tests written in bulk test imagined behavior, not actual behavior. You end up testing the shape of things rather than user-facing behavior. Tests become insensitive to real changes.
WRONG (horizontal):
RED: test1, test2, test3, test4, test5
GREEN: impl1, impl2, impl3, impl4, impl5
RIGHT (vertical):
RED→GREEN: test1→impl1
RED→GREEN: test2→impl2
RED→GREEN: test3→impl3Conventions
- Co-locate tests:
foo.test.tsnext tofoo.ts(not a parallel__tests__/tree) - Wrap in
describenamed after the unit under test - Test names describe behavior: "calculates total for multiple items", not "test calculateTotal"
- Coverage thresholds apply per file — simplify unreachable code rather than lowering thresholds
Mocking Rules
Mock only at system boundaries:
- External APIs, databases, time (
Date.now), randomness (Math.random), file system
Never mock things you control:
- Your own modules, internal collaborators, utility functions, data transformations
If you feel the need to mock an internal module, the code is doing too much or you're testing at the wrong level.
For patterns (dependency injection, SDK wrappers, examples of good vs bad mocks), see mocking.md.
Acceptance Checklist
[ ] Assumptions stated before the first RED (input/output/boundary)
[ ] AC interpretation confirmed with user (no silent picks on ambiguous ACs)
[ ] Test describes behavior, not implementation
[ ] Test uses the public interface
[ ] Test would survive an internal refactor
[ ] Mocks only at system boundaries
[ ] Co-located next to source file
[ ] Code is minimal for this test
[ ] No speculative features added
[ ] Every changed line traces to the current test (no adjacent improvements)
[ ] Pre-existing dead code left untouched (mentioned in PR description if noticed)
[ ] Coverage thresholds pass for the file under testDoes 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.

