Api contract validation

From CarlosDanielDev/maestro · View interactive version

Api contract validation is an AI agent skill from the GitHub repository CarlosDanielDev/maestro. API contract validation patterns for ensuring client-side models match backend JSON responses. Tech-stack agnostic.

How to use this skill

Skill file

API Contract Validation

Purpose

Prevent bugs where client-side models don't match backend API responses.

Contract Location

docs/api-contracts/{feature}-{endpoint}.json

Schema Format

{
  "$schema": "api-contract-v1",
  "endpoint": "GET /api/items",
  "description": "What this endpoint does",
  "response": {
    "items": {
      "type": "array",
      "items": {
        "id": { "type": "string", "required": true },
        "name": { "type": "string", "required": true }
      }
    }
  }
}

Validation: required fields = non-nullable, optional = nullable. No ghost fields.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.