Skip to content
secondsky avatar

Api Versioning Strategy

Concrete guide to choosing, implementing, and deprecating API versions across URL path, header, and query methods.

CCM score
54 of 100
skills.sh installs
421
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers three versioning methods (URL path, header, query) with their tradeoffs, plus safe versus breaking change classification
  • Includes JavaScript examples for path-based routers, a version adapter that maps v1 responses to v2 shape, and Deprecation and Sunset headers
  • Provides a four-phase deprecation timeline: deprecated, sunset announced, read-only, then shutdown returning 410 Gone
  • Designed for teams managing multiple API versions that need to plan breaking changes and migration paths

Install

$ npx -y skills add secondsky/claude-skills --skill api-versioning-strategy -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

API Versioning Strategy

Choose and implement API versioning approaches with proper deprecation timelines.

Versioning Methods

MethodExampleProsCons
URL Path/api/v1/usersClear, cache-friendlyURL clutter
HeaderAPI-Version: 1Clean URLsHidden, harder to test
Query?version=1Easy to useNot RESTful

URL Path Versioning (Recommended)

const v1Router = require('./routes/v1');
const v2Router = require('./routes/v2');

app.use('/api/v1', v1Router);
app.use('/api/v2', v2Router);

Version Adapter Pattern

// Transform between versions
const v1ToV2 = (v1Response) => ({
  data: {
    type: 'user',
    id: v1Response.user_id,
    attributes: {
      name: v1Response.user_name,
      email: v1Response.email
    }
  }
});

Deprecation Headers

app.use('/api/v1', (req, res, next) => {
  res.setHeader('Deprecation', 'true');
  res.setHeader('Sunset', 'Sat, 01 Jun 2025 00:00:00 GMT');
  res.setHeader('Link', '</api/v2>; rel="successor-version"');
  next();
});

Safe vs Breaking Changes

Details

Repository
github.com/secondsky/claude-skills
Categories
Backend & APIs, Technical Documentation
First seen
Jun 3, 2026

Questions

What does the api-versioning-strategy skill do?

It helps an agent implement API versioning using URL paths, headers, or query parameters, with backward compatibility and deprecation strategies. It covers planning breaking changes, designing migration paths, and adding deprecation headers and timelines.

How do I install the api-versioning-strategy skill?

Run npx -y skills add secondsky/claude-skills --skill api-versioning-strategy -y in your project. The skill then lets the agent plan version changes and set up deprecation for your API.

Where does api-versioning-strategy stand in the Backend & APIs category?

It sits in the Backend & APIs category on Claude Marketplaces, alongside skills such as neon and workers-best-practices. It focuses on API version management, which those skills do not cover in their own listings.

Which versioning method does the skill recommend?

The skill recommends URL path versioning, such as /api/v1/users, because it is clear and cache-friendly. It also lists header and query parameter versioning with their trade-offs.

Which changes need a new API version according to this skill?

The skill treats removing fields, changing field types, restructuring responses and removing endpoints as breaking changes that need a new version. Adding optional fields, endpoints or parameters is safe and needs no version bump.

More from secondsky/claude-skills

All 116

Similar to Api Versioning Strategy

More Backend & APIs