tdd
Skill23 starsChanged 8 days agoApache-2.0View on GitHub
Use when about to write code and its tests for a feature or bugfix and no failing test exists yet: routine test authoring, red-green-refactor. Pruning existing tests -> test-audit. Layers -> layered-testing-executor.
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
1
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 41
Put each candidate case through this gate as you write it.
“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, not test-count development
Before writing a test
The story's own acceptance test, not the unit suite, says it is finished, and a test earns its place only by proving something nothing else already proves. Start from that acceptance test (testing-e2e-playwright when it is a browser journey). This skill owns writing the routine test; test-audit owns pruning the ones already in the suite.
Put each candidate case through this gate as you write it. A missing answer means the case is not written yet.
- Contract. Which observable behavior, invariant or independent contract does it protect?
- Regression. Which credible change to the code makes it fail?
- Owner. Why does existing coverage not already catch that? A contract has one primary owner, at the strongest boundary that can see it. A second layer needs its own risk that the owner cannot reach, such as a transport or lifecycle failure. Extend a table or shared fixture instead of adding a near-copy.
- Seam. Does it need production code (an export, flag, wrapper or injection hook) that no production caller needs? If so, test at the real boundary instead.
A case that matches a pattern in test-audit's junk patterns also fails the gate, unless it guards a contract on its own. Load test-audit for that list when a case's value or overlap is uncertain, not once per assertion. A case that breaks under a refactor that preserves behavior asserts implementation: rewrite it at the owning boundary.
Add or extend a focused case for the next meaningful distinction that survives the gate, owned by the existing test that most naturally covers it. The test must exercise production code with an expected result derived from a requirement, worked example, independent oracle or valid invariant—not by copying the same production calculation into the assertion. See good and bad tests when unsure whether a candidate test is well-formed.
Observe RED for the intended behavior. A missing runtime, unrelated import error or no tests collected is a setup problem, not useful RED. For a known bug, demonstrate the regression with the smallest representative input where feasible: the test must fail on the pre-fix code, for the reason the bug exists, and pass after the fix. One that never failed proves the mock, not the fix. When the pre-fix failure cannot be reproduced (the old environment is gone, or the failure is nondeterministic), say so as a weaker-evidence limit instead of claiming a red that was never observed. One regression at the owner boundary covers the bug; do not replay it at every layer it crosses.
Implement the simplest change that satisfies the case and existing contracts. Test doubles are useful at the boundary outside the assertion's scope; do not mock away the persistence, authorization or transport behavior you claim to test. See when to mock when the boundary is unclear. Do not unit-test framework primitives or private helpers.
Refactor while green when a local change improves clarity or reduces current coupling. See refactor candidates for concrete signals once tests are green. Keep structural moves distinguishable from changed behavior; no mandatory new architecture or reviewer for each rename.
Naming the exception
Add a case only for a distinct rule, boundary, failure or historical escape; a parameterized table may express several at once. An internal name, copied constant, getter, enum value, dataclass default, source-text match or mock echo is never a consumer contract on its own. A test written after the code that only restates it is a change detector: delete it or rewrite it against behavior — to retire a test already in the suite, use test-audit.
A spike may use test-during exploration, with the production contract verified before merge; it is not permission to postpone all testing. Stop when accepted behavior and material risks are covered, not when every imagined input has an example.
See useful test examples when deciding between a behavioral assertion and an implementation mirror.
For choosing which layers a finished change must run, use layered-testing-executor; when the failure's cause is still unknown, use diagnosing-bugs; when the code to change has no trusted tests, use legacy-code-change.
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- mattpocock/skills★ 309ksame name
- Yeachan-Heo/oh-my-claude-sisyphus★ 40ksame name
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- QuivrHQ/quivr★ 40ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- MODSetter/SurfSense★ 17ksame name
- GreyDGL/PentestGPT★ 16ksame name
- open-metadata/OpenMetadata★ 16ksame name
- prowler-cloud/prowler★ 15ksame name
183 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.
Used alongsideProjects with it also use ketchup-video, principle-laziness-protocol 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.
3metaJunSkillketchup-video
Catch the user up like /ketchup, with a short subtitled video of slides for what happened and the waiting calls as text under it. Use for /ketchup-video.
Also in 10 projects that use this
jaydubya818Skillprinciple-laziness-protocol
Apply when a refactor is adding wrappers or abstractions instead of simplifying.
Also in 43 projects that use this
jaydubya818Skillprinciple-make-operations-idempotent
Apply when an operation must tolerate retries after partial completion.
Also in 43 projects that use this
bnemaSkillsetup-pstack
Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.
Also in 25 projects that use this
- +8 more from jaydubya818
In this repository21 other files it gives its agents.
- claude-code-orchestratorSkill
- codebase-designSkill
- code-reviewSkill
- codex-subagent-routingSkill
- diagnosing-bugsSkill
- docker-composeSkill
- exhaustive-repo-cleanup-auditSkill
- gemini-cli-orchestratorSkill
- grok-build-orchestratorSkill
- kill-slopSkill
- kimi-cli-orchestratorSkill
- layered-testing-executorSkill
- legacy-code-changeSkill
- pragmatic-engineeringSkill
- refactoring-catalogSkill
- security-reviewSkill
- test-auditSkill
- testing-e2e-playwrightSkill
- windows-shell-interopSkill
- worktree-lifecycleSkill
- xp-agile-deliverySkill
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.

