api-contract-testing

Validate API contracts between consumers and providers in CI.

Updated May 17, 2026
One-click install
npx skills add https://github.com/cenjie/skills --skill api-contract-testing-cenjie
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: api-contract-testing
Source: https://github.com/cenjie/skills/tree/main/skills/api-contract-testing
Command: npx skills add https://github.com/cenjie/skills --skill api-contract-testing-cenjie

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Contract drift between services breaks integrations and slows delivery. This skill helps teams continuously validate API contracts to catch breaking changes early, supporting Pact-based contract testing, OpenAPI/Swagger validation, and consumer-driven contracts.

Core Features & Use Cases

  • Validate API contracts between consumers and providers to prevent breaking changes.
  • Validate OpenAPI/Swagger specifications and JSON Schema across service boundaries.
  • Integrate into CI for automated contract testing and consumer-driven contracts workflows.

Quick Start

Run a Pact-based contract test suite in CI to ensure provider changes do not break consumer expectations.

Frequently Asked Questions about api-contract-testing

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

FAQPage Schema
How do I prevent breaking API changes between microservices in CI?โ–ผ

Contract testing validates API contracts between consumers and providers to prevent breaking changes. It verifies consumer expectations against provider schemas in CI, catching incompatibilities early across service boundaries with deterministic test execution.

What is consumer-driven contract testing and when do I need it?โ–ผ

Consumer-driven contract testing validates API contracts where consumers define expectations that providers verify. You need it in microservice ecosystems to prevent integration breaks from uncoordinated API changes across independently deployed services.

Can I validate OpenAPI and Swagger specifications against JSON Schema?โ–ผ

Yes, you can validate OpenAPI and Swagger specifications against JSON Schema across service boundaries. This skill performs schema validation to ensure structural compatibility and prevent contract drift between interacting services.

How to run Pact-based contract tests to verify provider compatibility?โ–ผ

Run a Pact-based contract test suite in CI to verify provider changes do not break consumer expectations. The skill applies consumer-driven contract workflows, executing deterministic tests that check provider compatibility across versions and schemas.

Does contract testing work for both schema validation and version compatibility?โ–ผ

Yes, contract testing works for both schema validation and version compatibility. It supports OpenAPI/Swagger validation, JSON Schema checks, and Pact-based testing to verify consumer-provider compatibility across versions and schemas.

Why does contract drift break microservice integrations?โ–ผ

Contract drift breaks microservice integrations because services evolve independently, causing uncoordinated schema or endpoint changes. Continuous API contract validation catches these breaking changes early in CI before they impact downstream consumers.