Agent skill

API Versioning

by codewithmukesh in codewithmukesh/dotnet-claude-kit

API versioning strategies for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.

MITAuto-check passedBackend & APIs

Install API Versioning

skills CLI
$ npx skills add codewithmukesh/dotnet-claude-kit --skill api-versioning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install codewithmukesh/dotnet-claude-kit api-versioning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/api-versioning .claude/skills/api-versioning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-versioning
GitHub stars
751
Used in
1 other repo
Token cost
~1.2k tokens
SKILL.md length
154 words
Files
1
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

API versioning strategies for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.

  • Works in 4 steps: Version from day one — Adding versioning… → URL segment versioning is the default —… → Never break existing versions — Add a… → …
  • Mentions API version
  • SKILL.md covers Core Principles, Patterns, Anti-patterns and Decision Guide
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

API Versioning is an agent skill from codewithmukesh/dotnet-claude-kit. API versioning strategies for ASP.NET Core. Covers Asp.Versioning library, URL segment, header, and query string strategies, version deprecation, and OpenAPI integration. Load this skill when adding versioning to an API, evolving an API with breaking changes, or when the user mentions "API version", "versioning", "v1/v2", "Asp.Versioning", "deprecation", "breaking change", or "backward compatibility".

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering OpenAPI specifications. It works with OpenAPI and ASP.NET Core. The repository describes itself as: Make Claude Code a .NET 10 Expert. The licence is MIT.

When your agent uses it

  • Mentions API version
  • Breaking change
  • Backward compatibility

Example prompts

  • “API version”
  • “versioning”
  • “Asp.Versioning”
  • “/api-versioning”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Version from day one — Adding versioning later is painful. Start with a version in the URL even if you only have v1.
  2. URL segment versioning is the default — /api/v1/orders is the most discoverable and cache-friendly strategy.
  3. Never break existing versions — Add a new version for breaking changes. Deprecate the old version with a timeline.
  4. Version the API, not individual endpoints — All endpoints in a version group share the same version number.

What it can do on your machine

Read from SKILL.md and the folder at commit 2330089. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Versioning loads about 1.2k tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 154 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from codewithmukesh/dotnet-claude-kit at commit 2330089, republished under its MIT licence (© codewithmukesh). 154 words, ~1,172 tokens.

