testing-contract

Define and enforce provider-consumer compatibility policies in CI.

7|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/KentoShimizu/sw-agent-skills --skill testing-contract-kentoshimizu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-contract
Source: https://github.com/KentoShimizu/sw-agent-skills/tree/main/skills/testing-contract
Command: npx skills add https://github.com/KentoShimizu/sw-agent-skills --skill testing-contract-kentoshimizu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Prevents integration regressions by enforcing provider-consumer contracts in CI.

Core Features & Use Cases

  • Explicit compatibility policy (backward/forward/strict) for API and event schemas.
  • Identification of contract surfaces and critical consumers, with automatic evidence generation.
  • Creation of a contract compatibility matrix and migration plan, plus verifiable CI gates.

Quick Start

Provide a provider-consumer contract policy in CI to prevent breaking changes.

Frequently Asked Questions about testing-contract

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

FAQPage Schema
How do I enforce provider-consumer contract testing in CI to prevent breaking changes?

Provider-consumer contract testing in CI prevents integration regressions by enforcing an explicit compatibility policy. It identifies contract surfaces and critical consumers, then executes verification runs to block breaking API or event schema changes.

What is a contract compatibility matrix and how does it verify API schemas?

A contract compatibility matrix maps provider-consumer schema compatibility across backward, forward, and strict policies. It generates automatic evidence and documented migration paths to verify API schemas against critical consumers.

How do I define backward and forward compatibility policies for API and event schemas?

Defining backward and forward compatibility policies for API and event schemas involves specifying strict contract surfaces, identifying critical consumers, and executing verification runs that generate evidence for CI gates.

Can I use contract testing to generate migration paths for critical consumers?

Yes, contract testing generates documented migration paths for critical consumers by executing verification runs against a defined compatibility policy, producing evidence and a compatibility matrix stored as structured artifacts.

How do I document residual risks when enforcing provider-consumer compatibility checks?

Documenting residual risks involves storing policy decisions and verification evidence as structured artifacts within assets and references, ensuring reproducible CI checks and clear tracking of provider-consumer compatibility gaps.

Does provider-consumer contract testing work without external dependencies?

Provider-consumer contract testing operates without external dependencies by using internal references and assets components to store policy decisions, evidence, and compatibility matrices for reproducible CI checks.