api-versioning

api-versioning is a skill for Claude Code, Codex from rrezartprebreza/spring-boot-skills. It costs 44 tokens per session (444 once invoked), scanned A, original, MIT.

Guidelines for supporting multiple versions of a Spring MVC or WebFlux API in Spring Boot 3. API versioning means allowing older and newer clients to use defined versions of the same service.

In plain words
What is it for?
Use it to choose URL, request-header, or media-type versioning strategies. It covers versioned controllers and data models, OpenAPI documentation, compatibility rules, deprecation and sunset headers, and contract tests.
Why use it?
It helps clients migrate without unexpected breaking changes. It also keeps version selection visible and consistent while defining how old versions are documented and retired.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the spring-boot-3-skills plugin — 30 skills shipped together

Good fit Use it to choose URL, request-header, or media-type versioning strategies. It covers versioned controllers and data models, OpenAPI documentation, compatibility rules, deprecation and sunset headers, and contract tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rrezartprebreza/spring-boot-skills/api-versioning
Install

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.

Any agent
npx skills add rrezartprebreza/spring-boot-skills --skill api-versioning
Clone the repo
git clone --depth 1 https://github.com/rrezartprebreza/spring-boot-skills

Made for: Claude Code, Codex.

Or install spring-boot-3-skills, the plugin that ships this one along with the rest of its 30 skills.

Wrote 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.

agentmods badge for api-versioning

README.md
[![agentmods](https://agentmods.dev/badge/skills/rrezartprebreza/spring-boot-skills/api-versioning.svg)](https://agentmods.dev/skills/rrezartprebreza/spring-boot-skills/api-versioning)
Your own site
<a href="https://agentmods.dev/skills/rrezartprebreza/spring-boot-skills/api-versioning"><img src="https://agentmods.dev/badge/skills/rrezartprebreza/spring-boot-skills/api-versioning.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 444 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00444
Opus 5 $0.00022 $0.00222
Sonnet 5 $0.00009 $0.00089
Haiku 4.5 $0.00004 $0.00044

Measured 8d ago against content hash 029ff8005a15, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

api-versioning scanned grade A with 0 findings 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/spring-boot-3/api-versioning/SKILL.md · 46 lines

What it actually says

API Versioning (Boot 3 / Framework 6)

Boot 3 does not provide Boot 4's built-in mapping version attribute. Choose one explicit strategy and keep it consistent: URL segments, a request header, or media-type parameters.

Prefer a visible, testable contract

For a public API, /api/v1/orders and /api/v2/orders are usually the clearest choice. If URLs must remain stable, resolve a request header at the web boundary and route to versioned handlers. Do not hide version selection in business services or duplicate it across filters and controllers.

@RestController
@RequestMapping("/api/v1/orders")
class OrderV1Controller {
    @GetMapping("/{id}")
    OrderV1 get(@PathVariable UUID id) { ... }
}

Document supported versions in OpenAPI, define a removal policy, and return a consistent error for unsupported versions. Add Deprecation, Sunset, and Link headers through a response advice or filter when retiring a version.

Migration boundary

Keep version-specific DTOs and controllers thin. Map both versions to the same application use case, and do not copy domain logic into each version. Add contract tests for every supported version and verify content negotiation if using media types.

Gotchas

  • Agent uses Boot 4's version attribute on Boot 3 - it is not available; choose an explicit routing strategy.
  • Agent mixes URL, header, and media-type resolution - select one source of truth.
  • Agent puts version branching in services - keep compatibility at the web adapter boundary.
  • Agent changes response fields without versioning - preserve old contracts or publish a new version.
  • Agent invents deprecation headers per controller - centralize them in advice or a filter.
  • Agent documents only the latest version - keep OpenAPI and contract tests for every supported version.
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 8d ago First seen · 46 lines · 44 tokens per session scan A 029ff8005a15

Subscribe to this mod's changes

api-versioning is a skill published in the GitHub repository rrezartprebreza/spring-boot-skills (258 stars, last pushed 24d ago), licensed MIT. It adds 44 tokens to every session and 444 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.