tdd-workflow
Skill0 starsChanged 46 days agoMITView on GitHub
Writing code test-first: RED->GREEN->REFACTOR, golden vs property tests, making untestable code testable, where to spend coverage. Used by /tdd and test-engineer.
135 other projects use a version of this.
Adopted by
Most recently taken up by
- bryanus1/agent-skillstheir own version, first seen Nov 16, 2026
- AtilaMedeiros/skillstheir own version, first seen Nov 16, 2026
- Badhon-00/MDCPtheir own version, first seen Nov 16, 2026
- Red-Hat-AI-Innovation-Team/claude-skillstheir own version, first seen Nov 16, 2026
- Ivan-propio/claude-skillstheir own version, first seen Nov 16, 2026
- AndresArreguy/ecc-pi-porttheir own version, first seen Nov 16, 2026
Used with
Projects with it also use brand-discovery, configure-ecc 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.
ysyecustSkillbrand-discovery
Use when a brand needs to discover or articulate its identity through structured multi-session interviews. Covers purpose, positioning, audience, personality, voice, narrative, and founder-brand tension across 8 modules using laddering, 5 Whys, and projective techniques. Produces a resumable session with disk-persisted state and a master brandbook (90_SYNTHESIS.md).
Also in 6 projects that use this
royaluniondesign-sysSkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
junimnjwSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 12 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 10 projects that use this
royaluniondesign-sysSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 16 projects that use this
RojiosSkilldart-flutter-patterns
Production-ready Dart and Flutter patterns covering null safety, immutable state, async composition, widget architecture, popular state management frameworks (BLoC, Riverpod, Provider), GoRouter navigation, Dio networking, Freezed code generation, and clean architecture.
Also in 7 projects that use this
Other versions135 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 135
- affaan-m/ECC★ 246ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- loulanyue/awesome-claude-notes★ 272same name
- ab604/claude-code-r-skills★ 202same name
- cloudnative-co/claude-code-starter-kit★ 153same name
- xenitV1/Antigravity-Workflows★ 130same name
- cohen-liel/hivemind★ 108same name
- travisjneuman/.claude★ 106same name
125 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 repository29 other files it gives its agents.
- hosts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adrSkill
- api-designSkill
- auditSkill
- code-reviewSkill
- concurrency-performanceSkill
- coverageSkill
- debuggingSkill
- debugSkill
- fast-laneSkill
- fixSkill
- implementSkill
- intakeSkill
- leanSkill
- migration-safetySkill
- nonnaSkill
- observabilitySkill
- planSkill
- refactoringSkill
- releaseSkill
- reviewSkill
- rollbackSkill
- security-reviewSkill
- shipSkill
- supply-chainSkill
- syncSkill
- tddSkill
- testSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 124 edited versions we read keep these.
2
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 20
Never write production logic that no failing test demanded.
- Very specific: line 60
Inject the clock: Never call now() inside logic.
- Distinctive: line 63
Isolate I/O at the edges: Keep the core pure (data in → data out).
“Common” is measured: kept by at least 6 in 10 of the 124 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
The test is the specification. You write it first because a test written after the code only proves the code does what it does — not what it should. The LLM proposes; the test decides.
The Cycle: RED → GREEN → REFACTOR
| Phase | Goal | Rule |
| RED | Write one failing test that pins the next increment of behavior | Run it. Watch it fail. Confirm it fails for the stated reason, not a typo or import error. |
| GREEN | Write the minimum code to pass | No extra abstraction, no speculative cases. Fastest honest path to green. |
| REFACTOR | Improve structure with tests green | Behavior unchanged; tests unchanged. See refactoring. |
One behavior per cycle. If a test needs three new code paths to pass, it is too big — split it. Never write production logic that no failing test demanded.
What makes a good failing test
- Fails for the right reason. A test that errors on setup is not RED — it is broken. The assertion, not the scaffolding, must be what fails.
- Pins behavior, not implementation. Assert on observable outputs and contracts. Tests coupled to private internals break on every refactor and rot.
- Minimal and named for intent. One logical assertion. The test name states the rule:
rejects_withdrawal_exceeding_balance, nottest_withdraw_2. - Deterministic. Same inputs, same result, every run. Seed RNG, inject the clock, no network.
Golden vs property — use both on the critical surface
Golden tests assert against a hand-verifiable known answer, cross-checked against a trusted library where one exists. They catch wrong. Use for math, encoders, money, any pure transform with a knowable output. Pin the exact value (with a float tolerance) and state where the oracle came from — a golden test against a guessed oracle is worthless.
Property tests assert a rule that holds for all valid inputs and let the framework hunt counterexamples. They catch the case you didn't think of. The high-value invariant families:
- Round-trip:
decode(encode(x)) == x - Idempotence:
f(f(x)) == f(x)(normalizers, retries, upserts) - Bounds / conservation: output stays within declared limits; nothing is lost or duplicated
- Order-independence: result invariant to input ordering (sums, set operations)
Survival-critical code (money, auth, data integrity, persistence, anything irreversible) demands both, before merge.
Copy-ready skeletons — golden + property tests for three stacks live in
templates/: python_pytest_hypothesis.py,
typescript_vitest_fastcheck.test.ts,
go_testing_quick_test.go. Longer worked examples with oracle
provenance: references/worked-examples.md.
Make the untestable testable
Untestable code is a design smell, not a reason to skip the test.
- Inject the clock. Never call
now()inside logic; pass a time value or a clock. Then "expires after 30 days" is a pure assertion. - Inject the RNG/seed. Randomness in a decision path takes an explicit seed, never the global.
- Isolate I/O at the edges. Keep the core pure (data in → data out); push network, disk, and clock to a thin shell. You test the core directly and mock only the shell.
Where to spend coverage
Coverage is a budget — aim it at the survival-critical surface: money, auth, data integrity, persistence, and anything irreversible. There, demand golden + property tests and high branch coverage. Glue and display code aim high but are not the gate. Coverage percent is a floor, never a goal — 100% over vacuous asserts proves nothing.
Anti-patterns
- Test written after — it documents behavior instead of specifying it; you lose the RED signal.
- Vacuous / self-referential asserts —
assert result == result, asserting a mock was called with what you just told it. Reassert nothing. - Mock everything — a test where every collaborator is faked tests the mocks. Mock the edge; exercise the real core.
- Flaky tests — time, ordering, or network leaking in. Quarantine and fix; a flaky test trains the team to ignore red. A red suite is a stop, not a footnote.
See .claude/rules/testing.md for the coverage gate and marker policy; route work through the
test-engineer agent and /test.
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.

