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
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-validatormiddleware - 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 -yInstalls 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
| Term | Definition |
|---|---|
| Consumer | Service that calls an API |
| Provider | Service that exposes an API |
| Contract | Agreed request/response format |
| Pact | Consumer-driven contract testing tool |
| Schema | Structure definition (OpenAPI, JSON Schema) |
| Broker | Central 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- React Native Skills501
- Technical Specification501
- Mobile App Testing492
- Ml Model Training489
- Csrf Protection488
- Bun Test Basics485
- Payment Gateway Integration484
- Test Quality Analysis481
- Bun Hono Integration477
- Api Reference Documentation476
- Mutation Testing474
- Security Headers Configuration473
- Tanstack Router472
- Internationalization I18n469
- Seo Optimizer469
- Systematic Debugging469
- Bun Package Manager466
- Interaction Design466
- Api Error Handling465
- Sequential Thinking461
- Bun Nextjs453
- Websocket Implementation452
- Root Cause Tracing450
- Seo Keyword Cluster Builder450
Similar to Api Contract Testing
More Testing & QAcontract-testing-builderSkillpatricio0312rev/skills267 installsConsumer-driven contract testing with Pact and OpenAPI validation to catch breaking API changes early.
api-testing-patternsSkillproffesor-for-testing/agentic-qe649 installsComprehensive API test patterns covering contract, component, and integration levels with agent-assisted validation.
api-testingSkillsecondsky/claude-skills929 installsHTTP API testing guide for Supertest and httpx/pytest covering REST, GraphQL, auth, and error handling.
contract-testerPluginrohitg00/awesome-claude-code-toolkit2.9K starsAPI contract testing with Pact for microservice compatibility
api-testerSkilllaolaoshiren/claude-code-skills-zh927 starsAPI test generation and execution that grounds each case in OpenAPI specs, routes, and existing tests.