Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Writes and improves tests under BDD discipline, covering red-green loop mechanics, test seams, mocking and anti-patterns.
43% 83%+39 ptsof test cases passed
Passed 19 of 23 test cases with the skill, and 10 of 23 without it.
This test ran on v2. v3 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
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 exploring the codebase, read GLOSSARY.md (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.
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?" Give each proposed seam a one-line note on what it catches and what it misses.
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.Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.