test-driven-development
Skill0 starsChanged 4 months agoMITView on GitHub
Implements behavior through a verified red-green-refactor cycle. Use when adding a feature, fixing a reproducible bug, changing behavior, or explicitly working test-first; not for auditing existing test credibility or behavior-preserving cleanup alone.
190 other projects use a version of this.
Adopted by
Most recently taken up by
- Badhon-00/MDCPtheir own version, first seen Nov 16, 2026
- mastro993/fstacktheir own version, first seen Nov 16, 2026
- b-mendoza/agent-skillstheir own version, first seen Nov 16, 2026
- matt-riley/agent-skillstheir own version, first seen Nov 15, 2026
- pantheon-org/tekhnetheir own version, first seen Nov 15, 2026
- dvy1987/agent-loomtheir own version, first seen Nov 15, 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
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 19 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 39 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 47 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 15 projects that use this
- +3 more from Leodorareluctant259
- +3 more from LLl0k0laD
Other versions190 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 190
- obra/superpowers★ 314ksame name
- NousResearch/hermes-agent★ 264ksame name
- addyosmani/agent-skills★ 118ksame name
- cloudflare/computer★ 9.9ksame name
- jnMetaCode/superpowers-zh★ 8.5ksame name
- openai/plugins★ 7.8ksame name
- farm-fe/farm★ 5.6ksame name
- microsoft/FluidFramework★ 4.9ksame name
- mikeyobrien/ralph-orchestrator★ 3.2ksame name
- crbnos/carbon★ 2.8ksame name
180 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 repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-tool-interface-designSkill
- codebase-explorationSkill
- code-reviewSkill
- copilot-cloud-agentSkill
- documentation-maintenanceSkill
- external-skill-reviewSkill
- git-and-pr-workflowSkill
- parallel-worktree-deliverySkill
- planning-and-task-breakdownSkill
- refactoring-and-dead-code-removalSkill
- repository-agent-bootstrapSkill
- requirements-and-spec-writingSkill
- security-reviewSkill
- shadow-architectureSkill
- shadow-dreamSkill
- shadow-driftSkill
- shadow-observeSkill
- skill-creatorSkill
- systematic-debuggingSkill
- verification-before-completionSkill
- verification-disciplineSkill
- wayfinder-planningSkill
- web-research-and-verificationSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 180 edited versions we read keep these.
4
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
- Distinctive: line 21
Read applicable instructions, the target interface, and nearby tests.
- Distinctive: line 26
Red: write the smallest public-interface test for that behavior.
- Very specific: line 54
Avoid assertions that restate implementation or cannot realistically fail.
- Very specific: line 55
Do not test libraries/language features, trivial getters/constants/pass-through code, or private structure that should remain free to …
- Distinctive: line 57
Read test design when choosing levels, isolating nondeterminism, or assessing assertions/coverage needs deeper guidance.
- Distinctive: line 62
Stop if intended red or required green cannot be established.
“Common” is measured: kept by at least 6 in 10 of the 180 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
Contract
Inputs: agreed behavior/acceptance criteria, existing test conventions, and the repository runner. Write a behavior test and observe its expected failure before production implementation. An unobserved red step is not TDD evidence.
Workflow
- Read applicable instructions, the target interface, and nearby tests. Choose one small observable behavior. Use existing test files/tooling and the lowest level that proves it: unit for logic, integration for boundary collaboration, end-to-end only for critical flows. No automatic worker or broad repository exploration is needed for a known test/change site.
- Red: write the smallest public-interface test for that behavior. Run the focused case with the repository runner and inspect the failure. It must fail because behavior is missing, not because of syntax, imports, missing tools, or an unrelated failure. Resolve authorized setup/test defects and rerun; do not implement production behavior until the intended red is observed.
- Green: implement only what the test requires. Run the focused case, then affected surrounding tests, and inspect actual results. A failure means the cycle is not green; do not weaken the assertion to obtain a pass.
- Refactor: improve names, structure, or duplication without new behavior. Rerun affected tests after each structural edit. Additional behavior starts another red step. Repeat one behavior at a time.
- Inspect the diff and run final affected tests plus repository-required gates. Combine related selectors; do not rerun an unchanged full suite merely for narration or handoff. Preserve red/green evidence for each behavior and report unavailable validation rather than assuming it passes.
For a partial or uncertain write, read write recovery before retrying. Reconcile actual changes and rerun the affected cycle step; a write error is not observed behavioral red or green.
Test quality
- Assert observable outcomes, not internal calls unless the interaction is the contract. Use specific values and one clear behavior per test; cover relevant branches, boundary/empty inputs, and error cases.
- Seed/reset randomness, inject time, reset shared/global state, and await observable conditions with bounded timeouts instead of fixed sleeps.
- Avoid assertions that restate implementation or cannot realistically fail. Do not test libraries/language features, trivial getters/constants/pass-through code, or private structure that should remain free to change.
- Read test design when choosing levels, isolating nondeterminism, or assessing assertions/coverage needs deeper guidance.
Stop and output
Stop if intended red or required green cannot be established. Strict TDD may be skipped only for generated code, throwaway exploration, or configuration-only changes and only with repository-policy or user permission; state the exception and remaining validation. Never silently skip ordinary behavior tests.
Report behaviors specified, command/failure evidence for expected red, green results, final affected-test/gate results, and blockers. Do not claim a cycle completed when it failed for the wrong reason.
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.

