Install API Versioning
Pick your agent. Every command is ready to paste.
npx skills add rrezartprebreza/spring-boot-skills --skill api-versioningThe open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads api-versioning when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the api-versioning skill”. In Codex, type $api-versioning.
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
versionattribute 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.
Tips for API Versioning
- • Start a fresh session after installing so your agent picks up the new skill.
- • It bundles reference files. The agent reads them only when needed, so they cost no context until then.
- • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about API Versioning
What does the API Versioning skill do?
Use when versioning Spring MVC or WebFlux APIs in Spring Boot 3 / Spring Framework 6. Covers explicit URL, header, and media-type strategies, compatibility rules, and deprecation handling.
How do I install API Versioning?
Run "npx skills add rrezartprebreza/spring-boot-skills --skill api-versioning" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does API Versioning work in Cursor and Codex?
Yes. API Versioning uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is API Versioning free?
API Versioning is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made API Versioning?
API Versioning is published by rrezartprebreza in the rrezartprebreza/spring-boot-skills repository, together with 29 other skills.


