api-versioning-strategy

api-versioning-strategy is a skill for Claude Code from secondsky/claude-skills. It costs 44 tokens per session (532 once invoked), scanned A, original, MIT.

A guide to managing multiple versions of an API, including URL, header, and query-parameter approaches. It also covers backward compatibility, breaking changes, deprecation notices, and migration paths.

In plain words
What is it for?
Use it when planning breaking changes, choosing a versioning method, supporting several API versions, or guiding clients from an old version to a new one.
Why use it?
It helps existing clients keep working while newer API versions are introduced and older versions are retired.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the api-versioning-strategy plugin — 1 skill shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/secondsky/claude-skills/api-versioning-strategy
Any agent
npx skills add secondsky/claude-skills --skill api-versioning-strategy
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code.

Or install api-versioning-strategy, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-versioning-strategy

README.md
[![agentmods](https://agentmods.dev/badge/skills/secondsky/claude-skills/api-versioning-strategy.svg)](https://agentmods.dev/skills/secondsky/claude-skills/api-versioning-strategy)
Your own site
<a href="https://agentmods.dev/skills/secondsky/claude-skills/api-versioning-strategy"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/api-versioning-strategy.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 532 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00532
Opus 5 $0.00022 $0.00266
Sonnet 5 $0.00009 $0.00106
Haiku 4.5 $0.00004 $0.00053

Measured 6d ago against content hash f96ed2bf67e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

api-versioning-strategy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/api-versioning-strategy/skills/api-versioning-strategy/SKILL.md · 84 lines

What it actually says

API Versioning Strategy

Choose and implement API versioning approaches with proper deprecation timelines.

Versioning Methods

Method Example Pros Cons
URL Path /api/v1/users Clear, cache-friendly URL clutter
Header API-Version: 1 Clean URLs Hidden, harder to test
Query ?version=1 Easy to use Not RESTful
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

Safe Changes (no version bump):

  • Adding optional fields
  • Adding new endpoints
  • Adding optional parameters

Breaking Changes (requires new version):

  • Removing fields
  • Changing field types
  • Restructuring responses
  • Removing endpoints

Deprecation Timeline

Phase Duration Actions
Deprecated 3 months Add headers, docs
Sunset Announced 3 months Email users
Read-Only 1 month Disable writes
Shutdown - Return 410 Gone

Best Practices

  • Support N-1 versions minimum
  • Provide 6+ months migration window
  • Include migration guides with code examples
  • Monitor version usage to inform deprecation
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 84 lines · 44 tokens per session scan A f96ed2bf67e5

Subscribe to this mod's changes

api-versioning-strategy is a skill published in the GitHub repository secondsky/claude-skills (214 stars, last pushed 3d ago), licensed MIT. It adds 44 tokens to every session and 532 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.