test-driven-development
Skill1 starsChanged 13 days agoMITView on GitHub
Use when implementing any feature, bugfix, refactor or behavior change, before writing the implementation code
191 other projects use a version of this.
Adopted by
Most recently taken up by
- Blandskron/agents-first-repo-docstheir own version, first seen Nov 29, 2026
- ctaxnagomi/agent-kd-skilltheir own version, first seen Nov 29, 2026
- aakash1552005/universal-agent-skillstheir own version, first seen Nov 29, 2026
- karanmrn/karanagentskillstheir own version, first seen Nov 29, 2026
- karanmrn/kstacktheir own version, first seen Nov 29, 2026
- Dannykkh/skill-olympustheir own version, first seen Nov 29, 2026
Used with
Projects with it also use chinese-code-review, chinese-commit-conventions 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.
Leodorareluctant259Skillchinese-code-review
中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈
Also in 8 projects that use this
Leodorareluctant259Skillchinese-commit-conventions
中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化
Also in 8 projects that use this
steven123397Skillaccessibility-engineering
Audits existing interfaces for WCAG 2.2 AA conformance and remediates the violations found. Use when auditing a page or component for accessibility, running axe-core or pa11y, triaging a11y violations, or checking screen reader and contrast issues before shipping.
Also in 4 projects that use this
LLl0k0laDSkillusing-agent-skills
Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.
Also in 46 projects that use this
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 21 projects that use this
LLl0k0laDSkillgit-workflow-and-versioning
Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.
Also in 54 projects that use this
- +3 more from Leodorareluctant259
- +2 more from LLl0k0laD
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 191
- obra/superpowers★ 314ksame name
- NousResearch/hermes-agent★ 267ksame name
- addyosmani/agent-skills★ 121ksame name
- cloudflare/computer★ 10ksame name
- mdiri-ai/SoduWork★ 9.1ksame name
- jnMetaCode/superpowers-zh★ 8.6ksame name
- openai/plugins★ 8.4ksame name
- farm-fe/farm★ 5.6ksame name
- microsoft/FluidFramework★ 5ksame name
- mikeyobrien/ralph-orchestrator★ 3.2ksame name
181 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 repository36 other files it gives its agents.
- skills/writing-skills/references/agents.mdAGENTS.md
- templates/CLAUDE.mdCLAUDE.md
- backend-servicesSkill
- brainstormingSkill
- changing-legacy-codeSkill
- choosing-a-stackSkill
- ci-quality-gatesSkill
- database-changesSkill
- desktop-developmentSkill
- dispatching-parallel-agentsSkill
- docsSkill
- executing-plansSkill
- finishSkill
- git-workflowSkill
- implementSkill
- kit-initSkill
- mobile-developmentSkill
- new-taskSkill
- observabilitySkill
- onboarding-existing-codebaseSkill
- payments-and-moneySkill
- pos-systemsSkill
- publishing-documentsSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- security-reviewSkill
- systematic-debuggingSkill
- ui-motionSkill
- updating-dependenciesSkill
- using-skillsSkill
- verification-before-completionSkill
- verifySkill
- web-frontendSkill
- writing-documentationSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 182 edited versions we read keep these.
3
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 13
If you didn't watch the test fail, you don't know that it tests the right thing.
- Distinctive: line 20
Verify RED. Mandatory: Run it. It must *fail* (not error) with the expected message, *because the feature is missing*.
- Distinctive: line 23
GREEN: Write the simplest code that passes.
“Common” is measured: kept by at least 6 in 10 of the 182 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
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRSTIf you didn't watch the test fail, you don't know that it tests the right thing. Following the letter of this rule is the spirit of it.
Exceptions only with the user's explicit agreement: throwaway spikes, generated code, pure configuration. Legacy code without tests is not an exception. Use changing-legacy-code and pin current behavior first.
The cycle
- RED. Write one minimal test for one behavior. Give it a clear name, use real code, and mock only true boundaries (network, clock, hardware, payment provider). Take the expected values from the spec or criterion, never from running the code. Before you write it, name the production change that would make it fail.
- Verify RED. Mandatory. Run it. It must fail (not error) with the expected message, because the feature is missing.
- Passes immediately? You're testing existing behavior. Fix the test. (A characterization test that pins legacy behavior passes by design; see changing-legacy-code.)
- Errors? Fix the error and re-run until it fails for the right reason. A missing module or an undefined symbol is an error, not RED: add a stub that returns a wrong value, then re-run.
- GREEN. Write the simplest code that passes. No extra options, no speculative generality, no drive-by refactors.
- Verify GREEN. Mandatory. Run the test, then the project's full test command. The output must be clean: no new warnings or errors. If another test fails, fix it now or report it by name. A red test you saw scroll past and didn't mention falsifies your report.
- REFACTOR, only while green: remove duplication, improve names. Re-run. Add no behavior.
Code written before its test is deleted and rewritten from the test. Don't keep it as a "reference": you'll adapt it, which is testing after.
Tests stay honest
- Never weaken a test to get green. That includes editing an assertion to match output, deleting a test, adding
.skip/.only/xit, loosening a tolerance, or catching the error in the test. What may change, and with whose agreement, is inreferences/test-standard.md("Changing tests"). - Assert on behavior the user can observe, not on mock calls or private internals.
- Bug fix: first a test that reproduces the bug (RED), then the fix. The test stays as a regression guard.
- Regression proof: a test is trustworthy once you've seen it fail with the fix reverted and pass with it restored.
Choosing the level
Before the first test of a task, read references/test-standard.md. It is the single source of the test rules: expected values, which tests are worth writing, names, doubles, determinism, retries, flakes, which level verifies which criterion, coverage and changing tests. Follow the project's existing test stack and layout.
With BDD scenarios: outside-in. For a user-visible criterion, write its scenario first (references/bdd.md) and run it: it must fail on the step that needs the missing behavior (the outer RED). Then drive the code with the cycle above, one unit test at a time (the inner loops); each unit test checks its unit's own contract and stays (test-standard, "Criteria and levels"). The criterion is done when its scenario passes. Don't write scenarios for criteria you aren't working on yet.
Red flags: stop and start over
| Thought | Reality |
| "Too simple to test" | Simple code breaks. The test takes a minute. |
| "I'll add tests after" | Tests written after pass immediately, which proves nothing. |
| "I tested it manually" | Manual testing can't be re-run and covers no edge cases. It replaces a test only where automation is impossible, and only with the user's agreement. |
| "Deleting this work is wasteful" | That's sunk cost. Keeping untrusted code is the real waste. |
| "Hard to test" | Then it's hard to use. Simplify the interface or inject the dependency. |
| "Just this once" | That's how every skipped test starts. |
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.

