api-versioning
Implement API versioning strategies for backward compatibility. Covers URL versioning, header versioning, and deprecation workflows.
npx skills add majiayu000/claude-skill-registry --skill api-versioning --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# API Versioning Evolve your API without breaking existing clients. ## When to Use This Skill - Public APIs with external consumers - Mobile apps (can't force updates) - Breaking changes to existing endpoints - Long-term API maintenance ## Versioning Strategies ### 1. URL Path Versioning (Recommended) ``` GET /api/v1/users GET /api/v2/users ``` Pros: Clear, cacheable, easy to route Cons: URL pollution ### 2. Header Versioning ``` GET /api/users Accept: application/vnd.myapp.v2+json ``` Pros: Clean URLs Cons: Harder to test, not cacheable by URL ### 3. Query Parameter ``` GET /api/users?version=2 ``` Pros: Simple Cons: Easy to forget, caching issues ## TypeScript Implementation ### Version Router ```typescript // version-router.ts import { Router, Request, Response, NextFunction } from 'express'; type VersionHandler = (req: Request, res: Response, next: NextFunction) => void; interface VersionedRoute { v1?: VersionHandler; v2?: VersionHandler; v3?: VersionHandler; default: VersionHandler; } class VersionRouter { private router = Router(); private currentVersion = 'v2'; private supportedVersions = ['v1', 'v2']; private deprecatedVersions = ['v1']; constructor() { // Add version detec
- When to Use This Skill
- Versioning Strategies
- 1. URL Path Versioning (Recommended)
- 2. Header Versioning
- 3. Query Parameter
- TypeScript Implementation
- Version Router
- Usage Example
- Version Middleware (Header-based)
- Python Implementation
- FastAPI Usage
- Deprecation Workflow
- 1. Announce Deprecation
- 2. Log Usage
What does the api-versioning skill do?
Implement API versioning strategies for backward compatibility. Covers URL versioning, header versioning, and deprecation workflows.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-versioning --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
