In short.
This is a text-only instruction skill that tells an AI coding agent to practise strict test-driven development. It is written for developers who work with coding agents. The main catch is that its wording is absolute, including a rule to delete any code written before its test, and the files give no evidence of which agents work with it or how well it works, so its real behaviour is unknown. The skill requires a failing test before any production code, a Red-Green-Refactor loop with mandatory steps to run the test and watch the result, and a full project test run before work is called done. A companion file adds rules: each test should name the break it catches, use expected values worked out by hand and avoid asserting on mocks, and a test file should finish with a mental mutation check. Both files come from the same repository commit, which has an MIT licence at its root.
Researched and written by an AI model and checked by a second AI model. How it works
The scope is the test-driven-development folder of the obra/superpowers repository at revision 22f0b463e7a5e579904dd6211a520321035526f7. It covers SKILL.md and writing-good-tests.md, plus the repository's root MIT LICENSE as the related notice. Excluded: linked pages, other skills (including superpowers:writing-skills), the repository README, installers and all other folders. The sample outputs shown in the skill are illustrations. The following remain unknown: how agents behave with the skill, the skill's effectiveness, which agents it works with, how to install it, and costs beyond the licence.
The overview
What this resource is
The resource is the test-driven-development skill folder in the obra/superpowers repository at [https://github.com/obra/superpowers/tree/main/skills/test-driven-development]. This description covers revision 22f0b463e7a5e579904dd6211a520321035526f7, which may differ from what the main branch contains today. The folder holds two Markdown files: SKILL.md (9578 bytes) and writing-good-tests.md (8268 bytes). The repository's root MIT licence, copyright 2025 Jesse Vincent, is present at the same revision.
SKILL.md opens with frontmatter giving the name test-driven-development and the description 'Use when implementing any feature or bugfix, before writing implementation code'. This description appears to be the text an agent would match against to decide when to use the skill. The skill contains no scripts or programs. It is made up of prose, tables, a Graphviz diagram of the cycle, and short TypeScript and shell snippets used as illustrations.
The text is addressed to an AI agent. It often refers to 'your human partner', for example 'ask your human partner' about exceptions. This assumes the agent is working with a person who can give permission.
Overall assessment
Judged on its text, this is a focused and unusually detailed discipline guide. It does more than say 'do TDD'. It describes what a good first failing test looks like, what to check while watching it fail, how much code to write to make it pass, and what to verify before calling the work complete. The companion file goes beyond the TDD loop and covers a failure mode described in the companion guide: tests that pass no matter what the code does.
Its strengths are its specificity and its concrete good and bad examples. One example is a retry test that checks real behaviour, set against one that only checks that a mock was called. Its main weaknesses are the absolute, forceful style of the rules and the lack of anything in the files showing how well agents follow it or whether it improves results. The evidence includes no benchmarks, usage reports or test results, so its effectiveness is not established.
Treat it as a strong, opinionated starting point for agent behaviour. Read it in full and expect to adjust it; it is not a proven drop-in.
Who it is for
The main audience is developers who use an AI coding agent for feature work and bug fixes. They want the agent to write tests first, rather than writing code and then adding tests that only confirm it. The skill says it applies to new features, bug fixes, refactoring and behaviour changes.
People who do not use an agent can still read the companion guide. Its advice applies to any developer writing automated tests: work out expected values by hand, avoid assertions on mocks and run a mutation check. A beginner can follow the Red-Green-Refactor explanation and the empty-email bug-fix example. An experienced developer will mostly value the rules on choosing what to mock and on avoiding change-detector tests.
It fits less well in three cases: teams that do not want a strict test-first rule, work the skill itself lists as exceptions (throwaway prototypes, generated code and configuration files), and anyone who needs help setting up a particular framework, which the files do not give.
What it tells an agent to do
SKILL.md sets one central rule, which it calls the Iron Law: no production code without a failing test first. If code was written before the test, the agent must delete it and start again. It must not keep the code as a reference or adapt it.
It then sets out a Red-Green-Refactor cycle. RED: write one minimal test for one behaviour, with a clear name, using real code rather than mocks unless a mock is unavoidable. Verify RED is marked mandatory: run the test and confirm that it fails rather than errors, and that it fails for the expected reason, because the feature is missing and not because of a typo. GREEN: write the simplest code that passes, with no extra options or features. Verify GREEN: confirm that the test passes, that other tests still pass and that the output is clean. REFACTOR: only once the tests pass, remove duplication, improve names and extract helpers without adding behaviour.
The skill adds a stricter rule for finishing work. The agent must run the project's own full test command, for example bare pytest, npm test or cargo test, even if the task named only one test file. It must report by name any failure that run shows, including failures it did not cause. The skill also includes a table of common excuses with rebuttals, a list of red flags that mean 'delete code, start over', a verification checklist and a 'when stuck' table. It says every bug fix should start with a failing test that reproduces the bug.
writing-good-tests.md adds two principles. The first is that every test names the break it catches. Before writing the test body, name the production change that would make it fail. Work out expected values by hand, using literals or hand-checked fixtures rather than the code under test. Avoid change detectors, which fail only when someone makes an intentional decision. Test behaviour rather than the text of scripts or config. The second principle is that tests exercise the real thing. Do not assert on mocks. Mock only slow or external operations. Make test doubles specific. Mirror complete real data structures in mocks. Keep helpers used only by tests out of production classes. The file ends with a mutation check, a quick-reference table and a list of warning signs.
Using it
What you need to use it
The files imply the following needs. You have to give SKILL.md and its companion reference, writing-good-tests.md, to your AI coding agent. Because the instructions tell the agent to run tests and the full project suite, the agent must be able to run your test commands. You need a project that has an automated test runner, or one you are willing to add. You also need a person who can approve exceptions, because the text says no exceptions are allowed without the human partner's permission.
The files do not say how an agent discovers or loads the skill, what loading requirements apply, or which agent products or versions support it, so all of this is unknown. The reference to 'superpowers:writing-skills' suggests the skill belongs to a named collection. That other skill, and any installer or plugin mechanism, are not part of these files. Language and framework requirements are not stated. The snippets use TypeScript with Jest-style and Vitest-style APIs and npm, and the text also mentions pytest and cargo test.
How it works
The skill works only as written instructions placed in the agent's context. It has no code to run, no configuration schema beyond the frontmatter, and no tooling of its own. Any enforcement depends on the agent reading and following the text.
The text appears designed to stop an agent from talking itself out of the process. It pairs a hard rule with a table of excuses ('I'll test after', 'Already manually tested', 'Deleting X hours is wasteful') and a list of red flags. That intent is read from the wording; the files do not state it. How closely an agent follows these instructions depends on the agent and model, and is unknown.
SKILL.md tells the agent to read writing-good-tests.md 'when writing or changing any test'. The evidence does not show how a host loads either file, including whether the companion file is loaded automatically or only when the agent opens it, so loading behaviour is unknown. The companion file also includes 'gate functions': short step-by-step checks to apply before writing a test body or adding a mock.
Setup
The files give no installation steps. They do not say where to put the folder or how to register or enable it with a particular agent. SKILL.md links to the companion file by a relative path, so at minimum the two files should stay together in the same folder for that link to work. Anything more, such as installing a plugin or configuring a particular tool, is unknown from these files. That information would have to come from the repository's other documentation, which is not part of this skill folder.
The instructions tell the agent to run your project's test command, so the tests must be runnable from the agent's environment before the skill is useful. The text does not explain how to set up a test framework from scratch.
Worked example from the skill
The skill's own bug-fix example shows the intended loop clearly. The bug: a form accepts an empty email. RED: write a test called 'rejects empty email' that calls submitForm with an empty email and expects the error 'Email required'. Verify RED: run npm test and see a failure saying it expected 'Email required' but got undefined. This confirms the test fails for the right reason. GREEN: add a check to submitForm that returns { error: 'Email required' } when the email is missing or blank after trimming. Verify GREEN: run npm test and see it pass. REFACTOR: if needed, extract the validation so it covers several fields.
A second example compares a good and a bad retry test. The good test counts real attempts and checks that the operation succeeds on the third try. The bad test only checks that a jest mock was called three times, which the skill says tests the mock rather than the code. A matching pair compares minimal retry code with an over-engineered version that adds backoff options, which the skill labels YAGNI.
These examples come from the skill's own text. The sample outputs it shows, such as the FAIL and PASS lines, are illustrations, not records of actual runs.
Assessment & evidence
Limitations and risks
Unknown effectiveness: the files do not show how any specific agent responds to the skill, whether agents follow the delete-and-restart rule, or whether results improve. Agent compatibility and effectiveness are therefore unknown. The text contains no measurements or case studies. Statements such as 'TDD IS the pragmatic path' are the author's claims.
Destructive rule: the Iron Law says that code written before its test must be deleted and implemented fresh, with 'no exceptions'. If an agent follows this literally, it could throw away working changes. If you adopt the rule, consider working in version control from a clean checkpoint, or editing the rule to match how your team works.
Internal tension: the SKILL.md checklist says every new function or method has a test. writing-good-tests.md says trivial code and human prose earn no test, and that constructors, getters and constants need tests only when they validate, normalise, derive or cause side effects. An agent or reader has to reconcile these. Similarly, SKILL.md lists refactoring as a case where the skill always applies, but lists generated code and configuration files as exceptions that need permission.
Scope of guidance: the mutation check is a mental exercise ('mentally mutate the production code'), not an automated mutation-testing workflow. The examples centre on TypeScript and npm, with no setup help for other stacks. For testing documents that instruct agents, the guide points to another skill, superpowers:writing-skills, which is not part of this skill folder. The skill also assumes a human partner is available to approve exceptions, so it fits less well with agents that run without supervision.
Reasoning behind this assessment
The assessment is based on what the two files say, because they are the only evidence of the skill's intended behaviour. SKILL.md is complete and well structured. It has a trigger description, a core principle, guidance on when to use it, a cycle, concrete good and bad examples, verification steps, a checklist and a 'when stuck' table. That makes it a substantial set of working instructions rather than a slogan.
The companion file covers a failure mode it describes, tests that cannot fail, and gives concrete techniques for avoiding it. These are literal expected values worked out by hand instead of mirror assertions, no assertions on mocks, mocking slow or external operations while preserving the real side effects the test depends on, and copying complete real data into mocks. These parts are the most likely to matter to an experienced developer, even one who does not want the full strictness of the Iron Law.
The files include no results, adoption signals or compatibility statements. Whether the skill works well in practice, and with which agents, is therefore unknown.
Alternatives and comparisons
The evidence does not compare this skill with any other product, so it is not ranked against them. In general there are several alternatives. You could write your own shorter TDD or testing rules in your agent's standing instruction file, which gives you control over exceptions and the delete-code rule. You could rely on a model's default testing habits, which needs no setup but does not guarantee tests come first. You could use automated mutation-testing tools if you want a measured version of the mental mutation check. Or you could follow a human-led TDD practice with code review. The evidence does not establish how these alternatives compare for any particular project.
Our own suggestion, not something the files propose: a team that does not want the strict test-first rule could still adopt the ideas in writing-good-tests.md (expected values worked out by hand, no mock assertions, naming the break) on their own. The skill itself does not offer this option. SKILL.md says there are no exceptions without the human partner's permission, and writing-good-tests.md presents its principles as things strict TDD produces naturally. Using only part of the skill therefore means editing or departing from it as written.
Evidence used
The evidence is three files at revision 22f0b463e7a5e579904dd6211a520321035526f7: the root LICENSE (MIT, 1070 bytes), skills/test-driven-development/SKILL.md (9578 bytes) and skills/test-driven-development/writing-good-tests.md (8268 bytes).
What the skill instructs comes from those files. They do not establish how agents respond to it, which tools it works with, or what results it produces, so all of these remain unknown.
Access & freshness
Costs
The evidence shows no price for the files themselves. They are published under the MIT licence, which allows use without a fee. The cost of the agent, model or platform you would use them with is not stated and is unknown.
The two files total 17,846 bytes. The skill adds text for the agent to read, and the token cost depends on how the host loads it and which tokeniser it uses, so it is unknown. The instructions require failing-test and passing-test runs plus a full-suite check; their effect on total development time and model usage is unknown.
Licence and reuse rights
The LICENSE file is the MIT licence with the notice 'Copyright (c) 2025 Jesse Vincent'. It gives free permission to use, copy, modify, merge, publish, distribute, sublicense and sell copies. The condition is that the copyright notice and permission notice are included in all copies or substantial portions. The software is provided 'as is', with no warranty and no liability.
The LICENSE file is at the repository root, at the same revision as the skill files. Its text does not name the test-driven-development folder, so it applies to these two files only because it is the repository's root licence. Neither skill file has its own licence header. The evidence does not show whether other contributors hold separate copyright in these files. If you redistribute or adapt the skill, keep the MIT copyright and permission notice with it.
Freshness and versioning
The files were captured on 2026-11-11 at commit 22f0b463e7a5e579904dd6211a520321035526f7. The evidence does not include the commit date, release tags or change history, so how recently the skill was updated is unknown. The only date in the files is the 2025 copyright year in the licence.
The public address points to the main branch, which can change after this date. Anyone installing from main may get different text from what is described here. Pinning this commit preserves the source version; reproducibility of agent behaviour is unknown.
Suggested next steps
Read both files in full before adopting them, especially the Iron Law section and the list of exceptions. Decide whether you want the rule as written, which deletes any code written before its test. Try the skill on a small, low-risk task in a branch under version control, starting from a clean checkpoint. Check whether your agent really runs the failing test first, shows the failure message and runs the full project suite at the end, as the skill requires.
If your stack is not TypeScript with npm, check that the agent adapts the examples correctly to your test runner. Decide who approves exceptions for prototypes, generated code and configuration files. If you copy or redistribute the files, include the MIT copyright and permission notice. Look in the repository's own documentation for installation steps for your agent, because the skill files do not include them.
