Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

api-versioning-deprecation-plannerAPI versioning deprecation planner 文档

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

188

周安装

8

GitHub Stars

2

下载量

66
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:api-versioning-deprecation-planner(API versioning deprecation planner 文档)
来源仓库:https://github.com/monkey1sai/openai-cli
仓库路径:skills/api-versioning-deprecation-planner
安装命令:
npx skills add https://github.com/monkey1sai/openai-cli --skill api-versioning-deprecation-planner
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/monkey1sai/openai-cli --skill api-versioning-deprecation-planner

简介

api-versioning-deprecation-planner 用于辅助 API 设计和接口文档生成。

  • 适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿或检查字段命名。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 使用时需确认业务语义和鉴权方式,避免凭空补字段,最好从现有代码中提取事实。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

API Versioning & Deprecation Planner

Safely evolve APIs without breaking existing clients.

Versioning Strategies

URL Versioning (Recommended)

/api/v1/users
/api/v2/users

Pros: Clear, easy to route, simple to document Cons: URL pollution with many versions

Header Versioning

GET /api/users
Accept: application/vnd.api.v1+json

Pros: Clean URLs Cons: Harder to test, less visible

Query Parameter

/api/users?version=1

Pros: Easy to implement Cons: Not RESTful, easy to forget

Deprecation Timeline

# API Deprecation Plan: v1 → v2

## Timeline (6 months)

### Month 1: Announcement

- [ ] Publish deprecation notice in changelog
- [ ] Email all API consumers
- [ ] Add deprecation headers to v1 responses
- [ ] Update documentation with migration guide

### Month 2-4: Migration Period

- [ ] v2 fully available
- [ ] Both v1 and v2 supported
- [ ] Track v1 usage metrics
- [ ] Offer migration support

### Month 5: Final Warning

- [ ] Email reminder to remaining v1 users
- [ ] Increase deprecation warning visibility
- [ ] Offer 1-on-1 migration help

### Month 6: Sunset

- [ ] Disable v1 endpoints
- [ ] Return 410 Gone with migration instructions
- [ ] Monitor for issues

Deprecation Response Headers

HTTP/1.1 200 OK
Deprecation: true
Sunset: Sat, 31 Dec 2024 23:59:59 GMT
Link: <https://api.example.com/v2/users>; rel="alternate"
Warning: 299 - "This API version is deprecated. Migrate to v2 by Dec 31, 2024"

Breaking vs Non-Breaking Changes

Non-Breaking (Safe)

✅ Adding new endpoints ✅ Adding optional request parameters ✅ Adding fields to responses ✅ Adding new response status codes ✅ Making required fields optional

Breaking (Requires New Version)

❌ Removing endpoints ❌ Removing request parameters ❌ Removing response fields ❌ Changing field types ❌ Making optional fields required ❌ Changing authentication

Migration Guide Template

# Migration Guide: API v1 → v2

## What's Changing

### Authentication

**v1:** API Key in query param

GET /api/v1/users?api_key=xxx

**v2:** Bearer token in header

GET /api/v2/users Authorization: Bearer xxx

### Response Format
**v1:** Snake case

{"user_id": 123, "first_name": "John"}


**v2:** Camel case

{ "userId": 123, "firstName": "John" }


### Pagination

**v1:** Page-based

GET /api/v1/users?page=2&per_page=10


**v2:** Cursor-based

GET /api/v2/users?cursor=abc123&limit=10


## Step-by-Step Migration

### Step 1: Update Authentication

Replace query param auth with header-based:
  • axios.get('/api/v1/users?api_key=xxx')

+ axios.get('/api/v2/users', { + headers: { 'Authorization': 'Bearer xxx' } + })


### Step 2: Update Response Handling

Adjust field name casing:
  • const userId = data.user_id

+ const userId = data.userId


### Step 3: Update Pagination

Switch to cursor-based:
  • const nextPage = page + 1
  • fetch(/api/v1/users?page=${nextPage})

+ const cursor = data.meta.next_cursor + fetch(/api/v2/users?cursor=${cursor})


## Testing Your Migration

1. Test v2 in development

curl -H "Authorization: Bearer xxx" https://dev-api.example.com/v2/users

2. Run v1 and v2 side-by-side in staging

Compare responses for consistency

3. Gradual rollout in production

Route 10% → 50% → 100% traffic to v2


## Support Resources

- [API v2 Documentation](https://docs.example.com/v2)
- [Migration Examples Repo](https://github.com/example/v2-examples)
- [Support Channel](https://slack.example.com)

Backward Compatibility Strategies

1. Parallel Versions

Run v1 and v2 simultaneously:

app.use('/api/v1', v1Router);
app.use('/api/v2', v2Router);

2. Adapter Pattern

v1 calls v2 internally with adapter:

// v1 endpoint
router.get("/api/v1/users", async (req, res) => {
  // Call v2
  const v2Response = await v2Controller.getUsers(req);

  // Adapt v2 response to v1 format
  const v1Response = adaptV2ToV1(v2Response);

  res.json(v1Response);
});

3. Feature Flags

Gradual feature rollout:

if (req.version === "v2" && featureFlags.newPagination) {
  return cursorBasedPagination(req);
} else {
  return pageBasedPagination(req);
}

Client Communication Plan

Announcement Email Template

Subject: [ACTION REQUIRED] API v1 Deprecation - Migrate by Dec 31

Hi API Consumers,

We're deprecating API v1 on December 31, 2024. Please migrate to v2.

What's changing:
- Authentication: API keys → Bearer tokens
- Response format: snake_case → camelCase
- Pagination: page-based → cursor-based

Migration resources:
- Guide: https://docs.example.com/migration
- Examples: https://github.com/example/v2-examples
- Support: api-support@example.com

Timeline:
- Now: v2 available, v1 still works
- Oct 31: v1 will show deprecation warnings
- Dec 31: v1 will be shut down

Questions? Reply to this email.

Monitoring Migration Progress

// Track version usage
app.use((req, res, next) => {
  const version = req.path.includes('/v1') ? 'v1' : 'v2';
  metrics.increment('api.requests', { version });
  next();
});

// Dashboard metrics
- v1 requests/day: 10,000 → 5,000 → 1,000 → 0
- v2 requests/day: 0 → 5,000 → 9,000 → 10,000
- Unique v1 consumers: 50 → 25 → 5 → 0

Rollback Plan

## If Migration Goes Wrong

### Symptoms

- Spike in 5xx errors
- Client complaints
- Revenue impact

### Rollback Steps

1. Re-enable v1 endpoints
2. Update deprecation timeline
3. Communicate delay to clients
4. Fix issues in v2
5. Resume migration when stable

Best Practices

  1. Announce early: 6+ months notice
  2. Provide tools: SDKs, migration scripts
  3. Support clients: 1-on-1 help if needed
  4. Monitor usage: Track who's still on v1
  5. Gradual sunset: Don't surprise users
  6. Clear docs: Step-by-step guides
  7. Offer grace period: Extensions for large clients

Output Checklist

  • Versioning strategy chosen
  • Deprecation timeline (6+ months)
  • Migration guide written
  • Breaking changes documented
  • Backward compatibility plan
  • Client communication drafted
  • Monitoring dashboard setup
  • Rollback plan documented
  • Support resources prepared

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.55%
按下载量换算25

Claude

30.12%
按下载量换算20

Cursor

17.68%
按下载量换算12

Gemini CLI

9.19%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills