# Contract Test

Test the boundary between two systems by the contract, not the implementation.

- Repository: https://github.com/Archive228/loopkit (756 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-07-14
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Archive228/loopkit --skill contract-test -g -a claude-code -y`
Codex: `npx skills add Archive228/loopkit --skill contract-test -g -a codex -y`
Cursor: `npx skills add Archive228/loopkit --skill contract-test -g -a cursor -y`
Gemini CLI: `npx skills add Archive228/loopkit --skill contract-test -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Archive228/loopkit`

## Description

Test the boundary between two systems by the contract, not the implementation. Use for APIs, integrations, and shared interfaces.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Contract Test
Test what the two sides AGREED on, so either can change internals without breaking the other.
- Assert the **shape**: required fields, types, status codes, error format, not internal logic.
- Cover the contract's edges: missing optional fields, the documented error responses, pagination bounds, versioning.
- For consumers: test against the real contract (recorded/real responses), not a mock you wrote to match your assumptions, that mock drifts and lies.
- One source of truth for the schema; both sides validate against it.
A green unit test with a wrong mock is worse than no test. Pin the contract.

