contract-testing

Enforce executable contract evidence across API, schema, event, and integration boundaries.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/machenjie/rd-skills --skill contract-testing-machenjie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contract-testing
Source: https://github.com/machenjie/rd-skills/tree/main/src/foundation/capabilities/contract-testing
Command: npx skills add https://github.com/machenjie/rd-skills --skill contract-testing-machenjie

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Contract testing eliminates the risk of silently breaking consumer expectations by turning API, schema, and event assumptions into executable evidence that can be verified in CI.

Core Features & Use Cases

  • Executable compatibility gates: validates consumer expectations for HTTP/REST, gRPC/Protobuf, async messages/events, webhooks, and external integration boundaries.
  • Breaking-change detection with clear evolution rules: enforces versioning discipline for removals, type changes, nullability shifts, enum contraction, and pagination/error-shape regressions.
  • Machine-readable schema authority: validates against OpenAPI, Protobuf, AsyncAPI, or JSON Schema rather than duplicating logic with brittle hand-written assertions.

Quick Start

Use contract-testing to generate a plan and CI gate that verifies provider behavior against consumer expectations whenever you change an API, schema, event, or webhook contract.

Frequently Asked Questions about contract-testing

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

FAQPage Schema
How do I prevent breaking API changes when evolving endpoints and payloads across independent release cycles?

Prevent breaking API changes by enforcing executable contract evidence in CI that verifies provider behavior against consumer expectations for endpoints, message payloads, and DTO shapes.

What is contract testing and how does it work with OpenAPI and gRPC schemas?

Contract testing validates consumer-visible compatibility by using machine-readable schemas like OpenAPI, Protobuf, and AsyncAPI as the authority to verify API, schema, and event boundaries in CI.

How do I set up a CI gate to verify provider behavior against consumer expectations for webhooks and async events?

Set up a CI gate by generating a verification plan that validates provider behavior against consumer expectations whenever you change an API, schema, event, or webhook contract.

Does contract testing support compatibility-mode configuration for serialized schemas and registries?

Yes, contract testing supports compatibility-mode configuration for serialized schemas and registries, explicitly classifying breaking changes like removals, type changes, nullability shifts, and enum contraction.

What's the best way to classify breaking changes like pagination and error-shape regressions in versioned contracts?

Classify breaking changes by enforcing versioning discipline that requires explicit evidence for removals, type changes, nullability shifts, enum contraction, and pagination or error-shape regressions.

Why do I need schema-driven validation instead of hand-written assertions for API compatibility?

Schema-driven validation is needed because it validates against OpenAPI, Protobuf, AsyncAPI, or JSON Schema rather than duplicating logic with brittle hand-written assertions to eliminate silent consumer breakages.