qa-contract-api

Test API contracts with OpenAPI, Pact, AsyncAPI, and GraphQL specifications.

Updated May 28, 2026
One-click install
npx skills add https://github.com/SensLiao/Claude-code-setting --skill qa-contract-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qa-contract-api
Source: https://github.com/SensLiao/Claude-code-setting/tree/main/skills/qa-contract-api
Command: npx skills add https://github.com/SensLiao/Claude-code-setting --skill qa-contract-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openapi-spec-validator, pact, schemathesis, dredd, schemathesis, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the complex challenge of API contract testing, ensuring compatibility, detecting breaking changes, and verifying error contracts across various contract types.

Core Features & Use Cases

  • Contract Testing: Supports REST, GraphQL, AsyncAPI, and Pact-based contract testing.
  • Breaking Change Detection: Identifies breaking changes and drifts in provider behavior.
  • Error Contract Coverage: Ensures 4xx/5xx error contract is covered.
  • Integration with QA Workflow: Triggered by parent workflow steps, feeding into evidence bundles.
  • Use Case: Ideal for teams that need to ensure API compatibility and reliability during development and deployment.

Quick Start

To start a contract test for the API at /api/checkout, use the command 'qa-contract-api run test /api/checkout'.

Frequently Asked Questions about qa-contract-api

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

FAQPage Schema
How do I perform API contract testing for REST and GraphQL endpoints?

API contract testing validates endpoint compatibility by verifying OpenAPI, AsyncAPI, and GraphQL specifications against provider behavior to detect breaking changes. It uses tools like openapi-spec-validator and schemathesis to ensure schema conformity.

How does Pact contract testing detect breaking changes in API endpoints?

Pact contract testing detects breaking changes by comparing consumer expectations with provider behavior using the pact provider verifier. It identifies schema drifts and verifies 4xx/5xx error contracts across API endpoints.

When do I need contract testing for AsyncAPI specifications?

Contract testing for AsyncAPI is needed when verifying message-driven API compatibility and reliability during development. It ensures event schemas conform to specifications and detects breaking changes in asynchronous endpoints.

Can I use schemathesis to verify 4xx and 5xx error contracts?

Yes, schemathesis verifies 4xx and 5xx error contract coverage by validating OpenAPI specifications against endpoint behavior. It ensures error responses match documented schema definitions to prevent undocumented breaking changes.

What is the best way to start contract testing for an API checkout endpoint?

The best way to start contract testing for an API endpoint is executing the test command targeting the specific path. For example, run the contract test for the API at /api/checkout to validate compatibility and error contracts.

Does openapi-spec-validator support detecting breaking changes and drifts in provider behavior?

Openapi-spec-validator validates OpenAPI specification syntax and structure, while breaking change detection and provider drift verification are handled by integration with pact and schemathesis tools within the contract testing workflow.