jyjeanne/ai-setup-forge/api-versioning-strategies

Claude Code and agent skill by jyjeanne/ai-setup-forge

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

To manage changes in API contracts without breaking existing clients, ensuring backward compatibility. Use when: When introducing breaking changes (renaming fields, changing data types, removing endpoints); When supporting mobile apps that cannot be forced to update immediately.

Install

npx vskill@latest install jyjeanne/ai-setup-forge/api-versioning-strategies

SKILL.md

The same SKILL.md was published earlier as jyjeanne/ai-setup-forge/api-versioning-strategies.

Purpose

To manage changes in API contracts without breaking existing clients, ensuring backward compatibility.

When to Use

  • When introducing breaking changes (renaming fields, changing data types, removing endpoints).
  • When supporting mobile apps that cannot be forced to update immediately.

Procedure

1. URI Versioning (Most Common)

Include version in the path. Clear and cache-friendly.

  • GET /api/v1/users
  • GET /api/v2/users

Implementation (Express):

javascript
const v1Router = require('./routes/v1');
const v2Router = require('./routes/v2');
app.use('/api/v1', v1Router);
app.use('/api/v2', v2Router);
2. Header Versioning

Cleaner URLs, but harder to test via browser.

  • Header: Accept-Version: v1

Implementation:

javascript
app.get('/users', (req, res) => {
const version = req.get('Accept-Version');
if (version === 'v2') return handlerV2(req, res);
return handlerV1(req, res);
});
3. Query Parameter

Easy for debugging.

  • GET /api/users?version=1
4. Deprecation Strategy
  1. Announce: Mark fields/endpoints as deprecated in docs.
  2. Sunset Header: Add Sunset: <Date> header to responses indicating when the version will be removed.
  3. Brownouts: Intentionally fail requests for short periods as EOL approaches to alert developers.

Constraints

  • Code Duplication: Managing multiple versions can lead to duplicated logic. Use "Controller-Service" pattern to share business logic where possible, applying adapters for the response format.
  • Maintenance: Limit supported versions (e.g., maintain only the last 2 major versions).

Expected Output

A stable API ecosystem where clients can upgrade at their own pace without service interruption.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/jyjeanne/ai-setup-forge/api-versioning-strategies/badge)](https://verified-skill.com/skills/jyjeanne/ai-setup-forge/api-versioning-strategies)

Something wrong with this skill or its page? Tell us.