/grey-matter:tddfrom grey-matter
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Ships in grey-matter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The red → green loop that gives an agent a tight feedback loop and leaves durable tests
behind. This skill is the reference that makes the loop produce tests worth keeping:
what a good test is, where tests go, the anti-patterns, and the rules of the loop.
Design is settled upstream (grilling, to-spec); cleanup and refactoring are surfaced
afterwards by code-review (which files them as tickets to fix). This skill owns the
middle: make it work, test-first, and leave tests that survive the cleanup.
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.
For a game, the testable seam is the deterministic simulation core (fixed-timestep
sim steps, state machines, save/load, economy/combat math, pathfinding, seeded-procgen,
replay); feel, rendering, and input timing are validated by play, not asserted. Call
the Skill tool with game-native-design for how the loop re-points for games. The loop
below is the same; only the seam and what's off-limits differ.
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. (This is why tests mock
only at system boundaries, never internal collaborators: a test coupled to internals
breaks when code-review later refactors them, defeating the point.)
For stateful changes or resource ownership, test through the real public seam and assert the contract's final state, relevant operation counts, and error identity where errors are part of the contract. Cover only applicable ownership and terminal behaviors; use the test-environment ladder to select the lowest faithful environment, and escalate only for boundaries it cannot establish. Reversible edits do not need an integration campaign.
Before treating a failing generated or agent-written test as a product defect, check its expectation against the governing contract. Qualify a new oracle or worker using the contract and control procedure before trusting its red/green verdict.
See references/tests.md for worked good/bad examples when a test's shape is unclear, and references/mocking.md when the change touches a system boundary (external API, DB, time, filesystem) and you need to decide what to mock.
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. Lower-risk areas still get lightweight coverage, they aren't left untested, just not tested exhaustively.
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 "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.code-review surfaces
cleanup as tickets to fix. Keeping cleanup out of the loop is why the tests above must
survive refactors.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub smileynet/grey-matter --plugin grey-matterOther plugins' skills for the same job
51 skills in this plugin
/adopt-projectAdopt a brownfield repo into grey-matter: characterize its as-is model, subsume existing agent config, seed a triaged board, and wire plumbing./changelogMaintain CHANGELOG.md in Keep a Changelog format with user-facing entries. Use when recording what changed for a release, updating the Unreleased section, or asked to write/update the changelog./cheat-sheetList every skill in this set by category with a one-line description. Use when the user wants a quick reference card of available skills, asks "what skills are there", or "list all commands".