versioning-and-evolution
APIs are forever once published: a consumer you've never met may depend on any field you expose. Design so you can **add without breaking**, and version explicitly when you must break.
$ npx -y skills add vanara-agents/skills --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
Context preview
The summary Claude sees to decide when to auto-load this agent.
APIs are forever once published: a consumer you've never met may depend on any field you expose. Design so you can **add without breaking**, and version explicitly when you must break.
Agent definition
versioning-and-evolution.mdVersioning & Evolution
APIs are forever once published: a consumer you've never met may depend on any field you expose. Design so you can **add without breaking**, and version explicitly when you must break.
Choosing a versioning strategy
| Strategy | Example | Pros | Cons | |---|---|---|---| | **URI path** | `/v1/orders` | Operationally clearest; trivial to route, cache, log | Version in every URL; "ugly" to purists | | **Header** | `Accept: application/vnd.api.v2+json` | Clean URLs; content-negotiation native | Invisible in logs/caches; easy to get wrong | | **Query param** | `/orders?version=2` | Simple | Pollutes caching; easy to omit |
**Default recommendation: URI path versioning** (`/v1/...`). It is the most operationally legible — you can see the version in every request log, route it at the gateway, and cache it cleanly. Reserve header-based versioning for APIs where URL stability is a hard requirement.
Version the **major** number only. Minor, backward-compatible changes ship within the same version.
Additive (safe) vs breaking (needs a new version)
**Safe — ship within the current version:**
- Adding a new endpoint.
- Adding a new **optional** request field (with a sensible default).
- Adding a new field to a response (clients must ignore unknown fields — the *tolerant reader* rule).
- Adding a new optional query parameter.
- Adding a new enum value **only if** clients are documented to tolerate unknown values.
**Breaking — requires a new major version:**
- Removing or renaming a field (request or response).
- Changing a field's type or its meaning.
- Making a previously optional request field required.
- Tightening validation so previously valid requests now fail.
- Changing default behavior, pagination style, or the error shape.
- Removing an endpoint or changing its URL/method.
The tolerant reader contract
Tell consumers, in the docs, that they **must ignore unknown fields** and tolerate new enum values. This single rule turns a whole class of otherwise-breaking changes (adding fields, adding enum members) into safe additive ones. State it explicitly — you cannot rely on behavior you never published.
Deprecation playbook
When a breaking change is unavoidable:
1. **Ship the new version** (`/v2`) alongside the old. Never break `/v1` in place. 2. **Announce** in the changelog and to known consumers, with a concrete sunset date. 3. **Signal at runtime.** Return a `Deprecation: true` header and a `Sunset: <date>` header on the old endpoints; optionally add a `Warning` header. 4. **Monitor usage** of the old version so you know who still depends on it. 5. **Sunset** only after traffic to the old version has fallen to near zero or the announced date passes.
Anti-patterns
- **Breaking `/v1` in place** "because only a few clients use that field" — you cannot know who depends
on it; that's the whole point of a published contract.
- **Versioning per endpoint** — a patchwork of `/orders/v2` and `/users/v3` is unnavigable. Version the
API surface, not individual routes.
- **Infinite versions** — every major version is an operational and support cost. Deprecate aggressively
once a successor is stable.
Read more
Versioning & Evolution
APIs are forever once published: a consumer you've never met may depend on any field you expose. Design so you can **add without breaking**, and version explicitly when you must break.
Choosing a versioning strategy
| Strategy | Example | Pros | Cons | |---|---|---|---| | **URI path** | `/v1/orders` | Operationally clearest; trivial to route, cache, log | Version in every URL; "ugly" to purists | | **Header** | `Accept: application/vnd.api.v2+json` | Clean URLs; content-negotiation native | Invisible in logs/caches; easy to get wrong | | **Query param** | `/orders?version=2` | Simple | Pollutes caching; easy to omit |
**Default recommendation: URI path versioning** (`/v1/...`). It is the most operationally legible — you can see the version in every request log, route it at the gateway, and cache it cleanly. Reserve header-based versioning for APIs where URL stability is a hard requirement.
Version the **major** number only. Minor, backward-compatible changes ship within the same version.
Additive (safe) vs breaking (needs a new version)
**Safe — ship within the current version:**
- Adding a new endpoint.
- Adding a new **optional** request field (with a sensible default).
- Adding a new field to a response (clients must ignore unknown fields — the *tolerant reader* rule).
- Adding a new optional query parameter.
- Adding a new enum value **only if** clients are documented to tolerate unknown values.
**Breaking — requires a new major version:**
- Removing or renaming a field (request or response).
- Changing a field's type or its meaning.
- Making a previously optional request field required.
- Tightening validation so previously valid requests now fail.
- Changing default behavior, pagination style, or the error shape.
- Removing an endpoint or changing its URL/method.
The tolerant reader contract
Tell consumers, in the docs, that they **must ignore unknown fields** and tolerate new enum values. This single rule turns a whole class of otherwise-breaking changes (adding fields, adding enum members) into safe additive ones. State it explicitly — you cannot rely on behavior you never published.
Deprecation playbook
When a breaking change is unavoidable:
1. **Ship the new version** (`/v2`) alongside the old. Never break `/v1` in place. 2. **Announce** in the changelog and to known consumers, with a concrete sunset date. 3. **Signal at runtime.** Return a `Deprecation: true` header and a `Sunset: <date>` header on the old endpoints; optionally add a `Warning` header. 4. **Monitor usage** of the old version so you know who still depends on it. 5. **Sunset** only after traffic to the old version has fallen to near zero or the announced date passes.
Anti-patterns
- **Breaking `/v1` in place** "because only a few clients use that field" — you cannot know who depends
on it; that's the whole point of a published contract.
- **Versioning per endpoint** — a patchwork of `/orders/v2` and `/users/v3` is unnavigable. Version the
API surface, not individual routes.
- **Infinite versions** — every major version is an operational and support cost. Deprecate aggressively
once a successor is stable.
🐒 Free agents, skills & packs for Claude Code One subscription. An army of Claude Code agents. 30 production-grade agents, skills, and packs for Claude Code — free, Apache-2.0, install with one command.
Repo: vanara-agents/skills
Other agents on vanara-agents-skills.
- AGENT
Use when designing a new HTTP/GraphQL API or changing an existing one — modeling resources, defining endpoint contracts, choosing status codes, pagination, filtering, error envelopes, versioning, and idempotency. Produces a reviewable API contract plus an OpenAPI snippet, not
Open agent - review-notes
This shows how the api-designer agent reviews a flawed draft. Findings are severity-ranked so the implementer fixes the contract-breakers first. Severity legend: **CRITICAL** (breaks clients / data risk), **HIGH** (real bug or inconsistency), **MEDIUM** (maintainability),
Open agent - contract-and-openapi
The contract is the deliverable. Express it as an **OpenAPI 3.1** document so it is human-readable *and* machine-checkable. This reference covers how to structure that document and what `scripts/lint-openapi.mjs` enforces.
Open agent - design-checklist
Run through this before declaring an API contract done. It is ordered the way you should *design*: resources first, cross-cutting rules last. Every box is a place real APIs go wrong in production.
Open agent - pr-comment-template
Copy-paste templates for leaving review comments. Keep each comment to one finding: an anchor, the problem, and the fix.
Open agent - sample-review-output
A complete review of a hypothetical PR, in the standard format. Use this as the model for tone, structure, and the anchor → problem → fix pattern.
Open agent

