test-first
Skill1 starsChanged 13 days agoMITView on GitHub
How the implementer writes tests before code, what a good test is, and the mutant check before reporting. Preloaded into mstack:implementer; not a command.
29 other projects use a version of this.
Adopted by
Most recently taken up by
- MaxwellCalkin/Autobottheir own version, first seen Nov 29, 2026
- Stelliad/stelliad-skillstheir own version, first seen Nov 22, 2026
- anivar/agentic-sdlctheir own version, first seen Nov 16, 2026
- iaintsaket/how-saket-claudestheir own version, first seen Nov 15, 2026
- llopresto87/Cypresstheir own version, first seen Nov 11, 2026
- TheLunchTrae/claude-code-configstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use security-sweep, bug-hunt and 6 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.
n24q02mSkillsecurity-sweep
Graph-driven security sweep -- scan for dangerous sinks, then rank each finding by whether an entry point can actually reach it, and triage the rest into suppressions.
Also in 3 projects that use this
danpegSkillbug-hunt
Run adversarial bug hunting on your codebase. Uses 3 isolated agents (Hunter, Skeptic, Referee) to find and verify real bugs with high fidelity. Invoke with /bug-hunt, /bug-hunt [path], or /bug-hunt -b <branch> [--base <base>].
Also in 3 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 4 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
Google CloudSkilltriage
Gather context on a change or bug and plan the implementation.
Also in 3 projects that use this
NVIDIASkillresearch
Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.
Also in 3 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- JordanCoin/codemap★ 715same name
- NoobyGains/godmode★ 140same name
- llopresto87/Cypress★ 121same name
- claude-world/director-mode-lite★ 80same name
- bmtrnavsky/disciplined-vibe-coding★ 27same name
- s-hiraoku/synapse-a2a★ 17same name
- dfedoryshchev/weftworks★ 5same name
- Stelliad/stelliad-skills★ 4same name
- eeshsaxena/agent-skills★ 2same name
- iaintsaket/how-saket-claudes★ 2same name
19 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.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
5
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 37
Write one test for one behaviour.
- Distinctive: line 38
Run it and read the failure.
- Distinctive: line 41
Write the least code that passes.
- Distinctive: line 42
Run it again and watch it pass, then run the project's whole suite.
- Distinctive: line 48
No restructuring beyond what the test or the brief asks for: review owns refactoring.
“Common” is measured: kept by at least 6 in 10 of the 24 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
<!-- Origin: what a good test is, from mattpocock/skills, skills/engineering/tdd/SKILL.md, tests.md and mocking.md @ 49dd158d1076134a641b33efb035946536778336 (MIT, licenses/mattpocock-skills-LICENSE.txt); the process, from obra/superpowers, skills/test-driven-development/SKILL.md @ 5bf4e78011075bcfc0dc295f0724994cd123ee71 (MIT, licenses/obra-superpowers-LICENSE.txt, identical at that commit). Adapted: seams come from the item and are never confirmed with the user, refactoring is left to review unless the brief asks for it, and the mutant check is added. -->Test-first
The red output is the receipt: no receipt, no code. For any change that has behaviour, the test comes first and you show it failing.
Seams
The brief names the item's seams as pre-agreed. Test at those, and do not ask anyone to
confirm them. If a seam is wrong or missing, test at the one you needed, record it with
mstack decide --phase implement, and say so in the report.
A good test
- It goes through the public interface at a seam. It would still pass after a rewrite of the internals; one that breaks on a refactor with no behaviour change is coupled to the wrong thing.
- Its expected value is a literal or a worked example from the spec, never computed by the
logic under test.
expect(add(a, b)).toBe(a + b)passes by construction. - It asserts what a caller observes. It does not read a private field, count calls on your own collaborators, or query the database to check what the interface should have shown.
- It mocks only what the project does not own (network, clock, randomness, a third-party service), and never your own modules.
The loop, one slice at a time
A slice is one behaviour. Do not write all the tests first and then all the code: tests written in bulk check an imagined shape.
- Write one test for one behaviour.
- Run it and read the failure. It must fail for the expected reason: the behaviour is missing. A typo, a missing import or a crash in setup is not red; fix the test and rerun. Paste the red output in your report.
- Write the least code that passes. No code for a test you have not written.
- Run it again and watch it pass, then run the project's whole suite.
- Next slice.
A test that passed the first time it ran has proved nothing. Break the code to see it fail, or call it a guard and not coverage.
No restructuring beyond what the test or the brief asks for: review owns refactoring.
Before you report: mutants
List the mutants your tests should kill: flip a condition, drop a branch, return a constant, skip a write, change a boundary. Apply each one, run the tests, record killed or survived, then revert it. A survivor is a missing test, so write it or say why it does not matter.
When it does not apply
A change with no behaviour (docs, prose, config with nothing to observe), or a refactor the brief asks for that is pinned by characterization tests, has no new test to write first. Say so in one line in the report instead of inventing one.
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.

