Install any skill in seconds. Free to start, no credit card required.
Get Started Free →fradser/tdd
BDD-driven test implementation: red-green loop mechanics, seams, mocking, and test quality under BDD Automation.
Passed 19 of 23 test cases with the skill, and 10 of 23 without it.
and 10 more in the full report
9 fixed10 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
We have defined our Gherkin scenarios in features/billing.feature for automated subscription renewals. Can we proceed with the automation phase for the first scenario?
| Checked | Without skill | With skill |
|---|---|---|
| Confirms proceeding to test automation since Gherkin scenarios exist. | Passed | Passed |
| Prompts to confirm public interface seams before writing test code. | Missed | Passed |
The instructions your model reads when the skill loads.
BDD cycles through three phases: Discovery (conversations → examples), Formulation (Gherkin scenarios), Automation (red-green-refactor, driven by BDD). This skill is the BDD-driven Automation reference — the how of test implementation, once /mattpocock:bdd has defined the what.
When invoked during /mattpocock:implement or /mattpocock:bdd, use this skill as the test-writing authority. The /mattpocock:bdd skill governs the scenario design and Iron Law; this skill governs the test code quality under BDD discipline.
If you reached this skill directly (not via /mattpocock:bdd or /mattpocock:implement), stop and ask the user: "Have you defined the Gherkin scenarios for this behavior yet?"
/mattpocock:bdd first to define the scenarios via Discovery → Formulation, then return here for Automation..feature files or equivalent, then proceed with the red-green loop below.Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification: "user can checkout with valid cart" tells you exactly what capability exists, and it survives refactors because it doesn't care about internal structure.
See tests.md for examples and mocking.md for mocking guidelines.
A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.
Test only at pre-agreed seams. Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.
Ask: "What's the public interface, and which seams should we test?"
When the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose), call the Skill tool with "mattpocock:codebase-design" for the vocabulary. It is the shared source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult, not a session to run.
expect(add(a, b)).toBe(a + b), a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth: a known-good literal, a worked example, the spec./mattpocock:code-review), not the red → green implementation cycle.test cases passed, vs 10 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.