contract-tester

Validate API contracts and detect breaking changes across OpenAPI/AsyncAPI specifications.

16|3|Updated Nov 10, 2025
One-click install
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill contract-tester
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contract-tester
Source: https://github.com/vladm3105/aidoc-flow-framework/tree/main/.claude/skills/contract-tester
Command: npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill contract-tester

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, jsonschema, openapi-spec-validator, pact-python, faker.

What problem does it solve?

This Skill prevents API contract violations, detects breaking changes, and ensures provider-consumer compatibility before deployment, saving costly post-deployment fixes and maintaining API stability.

Core Features & Use Cases

  • API Contract Validation: Validate YAML structure, OpenAPI/AsyncAPI compliance, and semantic versioning of API contracts.
  • Breaking Change Detection: Automatically identify removed endpoints, changed schemas, or stricter validation rules between API versions.
  • Consumer-Driven Contract Testing: Generate and run Pact tests to ensure seamless compatibility between API providers and consumers.
  • Use Case: Before deploying a new API version, use this skill to automatically detect if any changes will break existing consumer applications, providing a detailed report and suggested migration paths to ensure a smooth rollout.

Quick Start

Use the contract-tester skill to validate the API contract defined in 'ctrs/CTR-USER-V1.yaml'.

Frequently Asked Questions about contract-tester

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

FAQPage Schema
How do I detect breaking changes in API versions before deployment?

Breaking change detection automatically identifies removed endpoints, altered schemas, and stricter validation rules between API versions. Run validation on your new contract against the previous version to receive a detailed report highlighting incompatibilities and migration paths for consumers.

Can I validate OpenAPI and AsyncAPI specifications against contract requirements?

Yes. Contract validation supports OpenAPI and AsyncAPI compliance checking, schema validation, and semantic versioning verification. The Skill converts and validates specifications against CTR YAML documents to ensure specification integrity and standards adherence.

How do I prevent API contract violations between providers and consumers?

Consumer-driven contract testing generates and runs Pact tests to verify seamless compatibility. Validate API contracts against CTR specifications, check required fields and data types, verify formats (email, URL, UUID), and confirm versioning compliance before deployment.

What does contract testing actually validate in an API contract?

Contract testing validates YAML structure, required fields, data types, format specifications (email, URL, UUID), OpenAPI/AsyncAPI compliance, semantic versioning, deprecation handling, and migration paths. It ensures both schema correctness and provider-consumer compatibility.

Do I need to manually write test cases for contract testing?

No. The Skill generates mock servers and Pact tests automatically from your API contract, reducing manual test writing. Consumer-driven contract testing workflows run against generated mocks to validate compatibility without hand-coded test suites.

What's the best way to validate multiple API versions for compatibility?

Semantic versioning checks and deprecation handling compare versions systematically. Run validation on each version's CTR YAML document to detect breaking changes, assess migration paths, and ensure backward compatibility or provide clear deprecation guidance to consumers.