com um clique
api-versioning
Design a versioning and deprecation strategy for an API.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Design a versioning and deprecation strategy for an API.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
| slug | api-versioning |
| name | API Versioning |
| version | 0.2.0 |
| description | Design a versioning and deprecation strategy for an API. |
| category | dev-tools |
| tags | ["api","versioning","backward-compatibility","design"] |
| inputs | [{"name":"api_type","type":"string","required":true,"description":"REST, GraphQL, gRPC, etc."},{"name":"breaking_changes","type":"string","required":false,"description":"Known or anticipated breaking changes"}] |
| output | {"format":"markdown","description":"Versioning strategy with URL/header design and deprecation policy."} |
| author | badhope |
| license | MIT |
| created | "2026-06-21T00:00:00.000Z" |
| updated | "2026-06-22T00:00:00.000Z" |
Launching a public API, planning a breaking change, or standardizing versioning.
Describe the API type and any breaking changes.
A versioning strategy with mechanism, deprecation policy, and migration guide outline.
Design an API versioning strategy.
Cover:
1. Versioning mechanism: URL path, header, query param, or content negotiation
2. Version lifecycle: current, deprecated, sunset
3. Breaking-change policy: what counts as breaking
4. Deprecation communication: headers, docs, emails, SDK changelogs
5. Migration guide template
6. Exception handling: when to allow unversioned requests
Output in a format ready for an API design doc.
# API Migration Guide: v{N} → v{N+1}
## TL;DR
[一句简洁的迁移原因说明]
## Timeline
- **{date}**: v{N+1} 发布
- **{date}**: v{N} 进入 deprecated(收到 Sunset 头)
- **{date}**: v{N} 将返回 410 Gone
## What's Changed
### Breaking Changes
| 变更 | 旧写法 | 新写法 | 迁移代码 |
|------|--------|--------|----------|
| 字段重命名 | `name` | `full_name` | `obj.full_name = obj.name` |
### New Features
| 功能 | 说明 | 文档链接 |
|------|------|----------|
| Batch 操作 | 单请求处理多个资源 | [链接](#) |
## Step-by-Step Migration
### Step 1: Update SDK
```bash
pip install stripe==13.0.0
# Before
charge = stripe.Charge.create(amount=1000, currency='usd')
# After
charge = stripe.Charge.create(amount=1000, currency='usd', automatic_payment_methods={'enabled': true})
stripe test --api-version 2024-01-01
# Example
**Input:**
api_type: REST breaking_changes: 'Removing enum values, changing field semantics'
**Output:**
```markdown
## Mechanism
URL path: `/v1/resources`, `/v2/resources`.
## Lifecycle
- Current: latest stable version
- Deprecated: 6-month notice, `Sunset` header in responses
- Sunset: returns 410 Gone with migration link
## Breaking Changes
Require a new major version: removing fields, changing types, removing enum values.
These are the bugs that bite every new user. Check them before shipping:
Breaking changes without version bump: Removing fields, changing types, or removing enum values without a new version breaks existing clients.
No deprecation headers: Clients continue using old versions indefinitely without Sunset, Deprecation, or Link headers.
URL versioning but no migration path: Putting version in URL (/v1/) without a clear deprecation policy leaves clients stranded.
Header versioning with wrong cache semantics: Using header-based versioning but not setting Vary: Accept causes cached responses to be served to wrong versions.
Vary: Accept header when using content negotiation versioningReview code changes and report issues by severity with actionable fixes.
Sharpen a fuzzy intention into one measurable objective string that drives the rest of the work.
Convert a Prompt Flow PRS pipeline submission to run a Microsoft Agent Framework workflow.
Build a Model Context Protocol (MCP) server that lets an LLM call into external tools and resources.
Summarize PDF documents into concise bullet-point digests.
Bump a dependency version across a pnpm workspace and update lockfile.