contract-testing

Verify consumer-provider interfaces by replaying contract artifacts against both sides.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/jacob-balslev/skill-graph --skill contract-testing-jacob-balslev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contract-testing
Source: https://github.com/jacob-balslev/skill-graph/tree/main/marketplace/skills/contract-testing
Command: npx skills add https://github.com/jacob-balslev/skill-graph --skill contract-testing-jacob-balslev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Contract testing prevents brittle, cross-service breakages by ensuring a provider continues to satisfy a consumer’s explicitly recorded expectations at the interface boundary.

Core Features & Use Cases

  • Consumer-driven contract artifacts: Capture exactly what the consumer relies on (behavior and specific interactions), not just the provider’s declared shape.
  • Two-phase verification with replay: Validate compatibility first on the consumer side (mock/provider replay) and then on the provider side (real provider replay).
  • Broker-enabled deploy gating: Use a contract broker to track compatibility versions and block deployments when the provider no longer satisfies the production consumer contract.

Use this when multiple services or components depend on a shared interface and you need deterministic checks that reduce flaky end-to-end staging failures.

Quick Start

Use the contract-testing skill to design a consumer-driven contract for a specific consumer-provider interaction, then set up provider-side replay to verify the provider still satisfies that contract on every change.

Frequently Asked Questions about contract-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is consumer-driven contract testing and how does it verify service interfaces?

Consumer-driven contract testing verifies a consumer-provider interface by capturing consumer expectations as a contract artifact and replaying it independently against both sides, replacing schema-only validation and brittle cross-service end-to-end testing.

How do I set up two-phase verification for consumer-driven contracts?

Two-phase verification for consumer-driven contracts involves first generating and validating consumer mocks, followed by replaying the captured contract against the real provider to ensure compatibility on every change.

When should I use contract testing instead of end-to-end integration tests?

Use contract testing when multiple services depend on a shared REST or message-bus interface and you need deterministic checks to reduce flaky end-to-end staging failures across consumer-provider boundaries.

Can I use a contract broker to block deployments when a provider breaks a consumer contract?

Yes, broker-enabled deploy gating tracks compatibility versions using a matrix and blocks provider deployments when the provider no longer satisfies the production consumer contract.

Does contract testing work for message-bus boundaries or only REST APIs?

Contract testing applies to both REST and message-bus boundaries, capturing and replaying consumer expectations to verify compatibility across diverse service interface interactions.

What are the limitations of schema-only validation compared to consumer-driven contracts?

Schema-only validation checks the provider's declared shape but misses specific interactions, whereas consumer-driven contracts capture exactly what the consumer relies on to prevent brittle cross-service breakages.