← ClaudeAtlas

api-contractslisted

Design and evolve the contracts that cross a service boundary — synchronous APIs and published events — specification first. Covers resource and operation modelling, OpenAPI and AsyncAPI as source of truth, backward-compatible evolution and versioning, RFC 9457 problem details, idempotency keys, pagination and filtering, and event schema compatibility modes. Use when adding or changing an endpoint, message, or published event, when reviewing a schema, or when the user says 'API design', 'contract', 'OpenAPI', 'AsyncAPI', 'versioning', 'breaking change', 'REST', or 'event schema'. This skill governs what crosses a boundary — not where boundaries fall (see service-boundaries), not how contracts are verified (see contract-testing).
parvez3019/ai-coding-microservices-skills · ★ 1 · API & Backend · score 70
Install: claude install-skill parvez3019/ai-coding-microservices-skills
# API Contracts A contract is the only part of a service that is genuinely hard to change, because you do not control who depends on it or when they will redeploy. Everything behind it is refactorable; everything in it is a promise. Design it deliberately, and evolve it additively. The contract is written **before** the implementation, and the specification is the source of truth — not a document generated afterwards from whatever the code happened to return. ## Config Resolution 1. Read `.msskills/config.yaml` in the repo root; look up `paths.api`. 2. A custom document exists at that path → read its frontmatter `mode`: - `override` → use it alone as the API standard; ignore the defaults below. - `overlay` (default, or no `mode` key) → read [defaults](./references/defaults.md) first, then apply the custom document's sections on top, matched by exact heading; new sections append. 3. A path is configured but no file exists there → say which path is missing, then use the defaults. 4. No config file or no `paths.api` key → use [defaults](./references/defaults.md). 5. `.msskills/stack.md` exists → use its protocol and tooling: REST, gRPC, or GraphQL; its serialisation format; its schema registry and compatibility mode; its spec linter. 6. An existing specification is in the repository → its conventions outrank these defaults. Match the API that exists rather than introducing a second style beside it. ## Self-Validation Checklist **STOP before presenting any