Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when adding or evolving the version scheme of a resource-style HTTP API: put a single integer major as a `/v2/` leading path prefix, bump the major only on a breaking change while additive changes keep the version, serve the old and new majors in parallel behind Deprecation and Sunset response headers, and version the whole API as one unit — which cheaper models do not do by default. Do NOT use for library or package release numbers (SemVer), for generic REST resource-and-collection URL naming, or for documenting operations in an OpenAPI schema.
.claude/skills/api-versioning/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 11 |
| Model | Lift | Δ tokens | Δ turns | Cases | Verified |
|---|---|---|---|---|---|
| gemini-3.6-flashbest | +16% | +24% | 0% | 25 | 54d ago |
| gemini-3.5-flash | pending re-run | — | |||
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-22 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-21 | ✗→✓ | ▲ Improved | — | — |
| case-07 | ✓→✓ | = Same ✓ | — | — |
Version a resource-style HTTP API by a single integer major carried as the leading path segment (/v1/…, /v2/…). A new major is minted only for a client-breaking change; backward-compatible additions stay in the current major. The outgoing major keeps serving in parallel through a deprecation window signaled by Deprecation and Sunset response headers, and one version spans the whole API. Apply when designing or evolving an API's version scheme; not for library release numbers, generic resource URL naming, or OpenAPI operation authoring.
/v2/orders, /v2/customers/17. It is not a query parameter (?version=2, ?v=2), not a header-only scheme, and not a segment buried after the resource (/orders/v2).
v-prefixed. The token is the letter v followed by a single wholenumber: v1, v2, v3. No dotted form ever appears in the URL — never /v2.1/, never /v1.4.0/. Minor and patch numbers do not belong in the path.
v1 → v2) only when a changewould break existing callers: removing or renaming a field, changing a field's type, making an optional input required, tightening validation, or changing the meaning of a status code. A new major is a rare, deliberate event.
optional query parameter, or a new field in a response is backward-compatible and ships inside the SAME major. You never mint a new major just because functionality was added.
frozen against breaking edits. A breaking change ships as a NEW major served alongside the old one — you do not alter the responses the current major already returns.
keeps serving. Mark the outgoing major with a Deprecation response header and give its shutdown date in a Sunset response header. Callers migrate during the window; only after it closes does the old major stop.
the whole surface goes from /v1/… to /v2/… at once. You do not version endpoint by endpoint (/orders on one number while /customers sits on another).
Placement — the ad-hoc defaults, then the conforming route:
BEFORE GET /orders?version=2 GET /orders/v2/items
AFTER GET /v2/orders GET /v2/orders/itemsIdentifier — release number in the path vs. the integer major:
BEFORE GET /v2.1.0/customers
AFTER GET /v2/customers (drop the minor and patch from the URL)Additive change — needless bump vs. staying put:
BEFORE added an optional discount field → published everything under a fresh major
AFTER added an optional discount field → stays in the current major (it breaks no caller)Breaking change — edit in place vs. a new major:
BEFORE deleted the legacy_total field from the current major's invoice response
AFTER left the current major untouched; the field is gone only in the new major served beside itDeprecation — hard cutover vs. a signaled window:
BEFORE switched the old major off the day the new one shipped
AFTER old major keeps serving with
Deprecation: true
Sunset: Wed, 01 Oct 2025 00:00:00 GMTWhole-API scope — per-endpoint drift vs. one cutover:
BEFORE /customers/v2 while /orders is still on its first number
AFTER one move: /v2/customers and /v2/orders together/healthz, /openapi.json) may sit outside theversioned prefix.
v1, not v0 and not an unversioned path you retrofit later./vN/ path segment. Don't pass it as ?version= / ?v=./v1.2.3/ or /v2.0/ — the full release number in the path; only the integer major belongs.?api_version=2 / ?version=2 — the version as a query parameter instead of a path prefix.Deprecation/Sunset headers./vN/ path segment, integer major only.Deprecation + Sunset response headers.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-24 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-25 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +16 percentage points is the difference between those two pass rates over the 25 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.5-flash | verified | 7/10/2026 | +32% |
Other measured skills in the registry, with their headline benchmark lift.