versioning
Skill4 starsChanged 4 months agoMITView on GitHub
Evolve HTTP APIs without breaking clients — choose URI versus header versioning, distinguish breaking from non-breaking changes, and deprecate old versions with clear signals and a sunset window. Use when the user is changing an API response or request and needs to know if it breaks existing clients and requires a new version; the user must choose how to version an HTTP API — URI path, custom header, or media-type versioning; the user needs to retire an old API version and communicate deprecation and a sunset date to clients. Keywords: api, versioning, deprecation, evolution, breaking-change, http.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- e-reitbauer/habitstheir own version, first seen Nov 8, 2026
- nerymurillohnd/the-claude-factorytheir own version, first seen Nov 1, 2026
- srfinch17/peckworks-skills-laboratorytheir own version, first seen Oct 20, 2026
- vmikhailov/code-explorertheir own version, first seen Oct 20, 2026
- syntropic137/software-leverage-pointstheir own version, first seen Oct 14, 2026
- aiqadam/qadam-flowtheir own version, first seen Oct 13, 2026
Used with
Projects with it also use dependencies.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dbtlrSkilldependencies
Use when adding, evaluating, or updating Rust crate dependencies. Also use when considering whether to implement something yourself vs pulling in a library.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- cunarist/rinf★ 2.8ksame name
- vmikhailov/code-explorer★ 17same name
- xiaomingleng/Chinese-New-Year-Skills★ 9same name
- aiqadam/qadam-flow★ 5same name
- pyand3v/skills★ 2same name
- e-reitbauer/habits★ 1same name
- nerymurillohnd/the-claude-factory★ 1same name
- srfinch17/peckworks-skills-laboratory★ 0same name
- syntropic137/harness-app-template★ 0same name
- syntropic137/software-leverage-points★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository119 other files it gives its agents.
- strategy-bitrix-d7-incrementalSkill
- strategy-explicit-over-magicSkill
- strategy-framework-conventionsSkill
- strategy-legacy-safe-editsSkill
- strategy-minimal-diffSkill
- strategy-no-untested-refactorSkill
- strategy-preserve-public-apiSkill
- strategy-readonly-immutabilitySkill
- strategy-security-firstSkill
- strategy-test-drivenSkill
- openapiSkill
- paginationSkill
- rest-designSkill
- cqrsSkill
- dependency-inversionSkill
- hexagonalSkill
- repository-patternSkill
- service-layerSkill
- bitrixSkill
- findings-reportSkill
- laravelSkill
- performanceSkill
- phpSkill
- project-analysisSkill
- refactoringSkill
- roi-prioritizationSkill
- securitySkill
- stack-detectionSkill
- cache-layersSkill
- component-engineSkill
- d7-eventsSkill
- d7-loaderSkill
- d7-orm-queriesSkill
- iblock-elementsSkill
- kernel-main-moduleSkill
- localizationSkill
- controllersSkill
- ormSkill
- validationSkill
- controllersSkill
- query-builderSkill
- routingSkill
- autoload-psr4Skill
- dependency-managementSkill
- scriptsSkill
- connection-poolingSkill
- mysql-indexingSkill
- redisSkill
- transactionsSkill
- ci-github-actionsSkill
- deployment-strategiesSkill
- docker-phpSkill
- env-configSkill
- associationsSkill
- entities-mappingSkill
- orm-basicsSkill
- entity-apiSkill
- module-developmentSkill
- routing-controllersSkill
- formsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 63
Do not cut a new API version for a purely additive, backward-compatible change such as adding an optional field or a new endpoint.
- Distinctive: line 64
Do not add a versioning scheme when a single team deploys the API and its only client together and can change both at once.
- Very specific: line 81
Add the new major version (for example a /v2 route group or v2 media type) that reuses the shared domain and applies version-specific …
- Distinctive: line 89
Treat as breaking: removing or renaming a field, tightening validation, changing a type or status code, or altering default behavior
- Very specific: line 91
When retiring a version, return the Deprecation header and a Sunset header with the removal date on responses from the old version, …
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- generated: do not edit — source: knowledge/atoms/api/versioning/ --><!-- schema: atomVersion=3 skillVersion=2 graphVersion=1 --><!-- compile: @php-skills/compiler v1.0.0 (deterministic build) -->API Versioning
When to use
- The user is changing an API response or request and needs to know if it breaks existing clients and requires a new version.
- The user must choose how to version an HTTP API — URI path, custom header, or media-type versioning.
- The user needs to retire an old API version and communicate deprecation and a sunset date to clients.
When NOT to use
- Do not cut a new API version for a purely additive, backward-compatible change such as adding an optional field or a new endpoint.
- Do not add a versioning scheme when a single team deploys the API and its only client together and can change both at once.
Core guidance
- Expose only the major version to clients — Surface only the major version (
v1,v2) in the API surface and bump it solely on breaking changes. Ship additive, backward-compatible changes within the same major version without a new URL or header value. - Prefer URI versioning for public APIs, header for nuance — Put a major version in the path (
/v1/orders) for public, cache-friendly APIs where clients and CDNs benefit from a version visible in the URL. Use header or media-type versioning (Accept: application/vnd.acme.v2+json) when you need fine-grained negotiation and want to keep URLs stable.
Quick recipe
- Classify the change against the breaking-vs-additive rule; only proceed to a new version if it removes/renames a field, changes a type, tightens validation, or alters default behavior. (verify: The change is documented as breaking, or shipped additively within the current version instead.)
- Add the new major version (for example a
/v2route group orv2media type) that reuses the shared domain and applies version-specific request/response DTOs, while/v1keeps running unchanged. (verify: Both v1 and v2 respond correctly and share the same underlying service layer.) - Emit
DeprecationandSunsetheaders on v1 responses, publish the migration guide and removal date, and remove v1 only after the announced window closes. (verify: v1 responses carry the deprecation and sunset headers and v1 stays live until the sunset date.)
Best practices
- Treat as breaking: removing or renaming a field, tightening validation, changing a type or status code, or altering default behavior
- When retiring a version, return the
Deprecationheader and aSunsetheader with the removal date on responses from the old version, document the migration path, and keep the old version running through the announced window - Have clients ignore unknown response fields and not depend on field ordering, so additive server changes never break them and the API can evolve within a major version far longer
Anti-patterns
| Anti-pattern | Why it fails | Do instead |
| Forking the whole codebase per version | Duplicated code doubles maintenance and lets versions drift; a bug fixed in one version silently persists in the other. | Share the domain and transform to each version at the edge with version-specific request/response DTOs and a thin routing layer. |
| Exposing minor and patch versions in the URL | Clients then pin to exact minor versions and must change their code for every backward-compatible release, defeating the point. | Expose only the major version in the surface and manage minor changes additively behind it. |
| Cutting a new version for every change | Versioning everything fragments the surface into many near-identical versions that all must be maintained and documented. | Reserve version bumps for breaking changes and ship additive changes within the current major version. |
See references/anti-patterns.md.
Common mistakes
- Making a breaking change inside the current version — Removing a field, renaming it, or tightening validation within v1 breaks live clients immediately. Fix: Ship the breaking change under a new major version, keep the old one running, and migrate clients before sunsetting it.
- Adding a new enum value silently breaks strict clients — Introducing a new value into a response enum (a new status) can break clients that exhaustively switch on the known set. Fix: Document that enums may grow, tell clients to handle unknown values gracefully, and treat enum expansion as a signaled compatibility risk.
- Removing an old version without a sunset window — Deleting v1 the moment v2 ships, with no deprecation period, strands clients that have not migrated. Fix: Announce deprecation, emit Deprecation/Sunset headers, and run both versions through the sunset window before removing the old one.
Version notes
- Sunset header is standardized by RFC 8594 (PHP >=8.1) — The
SunsetHTTP header is defined by RFC 8594 and carries an HTTP-date; pair it with theDeprecationheader (RFC 9745) so tooling can detect both the deprecated state and the removal date.
Security
- Never weaken auth or validation silently across versions — Do not loosen authentication, authorization, or input validation when introducing a new version to make migration easier, and keep security fixes applied to every supported version, not just the newest.
Testing
- Activation and decision behavior are verified in
eval/scenarios/api/versioning.yaml.
Additional resources
- references/anti-patterns.md
- references/core.md
- references/examples.md
- references/pitfalls.md
- references/recipes.md
- references/version-differences.md
Knowledge graph
Related: api/openapi, api/rest-design
<!-- graph-fragment: graph/fragments/api/versioning.yaml -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

