HomeUse CasesKeep Your API and Spec in Sync
New

Keep Your API and Spec in Sync

Your OpenAPI spec says one thing and your handlers do another. This workflow reconciles the drift between spec and code, hardens each endpoint with request validation and standardized error handling, then classifies every change as breaking or non-breaking so you know exactly what the release does to consumers.

1 Plugin
3 Steps
01

Reconcile the spec with the code

AKapi-contract-keeper

Point spec-sync at your OpenAPI or GraphQL file and it compares every documented endpoint against the actual handlers. It surfaces missing routes, undocumented parameters, wrong types, and stale response shapes, then reconciles the spec so it matches what the code really does.

$/spec-syncopenapi.yaml
Drift reportReconciled specUndocumented routes
02

Harden the endpoints

AKapi-contract-keeper

Take a handler that reconciled cleanly and make it production-ready. harden-endpoint adds request validation, wraps failures in RFC 9457 problem+json error envelopes, and applies idempotency keys, pagination, and rate-limit headers where they belong.

$/harden-endpointsrc/routes/orders.js
Request validationRFC 9457 errorsIdempotency keys
03

Classify changes before release

AKapi-contract-keeper

Before you tag the release, run version-guard over the diff to sort every change into breaking versus non-breaking. It flags removed fields, tightened validation, and altered response shapes that would break existing consumers, so you bump the version correctly and warn clients ahead of time.

$/version-guardv1.4.0..HEAD
Breaking-change listSemver verdictConsumer impact

Getting the most out of this workflow

Run /spec-sync first and treat its output as the source of truth. Reconciling the spec before you harden means you harden against the real contract, not the stale one.

Point /harden-endpoint at one handler at a time. Reviewing the validation schema and problem+json envelope per endpoint catches wrong assumptions before they spread across the codebase.

Give /version-guard a git range that spans the whole release, not just the last commit. A change is only non-breaking relative to what consumers last saw, so compare against the previously shipped tag.

Plugins in this workflow

AK
api-contract-keeper
Steps 1-3: sync, harden, and gate
Install all at once
/plugin install api-contract-keeper

Prerequisites

Claude Code installed and running
ClaudeRegistry marketplace added
~
An API with a spec file (OpenAPI/Swagger or GraphQL)
i
Framework-agnostic: works with Express, Fastify, NestJS, FastAPI, Django REST, Spring, Gin, and Rails

Tags

APIOpenAPIcontractvalidationrelease

Have a workflow to share?

Submit your own use case and help other developers discover powerful plugin combinations.

Submit a Workflow →