api-versioning-strategy
Implements API versioning using URL paths, headers, or query parameters with backward compatibility and deprecation strategies. Use when managing multiple API versions, planning breaking changes, or designing migration paths.
npx skills add majiayu000/claude-skill-registry --skill api-versioning-strategy --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 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 | ## URL Path Versioning (Recommended) ```javascript const v1Router = require('./routes/v1'); const v2Router = require('./routes/v2'); app.use('/api/v1', v1Router); app.use('/api/v2', v2Router); ``` ## Version Adapter Pattern ```javascript // Transform between versions const v1ToV2 = (v1Response) => ({ data: { type: 'user', id: v1Response.user_id, attributes: { name: v1Response.user_name, email: v1Response.email } } }); ``` ## Deprecation Headers ```javascript 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 par
- Versioning Methods
- URL Path Versioning (Recommended)
- Version Adapter Pattern
- Deprecation Headers
- Safe vs Breaking Changes
- Deprecation Timeline
- Best Practices
What does the api-versioning-strategy skill do?
Implements API versioning using URL paths, headers, or query parameters with backward compatibility and deprecation strategies. Use when managing multiple API versions, planning breaking changes, or designing migration paths.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-versioning-strategy --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.
