secondsky avatar

Api Contract Testing

This handles contract testing between microservices so you catch breaking API changes before deployment. It covers Pact for consumer-driven contracts with proper matchers and provider verification, OpenAPI validation middleware, and shows both happy path and error scenarios. The TypeScript examples are solid and include state handlers for test setup. What's nice is the focus on structure over specific values, which is the whole point of contract testing. You'll want this when you have services talking to each other and need confidence that changes won't break consumers. The best practices section actually earns its keep by steering you away from common mistakes like testing business logic in contracts.

skills.sh installs
491
GitHub stars
248
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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'
});

Sponsors

Details

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

More from secondsky/claude-skills

All 146
1parcadei avataragentica-claude-proxyparcadei/continuous-claude-v3Guide for integrating Agentica SDK with Claude Code CLI proxy485skills.sh installs
2wvlvik avatarjimeng-api-video-genwvlvik/toy-skills(project - Skill) Generate AI videos using Volcengine Jimeng Video 3.0 Pro API. Use when users request video generation from text prompts or images, including t481skills.sh installs
3aj-geddes avatarapi-changelog-versioningaj-geddes/useful-ai-promptsDocument API changes, breaking changes, migration guides, and version history for APIs. Use when documenting API versioning, breaking changes, or creating API m477skills.sh installs
4aj-geddes avatardatabase-monitoringaj-geddes/useful-ai-promptsMonitor database performance and health. Use when setting up monitoring, analyzing metrics, or troubleshooting database issues.467skills.sh installs
5auth0 avatarauth0-fastapi-apiauth0/agent-skillsUse when protecting FastAPI endpoints with JWT Bearer token validation, scope checks, or DPoP binding. Integrates auth0-fastapi-api for stateless APIs receiving461skills.sh installs
6aj-geddes avatarapi-filtering-sortingaj-geddes/useful-ai-promptsImplement advanced filtering and sorting capabilities for APIs with query parsing, field validation, and optimization. Use when building search features, comple450skills.sh installs