tdd
Skill5 starsChanged 10 days agoMITView on GitHub
The red → green loop for any stack: seams, what a good test is, and the anti-patterns to refuse. Use when building features test-first or when another skill needs the loop.
194 other projects use a version of this, 56 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 · 56
- mattpocock/skills★ 309k18% same
- QuivrHQ/quivr★ 40k11% same
- The-Vibe-Company/quivr★ 40k11% same
- MODSetter/SurfSense★ 17k18% same
- formbricks/formbricks★ 13k18% same
- ArcReel/ArcReel★ 6.3k18% same
- withcoral/coral★ 4.9k18% same
- bestofjs/bestofjs★ 3.1k19% same
- crbnos/carbon★ 2.8k18% same
- The-Vibe-Company/claude-code-controller★ 2.4k11% same
46 more not listed
Wrote their own version · 138
- 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
128 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 repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architecture-satisfactionSkill
- autopilotSkill
- browser-testSkill
- chatter-scoutSkill
- closeoutSkill
- codebase-designSkill
- code-reviewSkill
- code-smells-auditSkill
- commitSkill
- dependency-auditSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- fix-ci-failuresSkill
- fix-github-issuesSkill
- fix-nightwatch-issuesSkill
- fix-posthog-issuesSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- harness-toolsSkill
- housekeeperSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- laravel-herd-worktreesSkill
- panelSkill
- prototypeSkill
- prSkill
- prune-testsSkill
- releaseSkill
- repository-cleanupSkill
- researchSkill
- resolve-review-commentsSkill
- resolving-merge-conflictsSkill
- retroSkill
- run-afterSkill
- scratch-cleanupSkill
- scratch-statusSkill
- setupSkill
- sweepSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- triage-github-prSkill
- triageSkill
- ui-designSkill
- upgrade-planSkill
- verifySkill
- wait-whatSkill
- wayfinderSkill
- which-skillSkill
- wizardSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read GLOSSARY.md (or the older CONTEXT.md) if it exists so test names and interface vocabulary match the project's domain language, and …
- Very specific: line 12
Before writing or reviewing tests, read references/testing-best-practices.md and apply its value gate and rejection rules throughout the …
- Distinctive: line 22
Red before green: Write the failing test first, watch it fail for the right reason (a missing route 404s, not a typo'd import), then write …
- Distinctive: line 39
When a change has no test, say which kind it is and what proved it, in the reply, commit, or PR.
- Distinctive: line 50
Background job / event handler: run its handler, or dispatch it with real execution, asserting side effects.
“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
The red → green loop, for whatever test framework the project already uses. Consult before and during the loop, not after.
Read GLOSSARY.md (or the older 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.
Before writing or reviewing tests, read
references/testing-best-practices.md
and apply its value gate and rejection rules throughout the loop.
Stack references. Identify the stack from its manifests (composer.json, package.json, pyproject.toml, go.mod, Cargo.toml, Gemfile). If a matching file exists below, read it before the first cycle: it maps the seams and rules here onto that stack's test tooling. Otherwise apply the rules through the suite's existing conventions.
- Laravel (
laravel/frameworkincomposer.json):references/laravel.md
Rules of the loop
- Red before green. Write the failing test first, watch it fail for the right reason (a missing route 404s, not a typo'd import), then write only enough code to pass. No speculative features.
- One slice at a time. One seam, one test, one minimal implementation per cycle. Each next test responds to what the last cycle taught you: never all tests up front, then all implementation (bulk tests verify imagined behavior and go insensitive to real changes).
- Refactoring is not part of the loop. It belongs to the review step (
code-review).
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 cannot view another users invoice says exactly what rule exists) and survives refactors because it doesn't care about internal structure.
What needs a test, and what proves the rest
Other skills point here instead of restating it. A change gets the proof that fits its kind:
- Behavior (logic, validation, authorization, persisted data, side effects, a reproduced bug): a test that fails without the change and passes with it.
- Presentation (CSS classes, colors, spacing, copy, layout, markup, element order): no test. A test here only restates the diff: it fails on a harmless restyle and still passes when the real problem returns (a contrast fix "passes" after the background changes). Never assert on class names or regex-scrape rendered HTML for them. Prove it with the
verifyskill instead: open the page and look, with a screenshot, and run an accessibility checker (axe, Lighthouse) for a contrast or accessibility claim. - Performance: a measured before and after (query count, timing), not a test of the internals.
- Config or infra that cannot run locally: say so plainly; do not write a test that mocks it.
When a change has no test, say which kind it is and what proved it, in the reply, commit, or PR.
Seams: where tests go
A seam is the public boundary you test at (codebase-design holds the full deep-module vocabulary). Test at the chosen seams: the caller (to-spec or implement) picks them from the ranking below and states the choice rather than asking, one line per seam naming what it catches and what it misses; test at the highest seam that can observe the behavior, prefer a seam the codebase already has over cutting a new one, and use as few as possible, one is the target. Ask only on a genuine fork the rules rank equally.
Highest first:
- Transport boundary: send the request an outside caller would (HTTP, RPC, GraphQL) through the app's real routing, as an authenticated user where it matters, and assert the response plus the persisted state. Default for anything with an endpoint.
- UI component: the framework's component test harness, when behavior lives in the component itself.
- CLI command: invoke it, assert the exit code plus its side effects.
- Background job / event handler: run its handler, or dispatch it with real execution, asserting side effects.
- Domain service / action: a direct test at its public API, for logic shared by several entry points.
- Model / data type: non-trivial queries, conversions, and derived values only.
Rules for any stack
- Database: reuse the isolation the suite already has (transactions rolled back per test, a database rebuilt per run, a fresh container), don't introduce a second convention. Never point tests at a real environment's database.
- Test data: build it through the suite's factories or builders; encode meaningful variants as named states (an "overdue" invoice), not inline attribute soup repeated across tests.
- Side effects via fakes: replace queues, mail, notifications, storage, and outbound HTTP with the framework's fakes or a faithful in-memory adapter, then assert the effect (a message queued to this address), not the internal call path. Fake the boundary, never mock your own classes' internals.
- Time: freeze or move the clock through the framework's time helpers or an injected clock for anything date-dependent; never sleep.
- Authorization is behavior: for every "user can X" test, write the "user cannot X on someone else's record" test, record-level scoping is the most error-prone rule in a multi-tenant app.
- Fast loops: run only the focused test, or the impacted set when the runner supports it, each cycle; run the suite in parallel when it supports that. When the runner has a watch mode, run it on the focused test under
Monitorwhere available, so each save reports red or green; otherwise rerun the focused test each cycle. A user message to stop the tests ends test commands for the rest of the run: the last focused result stands, and the code change they asked for continues. Tests must be order-independent and not share database state, which the isolation and test-data rules above already guarantee. CI still runs the full suite.
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.

