From story-to-ship
Use when writing tests for any interface, abstract base class, or type with multiple implementations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/story-to-ship:contract-testingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```
EVERY ABSTRACT TYPE REQUIRES A CONTRACT TEST FIXTURE
YOU MUST write a contract test fixture before shipping any interface with multiple implementations. No exceptions.
Violating the letter of this rule is violating the spirit of this rule.
Announce at start: "I am using the contract-testing skill to write contract tests for [interface]."
[+] All met -> proceed [-] Any unmet -> write the contract test fixture before adding any new implementation
A contract test describes the behavioral invariants all implementations must satisfy. Violating a contract test violates the Liskov Substitution Principle.
Use TYPED_TEST_P -- not TEST_F -- because TEST_F instantiates the fixture class directly and will not compile against a pure-virtual base. See references/CONTRACT_TESTING.md for the full TYPED_TEST_P / INSTANTIATE_TYPED_TEST_SUITE_P pattern.
A failing contract test means the hierarchy is wrong -- fix the hierarchy, not the test.
| Excuse | Reality |
|---|---|
| "Integration tests cover the contract" | Integration tests verify composition, not behavioral invariants. |
| "There is only one implementation" | Write the fixture now. A second implementation arrives later. |
| "The interface is simple, nothing to test" | Simple interfaces still have invariants (no-throw, non-null return). |
| "The mock already tests the behavior" | Mocks verify interactions, not behavioral contracts. Both are needed. |
| "The contract test is redundant -- the implementations are clearly equivalent" | Equivalence is an assumption, not evidence. Contract tests document and enforce invariants across all current and future implementations. |
TEST_F instead of TYPED_TEST_P -- STOP. TEST_F instantiates the concrete fixture directly; it does not test behavioral invariants across implementations.testing -- parent skill; Test Doubles taxonomy, saw-the-test-fail gate, AAA namingoop-principles -- sibling; contract tests enforce Liskov Substitutionarchitecture-review -- sibling; interfaces also need layer boundary reviewnpx claudepluginhub jpegthedev/story-to-ship --plugin story-to-shipProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.