api-versioning
/api-versioning
Use when a ticket must change an API in a way clients might notice — renaming or removing a field, changing a type or status code, altering semantics — and the change must be made compatibly or through an explicit version with a deprecation path, never as a silent break. Invoke for "change the response shape", "rename the field", "we need v2", "deprecate the old endpoint", or when a contract test fails on purpose.
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 29.09.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Use when a ticket must change an API in a way clients might notice — renaming or removing a field, changing a type or status code, altering semantics — and the change must be made compatibly or through an explicit version with a deprecation path, never as a silent break. Invoke for "change the response shape", "rename the field", "we need v2", "deprecate the old endpoint", or when a contract test fails on purpose.
Triggers from the description
Original author description
Use when a ticket must change an API in a way clients might notice — renaming or removing a field, changing a type or status code, altering semantics — and the change must be made compatibly or through an explicit version with a deprecation path, never as a silent break. Invoke for "change the response shape", "rename the field", "we need v2", "deprecate the old endpoint", or when a contract test fails on purpose.
How it works
- Steps
- Done when
- Anti-patterns
- Capture lore
SKILL.md preview
--- name: api-versioning description: Use when a ticket must change an API in a way clients might notice — renaming or removing a field, changing a type or status code, altering semantics — and the change must be made compatibly or through an explicit version with a deprecation path, never as a silent break. Invoke for "change the response shape", "rename the field", "we need v2", "deprecate the old endpoint", or when a contract test fails on purpose. stack: [node, python, go, java, rust, csharp, kotlin, ruby] area: backend --- # Version an API change API clients are code you do not control, running versions you cannot see. Change compatibly by default: add, do not remove; widen what you accept, do not narrow what you return. When a break is unavoidable, ship a new version beside the old one, announce the deprecation in machine-readable headers, and remove the old version only on a published date. ## Steps 1. **Classify the change** against Google AIP-180 and the Microsoft REST guidelines. Compatible: a new endpoint; a new optional request field whose absence keeps the old behaviour; a new response field; accepting more input. Breaking: - removing or renaming a field, endpoint, enum value or query parameter; - changing a type, format, unit, or the serialisation of a value; - making an optional request field required, or adding a required one; - changing a default, a status code, an error code or the error body shape; - no longer populating a field that used to be populated; - same shape, different meaning (semantic break). A new value in a response enum breaks clients with exhaustive switches unless the contract already says the enum is extensible. When in doubt, it is breaking. 2. **Find the consumers.** Call `search_lore` for the versioning scheme and declared consumers, and `find_dependents` for the declared cross-repo consumers of the contract (an empty result is not proof of safety). Use the Grep tool for in-repo callers, generated clients and contract tests. Record who is affected. 3. **Take the compatible path when one exists.** Add the new field beside the old and populate both; accept old and new inputs; keep old defaults. Most "we need v2" tickets are an additive change plus a deprecation. 4. **If you must break, use the repo's one versioning mechanism** (URL major version `/v2/`, a header, or a dated `api-version` parameter); never add a second scheme. The versions share one domain implementation with a thin adapter per version at the edge, not a copied handler tree. An unsupported version gets a clear error listing the supported ones, in the repo's envelope (e.g. `400` for a bad `api-version` value, `404` for an unknown `/vN/` prefix). 5. **Pin every live version with contract tests** (the `contract-test` skill): the old version's response is asserted unchanged (field names, types, status codes, error body), and the new version's shape is asserted. Update the OpenAPI document for each version (the `openapi-contract` skill). 6. **Deprecate in machine-readable form.** On every response from the deprecated version or endpoint: `Deprecation: @<unix-seconds>` (RFC 9745), `Sunset: <HTTP-date>` (RFC 8594), and `Link: <doc-url>; rel="deprecation"`. Log each deprecated call with the caller identity so stragglers can be found; add a CHANGELOG entry. When external consumers exist, get the removal date through `request_decision`; do not invent one. 7. **Migrate the in-repo consumers you own** in the same epic; a version no internal client uses is untested. 8. **Retire only on the date**, via the `deprecate-and-remove` skill: usage confirmed zero, the old version answers `410 Gone` with a pointer to the replacement, then the code is deleted. 9. **Evidence** with the `record-evidence` skill: the classification and why, the consumer list, both contract tests passing, and a sample response showing the deprecation headers. ## Done when - The change is classified in writing, with the consumer search attached. - No existing version changed shape, semantics, status codes or error body. - Each live version has a passing contract test and an accurate OpenAPI entry. - Deprecated surfaces emit `Deprecation`, `Sunset` and `Link` headers; the date was decided, not assumed. ## Anti-patterns - "It's only a rename" shipped in place; changing a default "because it's better". - Returning `null` for a field that used to be populated to "remove" it. - A `v2` directory that copy-pastes every handler and drifts from `v1`. - Removing the old version before usage logs show zero callers. ## Capture lore This skill is one of the places durable, reusable knowledge naturally surfaces: **While classifying the change you learn the versioning scheme, who consumes each version and the deprecation dates already promised.** That kind of fact is *lore*. Capture it via the **lore-capture protocol in your brief** (`CLAUDE.factory.md`, step 11 "Memory contribution"): call the Memory MCP `suggest_lore` once at the close of your work — reusable conventions, gotchas, decisions, and boundaries only, never per-ticket trivia.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · tmj-90/gaffer | 90 | Apache-2.0 |
| TerminalSkills/skills | 100 | Apache-2.0 |
| claude-dev-suite/claude-dev-suite | 100 | MIT |
| rrezartprebreza/spring-boot-skills | 100 | MIT |
| rrezartprebreza/spring-boot-skills | 100 | MIT |
| codewithmukesh/dotnet-claude-kit | 100 | MIT |
| ThibautBaissac/rails_ai_agents | 100 | MIT |
| Amey-Thakur/AI-SKILLS | 90 | MIT |
Database snapshot: 13.11.2026 · package version 326978a06d9d (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90api-versioning-strategist
Produces an API version scheme (date-pinned header or URI), a breaking-vs-additive change policy, and a published deprecation/sunset timeline with translation shims. Use when removing or renaming a field or endpoint, tightening validation, cutting a "v2", binding a partner… - 100api-contract-versioning
Use when modifying an API endpoint, schema or contract consumed elsewhere - renaming/removing/restructuring a request or response field, pagination or envelope change, "field X must become", "le champ X doit devenir", introducing a breaking change, versioning an API, or… - 100api-versioning-helper
Advises on API versioning strategies, designs deprecation flows, generates migration guides, and handles breaking vs non-breaking change classification. Use whenever the user asks about API versioning, "how to version my API", "URI vs header versioning", "breaking changes",… - 100api-design
Design or review an HTTP API as a contract (resources, status codes, one error shape, pagination, idempotent writes, versioning). Use it whenever you add or change an endpoint, a field or an error format, write an OpenAPI document, or need to know whether a change breaks clients. - 100api-contract
This skill should be used when the user edits or reviews an API contract or anything that shapes one (OpenAPI or Swagger files, GraphQL schemas or resolvers, serializers such as ActiveModel::Serializer, jbuilder, Blueprinter, Django REST Framework serializers, Laravel API… - 100api-contract
Design, change or consume an HTTP API without breaking the clients you cannot see. Use when adding endpoints, changing a response shape, introducing versioning, pagination, idempotency or error codes, when a mobile client will lag behind the server, or when a "small" response…