api-contract-doc-sync

Align API contracts with OpenAPI/Swagger documentation through automated checks.

Updated Nov 2, 2025
One-click install
npx skills add https://github.com/YuriGarciaRibeiro/API-notifications --skill api-contract-doc-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-contract-doc-sync
Source: https://github.com/YuriGarciaRibeiro/API-notifications/tree/main/.codex/skills/api-contract-doc-sync
Command: npx skills add https://github.com/YuriGarciaRibeiro/API-notifications --skill api-contract-doc-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires rg, find, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Maintains alignment between API contracts (payloads, responses, HTTP statuses), the implemented endpoints, and the textual documentation used in Swagger/OpenAPI. It is used whenever DTOs, commands/queries, validations, examples, or endpoint descriptions change to prevent drift between code and client-facing documentation.

Core Features & Use Cases

  • End-to-end synchronization: Detect impacted endpoints and ensure code, tests, and docs reflect the same contract.
  • Consistent documentation: Update payloads, responses, and status codes across endpoints and their OpenAPI descriptions and examples.
  • Guided workflow: Enforces a standard flow from code changes to documentation validation, with automated checks.

Quick Start

Run the contract-doc-sync workflow to verify and align API contracts with documentation.

Frequently Asked Questions about api-contract-doc-sync

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

FAQPage Schema
How do I prevent OpenAPI documentation drift when changing DTOs and endpoints?

To prevent OpenAPI documentation drift, run a contract-doc-sync workflow that detects impacted endpoints and verifies code contracts align with Swagger descriptions. It ensures DTOs, validations, and examples match client-facing docs.

What is the best way to sync API contracts with Swagger documentation after code changes?

The best way to sync API contracts with Swagger documentation is enforcing a standard workflow with automated checks. This verifies consistency between implemented payloads, responses, HTTP statuses, and OpenAPI textual descriptions.

Do I need specific tools to check API contract consistency across endpoints?

You need rg and find tools installed to check API contract consistency across endpoints. These dependencies allow the workflow scripts to locate and validate updated DTOs, commands, queries, and endpoint descriptions.

Can I detect which endpoints are impacted by API payload and validation changes?

Yes, you can detect which endpoints are impacted by API payload and validation changes. The workflow identifies affected endpoints and ensures code contracts, tests, and OpenAPI documentation reflect the exact same changes.

When should I run an API contract documentation sync workflow?

You should run an API contract documentation sync workflow whenever DTOs, commands, queries, validations, examples, or endpoint descriptions change. This prevents drift between code and client-facing Swagger surfaces.