skills/api-contract-testing/SKILL.md
Use when validating API schemas, detecting breaking changes, or setting up consumer-driven contract testing
npx skillsauth add kienbui1995/magic-powers api-contract-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When multiple services or teams consume an API and you need to catch breaking changes before they reach production.
A contract = what the consumer expects:
Use OpenAPI spec as the source of truth. Every endpoint must be documented.
Let consumers define what they expect:
# Consumer test (Python Pact)
@consumer('FrontendApp')
@provider('UserAPI')
def test_get_user(pact):
pact.given('user 123 exists').upon_receiving('a request for user 123').with_request(
method='GET', path='/api/v1/users/123'
).will_respond_with(200, body=Like({'id': '123', 'email': like('string')}))
Provider verifies it can satisfy all consumer contracts before deploying.
Breaking changes (always require major version bump):
Non-breaking (safe to add):
Use tools: Spectral (OpenAPI linting), Optic, or Bump.sh for automated detection.
content-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.