Download SKILL.mdSave it as .claude/skills/api-versioning/SKILL.md (or your agent's skills folder).
name
api-versioning
description
API versioning strategies for ASP.NET Core. Covers Asp.Versioning library, URL segment, header, and query string strategies, version deprecation, and OpenAPI integration. Load this skill when adding versioning to an API, evolving an API with breaking changes, or when the user mentions "API version", "versioning", "v1/v2", "Asp.Versioning", "deprecation", "breaking change", or "backward compatibility".

API Versioning

Core Principles

  1. Version from day one — Adding versioning later is painful. Start with a version in the URL even if you only have v1.
  2. URL segment versioning is the default — /api/v1/orders is the most discoverable and cache-friendly strategy.
  3. Never break existing versions — Add a new version for breaking changes. Deprecate the old version with a timeline.
  4. Version the API, not individual endpoints — All endpoints in a version group share the same version number.

Patterns

Setup with Asp.Versioning
csharp
// Program.cs
builder.Services.AddApiVersioning(options =>
{
    options.DefaultApiVersion = new ApiVersion(1, 0);
    options.AssumeDefaultVersionWhenUnspecified = true;
    options.ReportApiVersions = true;
    options.ApiVersionReader = new UrlSegmentApiVersionReader();
})
.AddApiExplorer(options =>
{
    options.GroupNameFormat = "'v'VVV";
    options.SubstituteApiVersionInUrl = true;
});
csharp
var v1 = app.NewApiVersionSet()
    .HasApiVersion(new ApiVersion(1, 0))
    .Build();

var v2 = app.NewApiVersionSet()
    .HasApiVersion(new ApiVersion(2, 0))
    .Build();

app.MapGroup("/api/v{version:apiVersion}/orders")
    .WithApiVersionSet(v1)
    .WithTags("Orders")
    .MapOrderEndpointsV1();

app.MapGroup("/api/v{version:apiVersion}/orders")
    .WithApiVersionSet(v2)
    .WithTags("Orders")
    .MapOrderEndpointsV2();
Header Versioning (Alternative)
csharp
options.ApiVersionReader = new HeaderApiVersionReader("X-Api-Version");

// Client sends: X-Api-Version: 2.0
Deprecating a Version
csharp
var v1 = app.NewApiVersionSet()
    .HasDeprecatedApiVersion(new ApiVersion(1, 0))
    .HasApiVersion(new ApiVersion(2, 0))
    .Build();

// Response headers will include: api-deprecated-versions: 1.0
Version-Specific Endpoint Groups
csharp
public static class OrderEndpointsV1
{
    public static RouteGroupBuilder MapOrderEndpointsV1(this RouteGroupBuilder group)
    {
        group.MapGet("/{id:guid}", GetOrderV1);
        group.MapPost("/", CreateOrderV1);
        return group;
    }

    private static async Task<Results<Ok<OrderResponseV1>, NotFound>> GetOrderV1(
        Guid id, ISender sender, CancellationToken ct)
    {
        // V1 response shape
        var result = await sender.Send(new GetOrder.Query(id), ct);
        return result.IsSuccess
            ? TypedResults.Ok(result.Value.ToV1())
            : TypedResults.NotFound();
    }
}

public static class OrderEndpointsV2
{
    public static RouteGroupBuilder MapOrderEndpointsV2(this RouteGroupBuilder group)
    {
        group.MapGet("/{id:guid}", GetOrderV2);
        group.MapPost("/", CreateOrderV2);
        return group;
    }

    private static async Task<Results<Ok<OrderResponseV2>, NotFound>> GetOrderV2(
        Guid id, ISender sender, CancellationToken ct)
    {
        // V2 response shape — includes new fields
        var result = await sender.Send(new GetOrder.Query(id), ct);
        return result.IsSuccess
            ? TypedResults.Ok(result.Value.ToV2())
            : TypedResults.NotFound();
    }
}

Anti-patterns

Don't Version Individual Endpoints
csharp
// BAD — inconsistent versioning within a group
app.MapGet("/api/v1/orders", ListOrdersV1);
app.MapGet("/api/v2/orders/{id}", GetOrderV2); // V2 only for this endpoint?

// GOOD — version the entire group
app.MapGroup("/api/v1/orders").MapOrderEndpointsV1();
app.MapGroup("/api/v2/orders").MapOrderEndpointsV2();
Don't Use Query String Versioning as Default
csharp
// BAD for REST APIs — version hidden in query string, not cache-friendly
GET /api/orders?api-version=2.0

// GOOD — version in URL, discoverable and cacheable
GET /api/v2/orders

Decision Guide

ScenarioRecommendation
New public APIURL segment versioning from day one
Internal API between servicesHeader versioning (cleaner URLs)
Breaking response shape changeNew version
Adding new optional fieldsSame version (backwards compatible)
Deprecating a versionMark deprecated, set sunset date, document migration path

© codewithmukesh, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/api-versioning of codewithmukesh/dotnet-claude-kit.

Open the folder on GitHubat commit 2330089

Used in 1 other repository

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in codewithmukesh/dotnet-claude-kit, which our catalogue first saw on October 7, 2026.

Compare with similar skills

API Versioning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Versioning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Versioning this skillcodewithmukesh/dotnet-claude-kit7511 repos~1.2kAutomated safety check: PassMIT
Tsp Csharpquerylenshq/ef-querylens225—~1.3kAutomated safety check: PassMIT
Dotnet APInovotnyllc/dotnet-artisan233—~1.6kAutomated safety check: PassMIT
Dotnet Webapidotnet/skills5.6k2 repos~5.5kAutomated safety check: PassMIT
Aspnet Minimal API Openapigithub/awesome-copilot40k1 repos~439Automated safety check: PassMIT
API Breaking Change Detectorgithub/awesome-copilot40k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Tsp Csharp

    querylenshq/ef-querylens

    Comprehensive C and .NET development skill for TSP projects.

    225 GitHub stars~1.3k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Dotnet API

    novotnyllc/dotnet-artisan

    Builds ASP.NET Core APIs, EF Core data access, gRPC, SignalR, and backend services with middleware, security (OAuth, JWT, OWASP), resilience, messaging, OpenAPI, .NET Aspire, Semantic Kernel…

    233 GitHub stars~1.6k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Dotnet Webapi

    dotnet/skills

    Official

    Guides creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling.

    5.6k GitHub starsUsed in 2 repos~5.5k tokens
    Backend & APIsAuto-check passed
  • Aspnet Minimal API Openapi

    github/awesome-copilot

    Official

    Create ASP.NET Minimal API endpoints with proper OpenAPI documentation

    40k GitHub starsUsed in 1 repo~439 tokens
    Backend & APIsAuto-check passed
  • API Breaking Change Detector

    github/awesome-copilot

    Official

    Cross-references C Web API controllers/DTOs against their TypeScript/JavaScript consumers (React, Angular, Vue, Svelte, Node.js, or hand-written/auto-generated HTTP clients like Fetch, Axios, NSwag)…

    40k GitHub stars~1.7k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Official

    Migrate a .NET 9 project or solution to .NET 10 and resolve all breaking changes.

    5.6k GitHub starsUsed in 2 repos~4.8k tokens
    DevOps & CloudAuto-check passed

More from codewithmukesh/dotnet-claude-kit

All 47 skills in this repo
  • Scaffold

    codewithmukesh/dotnet-claude-kit

    Architecture-aware feature scaffolding for .NET 10 projects.

    751 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Architecture Advisor

    codewithmukesh/dotnet-claude-kit

    Architecture selection advisor for .NET applications. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Aspire

    codewithmukesh/dotnet-claude-kit

    .NET Aspire for cloud-native orchestration. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Authentication

    codewithmukesh/dotnet-claude-kit

    Authentication and authorization for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Caching

    codewithmukesh/dotnet-claude-kit

    Caching strategies for .NET 10 applications. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • CI CD

    codewithmukesh/dotnet-claude-kit

    CI/CD pipelines for .NET applications. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed

Categories

Questions about API Versioning

What does API Versioning do?

API versioning strategies for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit. API Versioning is an agent skill from codewithmukesh/dotnet-claude-kit.NET Core.

When should I use API Versioning?

API Versioning fits situations like: mentions API version; breaking change; backward compatibility.

How do I install API Versioning in Claude Code?

Run `npx skills add codewithmukesh/dotnet-claude-kit --skill api-versioning -a claude-code`. Or copy the skill folder (skills/api-versioning in codewithmukesh/dotnet-claude-kit) into .claude/skills/api-versioning in your project. Claude Code loads it when a task matches its description.

How do I install API Versioning in Codex?

Run `npx skills add codewithmukesh/dotnet-claude-kit --skill api-versioning -a codex`. Or copy the skill folder (skills/api-versioning in codewithmukesh/dotnet-claude-kit) into .agents/skills/api-versioning in your project. Codex loads it when a task matches its description.

Can I use API Versioning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codewithmukesh/dotnet-claude-kit --skill api-versioning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-versioning, .gemini/skills/api-versioning, .github/skills/api-versioning and .opencode/skills/api-versioning in your project.

What does API Versioning need to run?

SKILL.md names no scripts, command-line tools or credentials: API Versioning is instructions for the agent only.

Does API Versioning access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Versioning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Versioning use?

API Versioning is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Versioning use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Versioning?

Skills that share tags, products or a category with API Versioning: Tsp Csharp (querylenshq/ef-querylens, 225 stars), Dotnet API (novotnyllc/dotnet-artisan, 233 stars), Dotnet Webapi (dotnet/skills, 5.6k stars) and Aspnet Minimal API Openapi (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Versioning?

codewithmukesh (a GitHub organization) maintains it in codewithmukesh/dotnet-claude-kit, which has 751 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on August 7, 2026.

Source: codewithmukesh/dotnet-claude-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.