$npx -y skills add Archive228/loopkit --skill contract-testTest the boundary between two systems by the contract, not the implementation. Use for APIs, integrations, and shared interfaces.
| 1 | # Contract Test |
| 2 | Test what the two sides AGREED on, so either can change internals without breaking the other. |
| 3 | - Assert the **shape**: required fields, types, status codes, error format — not internal logic. |
| 4 | - Cover the contract's edges: missing optional fields, the documented error responses, pagination bounds, versioning. |
| 5 | - For consumers: test against the real contract (recorded/real responses), not a mock you wrote to match your assumptions — that mock drifts and lies. |
| 6 | - One source of truth for the schema; both sides validate against it. |
| 7 | A green unit test with a wrong mock is worse than no test. Pin the contract. |