Api Contract Validator is a skill that checks whether an API implementation matches its OpenAPI or Swagger specification. It covers three distinct concerns: linting, runtime verification, and spec diffing.
For linting, it validates that a spec file follows industry standards using Spectral or Redocly, catching structural and style errors before any code ships. For runtime checks, it verifies actual server responses against the spec using Dredd or language-specific middleware, confirming that live endpoints behave as documented. For diffing, it compares two versions of a spec using oasdiff to flag breaking changes such as removed fields or altered types.
The skill provides ready-to-use configurations for GitHub Actions and GitLab CI, making it straightforward to add contract validation as a pipeline gate. Output formats include actionable reports, JUnit XML suitable for CI test result ingestion, and markdown diffs that show exactly what changed between spec versions.
Implementation-specific guidance is available for Express on Node.js, FastAPI and Flask on Python, and Go. This makes it applicable across common backend stacks without requiring separate tooling per language.
This skill is appropriate when a team maintains an OpenAPI spec alongside a live API and needs automated enforcement that the two stay consistent. It is not a general API testing framework and does not perform load testing, authentication testing, or exploratory fuzzing.