api-contract-validation

Analyzes OpenAPI specs and detects breaking changes to prevent them.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/mehdic/CDC --skill api-contract-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-contract-validation
Source: https://github.com/mehdic/CDC/tree/main/.claude/skills/api-contract-validation
Command: npx skills add https://github.com/mehdic/CDC --skill api-contract-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill validates API contracts to prevent breaking changes, surfacing breaking changes and suggesting versioned strategies.

Core Features & Use Cases

  • Locates OpenAPI/Swagger specs or auto-generates if possible
  • Compares against baseline and classifies changes by severity
  • Produces actionable recommendations and updates the baseline

Quick Start

Run the API contract validator to compare current specs with baseline and save results to bazinga/artifacts/{SESSION_ID}/skills/api_contract_validation.json.

Frequently Asked Questions about api-contract-validation

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

FAQPage Schema
How do I detect breaking changes in OpenAPI specifications?

Breaking changes in OpenAPI specs occur when endpoints are removed, request parameters become required, or response schemas change incompatibly. This Skill compares your current OpenAPI/Swagger spec against a baseline version, classifies changes by severity, and generates a structured report identifying which modifications could break client applications.

Can I validate API contracts in my CI/CD pipeline?

Yes. This Skill integrates into CI/CD workflows to automatically compare OpenAPI specs on each commit or pull request, detecting breaking changes before deployment. It outputs a JSON summary and artifacts that your pipeline can use to gate or warn on risky contract modifications.

What's the best way to prevent API versioning conflicts?

By validating OpenAPI contracts against a baseline before changes ship, you catch incompatible modifications early and can adopt versioned strategies proactively. This Skill surfaces breaking changes and suggests remediation, helping you maintain backward compatibility or plan graceful deprecations.

Does this work with auto-generated OpenAPI specs from frameworks?

Yes. The Skill locates OpenAPI/Swagger specs whether hand-written or auto-generated from REST API frameworks, then applies the same diff and validation pipeline to detect breaking changes regardless of how the specification was created.

What happens if my baseline OpenAPI spec is missing or outdated?

The Skill can update or initialize the baseline during validation runs. If no baseline exists, it establishes one from your current spec; on subsequent runs, it compares against that stored version and flags any breaking modifications.

How detailed are the breaking change reports?

Reports include a structured JSON summary categorizing changes by severity, identifying removed endpoints or schema fields, and listing additions or modifications that could impact clients. Artifacts are saved with full details for integration with monitoring and approval workflows.