Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add cass-2003/local-workflow-skill --skill api-versioninggit clone --depth 1 https://github.com/cass-2003/local-workflow-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cass-2003/local-workflow-skill/api-versioning)<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/api-versioning"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/api-versioning/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/api-versioning"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/api-versioning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00156 | $0.02506 |
| Opus 5 | $0.00078 | $0.01253 |
| Sonnet 5 | $0.00031 | $0.00501 |
| Haiku 4.5 | $0.00016 | $0.00251 |
Grade A, and why
api-versioning scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
**优点**:直观 / 缓存友好 / curl 易测 / 多版本并存简单 How it starts
The opening of the file, as written. The whole thing — 294 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Versioning Skill — API 版本控制
何时使用
- 设计公开 API(SDK / 第三方集成)
- 想做 breaking change 但有存量客户
- 内部服务 (microservices) 间接口演进
- 评审 PR 是否 breaking change
- 制定 deprecation 流程
一、版本载体四种
1. URL Path(最常见)
GET /v1/users/123
GET /v2/users/123
优点:直观 / 缓存友好 / curl 易测 / 多版本并存简单 缺点:版本号"侵入" URL(看似资源是不同的)
2. Header
GET /users/123
Accept: application/vnd.example.v2+json
# 或自定义
X-API-Version: 2
优点:URL 干净 / 资源同一 缺点:浏览器不能直接打开 / 缓存键需 Vary 头
3. Media Type
GET /users/123
Accept: application/vnd.example.user.v2+json
GitHub API v3 用法。学院派,实践少见(开发心智成本高)。
4. Query Param
GET /users/123?version=2
不推荐 —— 不像版本,像参数。
5. Date-based(Stripe / GitHub GraphQL)
Stripe-Version: 2026-04-15
每次 breaking change 发版日期 stamp,旧客户端永远拿到当时的语义。最强但最贵:服务端要长期维护多个 schema 版本。
二、Breaking vs Additive Change
Additive(向后兼容,不需要新版本)
- ✅ 加新 endpoint
- ✅ 加新 optional 字段(请求 / 响应)
- ✅ 加新 enum 值(前提:客户端容忍未知值)
- ✅ 放宽校验(要求 ≥ 18 → ≥ 0)
- ✅ 加新 HTTP method 在已有 path
Breaking(必须升版本)
- ❌ 删字段 / 改字段名
- ❌ 改字段类型
- ❌ 加 required 字段
- ❌ 改默认值(行为改变)
- ❌ 删 enum 值
- ❌ 改 HTTP 状态码语义
- ❌ 收紧校验(≥ 0 → ≥ 1)
- ❌ 改错误格式
- ❌ 改分页 / 默认排序
陷阱:加 enum 值表面 additive,但若旧 SDK 用 switch 没 default,会崩。枚举默认 breaking,除非协议要求"未知值视为 X"。
三、SemVer 在 API 上的应用
v1.2.3
↑ ↑ ↑
│ │ └─ patch: bug fix(永不 breaking)
│ └─── minor: 加功能(永不 breaking)
└───── major: breaking change
API URL 一般只暴露 major(/v1/)。minor / patch 透明升级。
四、Deprecation 流程(业界标杆)
1. 公告期(≥ 3 月)
- 发布 changelog
- 邮件 / dashboard 通知用户
- API 响应加 header:
Sunset: Wed, 31 Dec 2026 23:59:59 GMT
Deprecation: true
Link: <https://api.example.com/v3/users>; rel="successor-version"
Warning: 299 - "v1 deprecated, use v3 by 2026-12-31"
2. 监控期
观察使用量下降曲线 / 联系大客户
3. 关闭期
- 返 410 Gone(不是 404)
- body 给迁移指引
HTTP/1.1 410 Gone
Content-Type: application/problem+json
{
"type": "/errors/api-version-sunset",
"title": "API v1 has been sunset",
"detail": "Migrate to v3. See https://api.example.com/migration/v1-to-v3",
"successor": "/v3/users"
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 294 lines · 156 tokens per session scan A a31aebd4b70b
api-versioning is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 2mo ago), licensed MIT. It adds 156 tokens to every session and 2,506 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
mem0-oss-to-platform
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…
agui-dotnet-protobuf
Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…
azure-mgmt-botservice-dotnet
Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".
fastapi-router-py
Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.
migrate-segw-to-rap
Reverse-engineer a SEGW-built OData V2 service (MPC/DPC/MPCEXT/DPCEXT) into a modern RAP V4 service — tables, CDS views (interface + projection), behavior definitions, draft entities, service definition + binding. Use when asked to "migrate this SEGW service to RAP", "convert OData V2 to V4 RAP", "modernize this…
telnyx-messaging-hosted-curl
Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides REST API (curl) examples.