Skip to content
secondsky avatar

Api Contract Testing

Consumer-driven contract testing with Pact and OpenAPI validation that catches breaking API changes between services.

CCM score
52 of 100
skills.sh installs
502
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers consumer-side Pact tests, provider verification against a Pact Broker, and OpenAPI request and response validation
  • Includes TypeScript examples for mock consumer tests, provider state handlers, and express-openapi-validator middleware
  • Enforces structure-based matching over hard-coded values, and tests both success and error responses such as 404s
  • Designed for teams testing microservice communication in CI, with Java and Python alternatives noted in the source

Install

$ npx -y skills add secondsky/claude-skills --skill api-contract-testing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

API Contract Testing

Verify that APIs honor their contracts between consumers and providers without requiring full integration tests.

Key Concepts

TermDefinition
ConsumerService that calls an API
ProviderService that exposes an API
ContractAgreed request/response format
PactConsumer-driven contract testing tool
SchemaStructure definition (OpenAPI, JSON Schema)
BrokerCentral repository for contracts

Pact Consumer Test (TypeScript)

import { PactV3, MatchersV3 } from '@pact-foundation/pact';

const provider = new PactV3({
  consumer: 'OrderService',
  provider: 'UserService'
});

Details

Repository
github.com/secondsky/claude-skills
Categories
Testing & QA, Backend & APIs
First seen
Jun 3, 2026

Questions

What does the api-contract-testing skill do?

The api-contract-testing skill verifies that APIs honor their contracts between consumers and providers, using consumer-driven contracts, schema validation and tools like Pact. It helps test microservice communication, prevent breaking changes and validate OpenAPI specifications without requiring full integration tests.

Is api-contract-testing listed in the Testing & QA category?

api-contract-testing is listed in the Testing & QA category on Claude Marketplaces. Other skills that lead that category include tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui.

How do I install the api-contract-testing skill?

Run npx -y skills add secondsky/claude-skills --skill api-contract-testing -y in your project to install it. Once installed, api-contract-testing gives your agent guidance for writing Pact consumer tests, provider verification and OpenAPI validation.

Which tools does api-contract-testing cover?

api-contract-testing covers Pact for multi-language consumer-driven contracts, Spring Cloud Contract for the JVM ecosystem, OpenAPI and Swagger for schema-first validation, Dredd for API blueprint testing and Spectral for OpenAPI linting. It also includes Python JSON Schema, Java REST Assured and Pact Broker CI/CD references.

More from secondsky/claude-skills

All 116

Similar to Api Contract Testing

More Testing & QA