tdd
Skill0 starsChanged yesterdayMITView on GitHub
Change behavior test-first in small vertical slices, design trustworthy test oracles, or diagnose flaky, slow, redundant, or weak tests. Not for restructuring that keeps behavior (refactor).
194 other projects use a version of this.
Adopted by
Most recently taken up by
- quickchatai/quickreviewtheir own version, first seen Nov 15, 2026
- yagizdo/quivertheir own version, first seen Nov 15, 2026
- HiteSit/real-scientist-skillstheir own version, first seen Nov 15, 2026
- alexj11324/Mikkatheir own version, first seen Nov 15, 2026
- QiYueran-source/waymarktheir own version, first seen Nov 15, 2026
- mdiri-ai/SoduWorktheir own version, first seen Nov 15, 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 repository34 other files it gives its agents.
- astroSkill
- bun-standardsSkill
- postgresSkill
- react-engineeringSkill
- rust-standardsSkill
- spring-bootSkill
- tailwind-v4Skill
- typescript-standardsSkill
- vitest-testingSkill
- api-designSkill
- architecture-reviewSkill
- benchmark-readiness-reviewSkill
- cli-designSkill
- codebase-scoutingSkill
- code-review-findingsSkill
- config-projection-reviewSkill
- documentation-hygieneSkill
- domain-modelingSkill
- formal-verificationSkill
- implementation-planningSkill
- orchestration-workflowSkill
- problem-clarificationSkill
- product-copySkill
- refactorSkill
- repository-text-hygieneSkill
- researchSkill
- security-scope-reviewSkill
- setup-canastaSkill
- system-designSkill
- task-closeoutSkill
- technical-writingSkill
- upstream-contributionSkill
- writing-issuesSkill
- writing-prSkill
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 16
Never edit, delete, skip, or weaken a test to make it pass.
- Distinctive: line 18
Do not special-case test inputs or detect the test environment in production code.
- Distinctive: line 20
Do not mock code you own. Mock only at real system boundaries (network, clock, third-party services), and keep the semantics the claim …
- Distinctive: line 25
Do not write all tests up front.
- Distinctive: line 46
Write one test for the smallest behavior that can fail and pass on its own.
- Distinctive: line 47
Run it and confirm it fails because the behavior is absent, not because of syntax, environment, fixtures, or an unrelated baseline failure.
- Distinctive: line 60
Use the narrowest layer that faithfully observes the behavior:
- Distinctive: line 70
Follow risks and oracles, not fixed pyramid ratios.
- Distinctive: line 84
Before adding a test, search the owning layer for one that covers the same behavior and strengthen it instead.
- Distinctive: line 90
Remove obsolete or implementation-coupled tests only with evidence that the behavior stays protected elsewhere.
- Distinctive: line 95
Use synthetic, portable values.
- Distinctive: line 97
Use isolated temporary resources, and restore clocks, environment, globals, working directory, mocks, files, and handles.
- Distinctive: line 107
Every test file added, changed, or deleted, with the reason for each.
- Distinctive: line 111
Do not claim that red-green-refactor itself proves correctness.
“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
Work in small behavior increments, each proven by a test that failed for the right reason first. Test-first order is a feedback discipline, not a quality guarantee; the evidence is in references/evidence.md.
Agent failure modes
Coding agents fail at TDD in known ways. These rules override convenience:
- Never edit, delete, skip, or weaken a test to make it pass. If a test looks wrong, stop and report why; changing it is the operator's decision.
- Do not special-case test inputs or detect the test environment in production code.
- Do not mock code you own. Mock only at real system boundaries (network, clock, third-party services), and keep the semantics the claim depends on.
- Give each assertion an independent oracle: a requirement, a known example, or a domain rule. A test that duplicates the implementation's calculation can preserve its mistakes instead of detecting them.
- Do not write all tests up front. Tests written before any implementation describe imagined behavior.
Before the first test
- Identify the observable behavior, its owning boundary, affected consumers, and the closest existing test owner.
- Choose the seam: the public interface where the behavior is observed without reaching inside. Test only through agreed seams; when the seam is unclear, ask before writing tests.
- Choose the oracle. A specification or regression oracle comes from a requirement, contract, issue reproduction, or domain invariant, never only from the current implementation. A characterization oracle records current behavior and counts as preservation evidence only.
- In unclear legacy code, add narrow characterization tests first, then the intended failing test.
Vertical slices
Repeat for each increment, one test at a time:
- Write one test for the smallest behavior that can fail and pass on its own.
- Run it and confirm it fails because the behavior is absent, not because of syntax, environment, fixtures, or an unrelated baseline failure.
- Implement only enough to pass it, preserving repository invariants.
- Rerun it and read the result, not just the exit code.
- Refactor only while behavior stays the same, rerunning the tests that cover the affected code and its callers.
Then run the owning suite and affected downstream suites; widen to the full gate when risk, integration, or repository rules require it. If a failing test is impractical, say why and use the closest independent executable check.
Choose the layer by risk
Use the narrowest layer that faithfully observes the behavior:
- Pure or domain tests for calculations, decisions, state transitions, invariants.
- Integration tests for real wiring, persistence, protocols, configuration, and dependency behavior invisible below the boundary.
- Contract tests for agreed consumer and provider shape and semantics.
- End-to-end tests for a few critical journeys lower layers cannot prove.
- Runtime-specific probes when the runtime, browser, OS, or packaging changes behavior.
Follow risks and oracles, not fixed pyramid ratios. To prove a change in the running product, follow references/end-to-end-verification.md.
Hard bugs
For a reported failure, reproduce it before fixing it. When the cause is not obvious, follow references/diagnosing-bugs.md: build a command that goes red on this exact symptom, minimise it, test falsifiable hypotheses, and turn the minimal repro into the regression test. Set a budget for the investigation and report what was tried when it runs out; a trivial bug needs no ranked hypothesis list.
Keep tests valuable
- Before adding a test, search the owning layer for one that covers the same behavior and strengthen it instead.
- A new test must protect a distinct behavior, regression, boundary, or failure mode, and fail with an actionable message.
- Coverage finds unexercised code; targeted mutation on changed, high-risk code checks assertion sensitivity. Neither percentage is a goal or proof.
- Remove obsolete or implementation-coupled tests only with evidence that the behavior stays protected elsewhere.
Determinism and fixtures
- Use synthetic, portable values. Never put operator paths, credentials, tokens, or raw incident payloads in tests.
- Use isolated temporary resources, and restore clocks, environment, globals, working directory, mocks, files, and handles.
- Replace sleeps with a deterministic clock or event.
- A retry that passes is evidence of nondeterminism, not verification. Fix the cause, or quarantine with an owner, reason, and removal condition.
Completion report
- Behavior covered, oracle source, layers, and the focused and broader gates run with their results.
- Every test file added, changed, or deleted, with the reason for each. A change to an existing assertion must name the requirement that justifies it.
- Residual untested risk.
Do not claim that red-green-refactor itself proves correctness.
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.

