Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Version REST and GraphQL APIs. Use when a user asks to version an API, handle breaking changes, implement API deprecation, manage multiple API versions, or design an API evolution strategy.
.claude/skills/terminalskills-api-versioning/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 18% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 86% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 42% | 0% |
APIs evolve, but breaking changes break clients. This skill covers versioning strategies (URL path, headers, query params), deprecation workflows, backwards-compatible changes, and migration patterns for REST and GraphQL APIs.
typescript// routes/v1/projects.ts — Version 1 routes import { Router } from 'express' const v1Router = Router() v1Router.get('/projects', async (req, res) => { const projects = await db.project.findMany() // V1 returns flat array res.json(projects) }) // routes/v2/projects.ts — Version 2 with pagination const v2Router = Router() v2Router.get('/projects', async (req, res) => { const { cursor, limit = 20 } = req.query const projects = await db.project.findMany({ take: Number(limit) + 1, cursor: cursor ? { id: String(cursor) } : undefined, }) const hasMore = projects.length > Number(limit) if (hasMore) projects.pop() // V2 returns paginated envelope res.json({ data: projects, pagination: { nextCursor: hasMore ? projects[projects.length - 1].id : null, hasMore, }, }) }) // app.ts — Mount versions app.use('/v1', v1Router) app.use('/v2', v2Router)
These changes are SAFE (no version bump needed):
These changes REQUIRE a new version:
typescript// Adding a field is backwards-compatible // V1 response: { id, name, status } // V1.1 response: { id, name, status, taskCount } ← safe, old clients ignore new field // Changing structure is BREAKING // V1 response: [{ id, name }] // V2 response: { data: [{ id, name }], pagination: {} } ← new version required
typescript// middleware/deprecation.ts — Warn clients about deprecated versions export function deprecationMiddleware(version: string, sunsetDate: string) { return (req, res, next) => { res.set('Deprecation', 'true') res.set('Sunset', sunsetDate) // RFC 8594 res.set('Link', `</v2${req.path}>; rel="successor-version"`) console.log(`[DEPRECATION] ${req.method} /v${version}${req.path} from ${req.ip}`) next() } } // Usage app.use('/v1', deprecationMiddleware('1', 'Sat, 01 Jun 2026 00:00:00 GMT'), v1Router)
markdown# API Changelog ## v2.0.0 (2025-03-01) ### Breaking Changes - `GET /projects` now returns paginated response `{ data: [], pagination: {} }` - Removed `GET /projects/all` (use pagination instead) ### Migration Guide - Update response parsing to read `response.data` instead of `response` directly - Implement cursor-based pagination for large datasets - v1 sunset date: June 1, 2026 ## v1.3.0 (2025-02-15) ### Added - `taskCount` field in project responses - `GET /projects/{id}/activity` endpoint
/v1/, /v2/) is simplest and most widely adopted.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | pass→pass | 8,938 | 5,379 | -40% | 1 | 1 | 0% | 2,142 | 2,527 | +18% | 0 | 0 | — |
case-01 | pass→pass | 4,879 | 4,620 | -5% | 1 | 1 | 0% | 1,043 | 1,943 | +86% | 0 | 0 | — |
case-03 | pass→pass | 7,305 | 5,088 | -30% | 1 | 1 | 0% | 1,482 | 2,111 | +42% | 0 | 0 | — |
case-04 | pass→pass | 7,857 | 6,505 | -17% | 1 | 1 | 0% | 1,524 | 2,312 | +52% | 0 | 0 | — |
case-05 | pass→pass | 9,275 | 7,568 | -18% | 1 | 1 | 0% | 1,748 | 2,422 | +39% | 0 | 0 | — |
case-06 | pass→pass | 8,751 | 4,470 | -49% | 1 | 1 | 0% | 1,392 | 1,863 | +34% | 0 | 0 | — |
case-07 | pass→pass | 5,903 | 4,645 | -21% | 1 | 1 | 0% | 1,133 | 1,952 | +72% | 0 | 0 | — |
case-08 | pass→pass | 22,552 | 8,089 | -64% | 1 | 1 | 0% | 2,036 | 2,459 | +21% | 0 | 0 | — |
case-09 | pass→pass | 9,269 | 4,568 | -51% | 1 | 1 | 0% | 1,760 | 1,840 | +5% | 0 | 0 | — |
case-10 | pass→pass | 12,909 | 8,099 | -37% | 1 | 1 | 0% | 2,706 | 2,684 | -1% | 0 | 0 | — |
case-11 | pass→pass | 8,189 | 4,091 | -50% | 1 | 1 | 0% | 1,483 | 1,718 | +16% | 0 | 0 | — |
case-12 | pass→pass | 16,396 | 13,197 | -20% | 1 | 1 | 0% | 2,762 | 3,494 | +27% | 0 | 0 | — |
case-13 | fail→pass | 13,716 | 8,631 | -37% | 1 | 1 | 0% | 2,301 | 2,688 | +17% | 0 | 0 | — |
case-14 | pass→pass | 9,102 | 4,576 | -50% | 1 | 1 | 0% | 1,593 | 1,734 | +9% | 0 | 0 | — |
case-15 | pass→pass | 7,955 | 4,564 | -43% | 1 | 1 | 0% | 1,303 | 1,795 | +38% | 0 | 0 | — |
case-16 | pass→pass | 12,587 | 4,171 | -67% | 1 | 1 | 0% | 2,083 | 1,736 | -17% | 0 | 0 | — |
case-17 | fail→pass | 10,865 | 7,641 | -30% | 1 | 1 | 0% | 1,863 | 2,444 | +31% | 0 | 0 | — |
case-18 | pass→pass | 8,007 | 3,985 | -50% | 1 | 1 | 0% | 1,349 | 1,809 | +34% | 0 | 0 | — |
case-19 | pass→pass | 14,423 | 8,416 | -42% | 1 | 1 | 0% | 2,178 | 2,276 | +4% | 0 | 0 | — |
case-20 | pass→pass | 7,511 | 6,959 | -7% | 1 | 1 | 0% | 1,364 | 2,284 | +67% | 0 | 0 | — |
case-21 | pass→pass | 17,016 | 11,561 | -32% | 1 | 1 | 0% | 3,053 | 3,342 | +9% | 0 | 0 | — |
case-22 | pass→pass | 17,630 | 16,133 | -8% | 1 | 1 | 0% | 2,634 | 3,475 | +32% | 0 | 0 | — |
case-23 | pass→pass | 14,547 | 11,580 | -20% | 1 | 1 | 0% | 3,040 | 3,552 | +17% | 0 | 0 | — |
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. 23 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.