Agent skill · data analytics · secondsky
api-contract-testing
Verifies API contracts between services using consumer-driven contracts, schema validation, and tools like Pact. Use when testing microservices communication, preventing breaking changes, or validating OpenAPI specifications.
Why this skill is useful
Provides domain-specific knowledge on consumer-driven contract testing and validation techniques that the AI wouldn't reliably generate on its own.
What it needs
Requires @pact-foundation/pact, express-openapi-validator installed locally. About 2k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.
What this skill does
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) Provider Verification OpenAPI Validation (Express) Additional Implementations Python JSON Schema: See references/python-json-schema.md Java REST Assured: See references/java-rest-assured.md Pact Broker CI/CD: See references/pact-broker-cicd.md Best Practices Do: Test from consumer perspective Use matchers for flexible matching Validate structure, not specific values Version contracts explicitly Test error responses Run tests in CI pipeline Test backward compatibility Don't: Test business logic in contracts Hard-code specific values Skip error scenarios Ignore versioning Deploy without verification Tools Pact - Multi-language consumer-driven contracts Spring Cloud Contract - JVM ecosystem OpenAPI/Swagger - Schema-first validation Dredd - API blueprint testing Spectral - OpenAPI linting
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills secondsky/api-contract-testing