api-versioning

api-versioning is a cursor rule for Cursor from MN-Lizard-Team/aiyu-multi-agent. It costs 11 tokens per session (1,283 once invoked), scanned A, original, Apache-2.0.

A guide to changing an API over time while keeping existing clients working. An API is a program interface that lets other software exchange data or request actions.

In plain words
What is it for?
Use it to choose URL, header, or content-based versioning and to distinguish breaking changes from compatible ones.
Why use it?
It helps prevent updates from unexpectedly breaking applications that depend on the API.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

Good fit Use it to choose URL, header, or content-based versioning and to distinguish…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mn-lizard-team/aiyu-multi-agent/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.

Clone the repo
git clone --depth 1 https://github.com/MN-Lizard-Team/aiyu-multi-agent

Made for: Cursor.

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/rules/mn-lizard-team/aiyu-multi-agent/api-versioning.svg)](https://agentmods.dev/rules/mn-lizard-team/aiyu-multi-agent/api-versioning)
Your own site
<a href="https://agentmods.dev/rules/mn-lizard-team/aiyu-multi-agent/api-versioning"><img src="https://agentmods.dev/badge/rules/mn-lizard-team/aiyu-multi-agent/api-versioning.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,283 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.
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.00011 $0.01283
Opus 5 $0.00005 $0.00642
Sonnet 5 $0.00002 $0.00257
Haiku 4.5 $0.00001 $0.00128

Measured 3d ago against content hash 8787695d9386, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 3d 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.

.cursor/rules/skills/api-versioning.mdc · 244 lines

How it starts

The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: api-versioning

Cursor Agent-Requested Rule — applied when AI determines relevance.


API Versioning - Managing API Evolution

Change is inevitable. Breaking changes are optional.


Versioning Strategies

URL Versioning

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

Pros: Simple, cache-friendly, explicit Cons: URL pollution, resource duplication

Header Versioning

GET /api/users
Accept: application/vnd.api+json;version=2
# or
API-Version: 2

Pros: Clean URLs, flexible Cons: Less discoverable, caching complexity

Content Negotiation

GET /api/users
Accept: application/vnd.company.v2+json

Pros: HTTP standard compliant Cons: Complex Accept headers, harder to test

Recommendation: URL versioning for public APIs, headers for internal APIs.


Semantic Versioning for APIs

MAJOR.MINOR.PATCH

MAJOR — Breaking changes
MINOR — New features (backward compatible)
PATCH — Bug fixes (backward compatible)

Breaking vs Non-Breaking Changes

Breaking Non-Breaking
Remove endpoint Add endpoint
Remove field Add optional field
Change field type Add field validation
Change auth Improve performance
Rename field Deprecate field (keep working)

Deprecation Strategy

Deprecation Timeline

Day 0:     Announce deprecation in documentation
Day 30:    Add deprecation warnings in responses
Day 90:    Send emails to registered developers
Day 180:   Return Sunset header with date
Day 365:   Remove deprecated version

Deprecation Headers

HTTP/1.1 200 OK
Deprecation: true
Sunset: Wed, 11 Jun 2025 23:59:59 GMT
Link: </api/v2/users>; rel="successor-version"

{
  "data": {...},
  "meta": {
    "deprecation_notice": "This endpoint will be removed on 2025-06-11. Please migrate to /api/v2/users"
  }
}

Version Implementation

Route Structure

src/
├── api/
│   ├── v1/
│   │   ├── routes/
│   │   ├── controllers/
│   │   └── models/
│   └── v2/
│       ├── routes/
│       ├── controllers/
│       └── models/

Read the full file on GitHub · 244 lines

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. 3d ago First seen · 244 lines · 11 tokens per session scan A 8787695d9386

Subscribe to this mod's changes

api-versioning is a cursor rule published in the GitHub repository MN-Lizard-Team/aiyu-multi-agent (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 11 tokens to every session and 1,283 once invoked, about $0.0001 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-09-03.