From aj-geddes-useful-ai-prompts-4
Implements API versioning strategies including URL versioning, header versioning, backward compatibility, deprecation strategies, and migration guides for REST, GraphQL, and gRPC APIs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:api-versioning-strategyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
references/backward-compatibility-patterns.mdreferences/date-format.mdreferences/deprecation-strategy.mdreferences/graphql-versioning.mdreferences/grpc-versioning.mdreferences/javascripttypescript.mdreferences/migration-guide-example.mdreferences/pattern-1-version-agnostic-core.mdreferences/response-structure.mdreferences/testing-multiple-versions.mdreferences/version-detection-routing.mdreferences/versioning-approaches.mdscripts/validate-api.shtemplates/api-scaffold.yamlComprehensive guide to API versioning approaches, deprecation strategies, backward compatibility techniques, and migration planning for REST APIs, GraphQL, and gRPC services.
Minimal working example:
// express-router.ts
import express from "express";
const app = express();
// Version 1
app.get("/api/v1/users", (req, res) => {
res.json({
users: [{ id: 1, name: "John Doe" }],
});
});
// Version 2 - Added email field
app.get("/api/v2/users", (req, res) => {
res.json({
users: [{ id: 1, name: "John Doe", email: "[email protected]" }],
});
});
// Shared logic with version-specific transformations
app.get("/api/:version/users/:id", async (req, res) => {
const user = await userService.findById(req.params.id);
if (req.params.version === "v1") {
res.json({ id: user.id, name: user.name });
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Versioning Approaches | Versioning Approaches |
| Backward Compatibility Patterns | Backward Compatibility Patterns |
| Deprecation Strategy | Deprecation Strategy |
| Migration Guide Example | Migration Guide Example |
| Response Structure | Response Structure |
| Date Format | Date Format, Error Format |
| JavaScript/TypeScript | JavaScript/TypeScript, Python |
| GraphQL Versioning | GraphQL Versioning |
| gRPC Versioning | gRPC Versioning |
| Version Detection & Routing | Version Detection & Routing |
| Testing Multiple Versions | Testing Multiple Versions |
| Pattern 1: Version-Agnostic Core | Pattern 1: Version-Agnostic Core, Pattern 2: Feature Flags for Gradual Rollout, Pattern 3: API Version Metrics |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Implements API versioning via URL paths, headers, or query params with backward compatibility, deprecation headers, migration paths, and OpenAPI-based breaking change detection.
Writes an API versioning strategy document covering scheme selection, lifecycle policy, breaking-change classification, and migration templates.
Designs an API versioning policy (URL path, date-based, or header versioning) to evolve APIs without breaking existing consumers. Includes breaking vs. non-breaking change rules and version lifecycle policies.