minimal-api

minimal-api is a skill for Claude Code from codewithmukesh/dotnet-claude-kit. It costs 101 tokens per session (2,352 once invoked), scanned A, original, MIT.

Guidance for building HTTP endpoints with .NET 10 Minimal APIs, a lightweight way to create web APIs without controller classes. It covers routing, request parameters, typed responses, and OpenAPI documentation, which describes an API for humans and tools.

In plain words
What is it for?
Creating API endpoints, grouping routes, handling parameters, adding endpoint filters, and generating OpenAPI metadata.
Why use it?
It helps keep endpoint code organized and makes the API description match the actual responses. It also provides a consistent way to add endpoint groups without repeatedly editing the main program file.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dotnet-claude-kit plugin — 51 skills, 11 agents, 2 hooks, 1 MCP server shipped together

not rated 805repo +8 2d ago A scan Socket: passSnyk: passSkillSpector: pass 101 tokens original MIT

Good fit Creating API endpoints, grouping routes, handling parameters, adding endpoint filters, and generating OpenAPI metadata.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codewithmukesh/dotnet-claude-kit/minimal-api
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 codewithmukesh/dotnet-claude-kit --skill minimal-api
Clone the repo
git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit

Made for: Claude Code.

Or install dotnet-claude-kit, the plugin that ships this one along with the rest of its 51 skills, 11 agents, 2 hooks, 1 MCP server.

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 minimal-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/codewithmukesh/dotnet-claude-kit/minimal-api/github.svg)](https://agentmods.dev/skills/codewithmukesh/dotnet-claude-kit/minimal-api)
Your own site
<a href="https://agentmods.dev/skills/codewithmukesh/dotnet-claude-kit/minimal-api"><img src="https://agentmods.dev/badge/skills/codewithmukesh/dotnet-claude-kit/minimal-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for minimal-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/codewithmukesh/dotnet-claude-kit/minimal-api"><img src="https://agentmods.dev/badge/skills/codewithmukesh/dotnet-claude-kit/minimal-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,352 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
  • Socket pass 14 Sept 2026
  • Snyk pass 14 Sept 2026
  • 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.00101 $0.02352
Opus 5.5 $0.00040 $0.00941
Sonnet 5.5 $0.00020 $0.00470
Haiku 4.5 $0.00010 $0.00235

Measured 2mo ago against content hash 00a3dd3ee44b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

minimal-api 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 2mo 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/minimal-api/SKILL.md · 304 lines

How it starts

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

Minimal APIs (.NET 10)

Core Principles

  1. Minimal APIs are the default — Use controllers only when migrating legacy code. Minimal APIs are lighter, faster, and compose well with any architecture style.
  2. Group endpoints with MapGroup — Never scatter individual MapGet/MapPost calls in Program.cs. Group related endpoints together.
  3. Use TypedResults for OpenAPI — TypedResults.Ok(value) gives you compile-time type safety AND correct OpenAPI documentation. Results.Ok(value) does not.
  4. Metadata over comments — Use .WithName(), .WithTags(), .WithSummary() to document endpoints. The metadata feeds into OpenAPI specs.

Patterns

Endpoint Group Auto-Discovery (Required Pattern)

Every endpoint group lives in its own file and implements IEndpointGroup. A single app.MapEndpoints() call in Program.cs discovers and registers all groups automatically. Program.cs never changes when you add new endpoint groups.

// Extensions/IEndpointGroup.cs
public interface IEndpointGroup
{
    void Map(IEndpointRouteBuilder app);
}
// Extensions/EndpointExtensions.cs
public static class EndpointExtensions
{
    public static WebApplication MapEndpoints(this WebApplication app)
    {
        var groups = typeof(Program).Assembly
            .GetTypes()
            .Where(t => t.IsAssignableTo(typeof(IEndpointGroup)) && !t.IsInterface && !t.IsAbstract)
            .Select(Activator.CreateInstance)
            .Cast<IEndpointGroup>();

        foreach (var group in groups)
            group.Map(app);

        return app;
    }
}
// Program.cs — this NEVER changes when adding endpoints
var app = builder.Build();
app.MapEndpoints();
app.Run();
// Features/Orders/OrderEndpoints.cs — one file per endpoint group
public sealed class OrderEndpoints : IEndpointGroup
{
    public void Map(IEndpointRouteBuilder app)
    {
        var group = app.MapGroup("/api/orders").WithTags("Orders");

        group.MapPost("/", CreateOrder)
            .WithName("CreateOrder")
            .WithSummary("Create a new order")
            .Produces<OrderResponse>(StatusCodes.Status201Created)
            .ProducesValidationProblem()
            .RequireAuthorization();

        group.MapGet("/{id:guid}", GetOrder)
            .WithName("GetOrder")
            .Produces<OrderResponse>()
            .ProducesProblem(StatusCodes.Status404NotFound);

        group.MapGet("/", ListOrders)
            .WithName("ListOrders")
            .Produces<PagedList<OrderResponse>>();
    }

    private static async Task<Results<Created<OrderResponse>, ValidationProblem>> CreateOrder(
        CreateOrderRequest request,
        ISender sender,
        CancellationToken ct)
    {
        var result = await sender.Send(new CreateOrder.Command(request.CustomerId, request.Items), ct);
        return result.IsSuccess
            ? TypedResults.Created($"/api/orders/{result.Value.Id}", result.Value)
            : TypedResults.ValidationProblem(result.Errors);
    }

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

    private static async Task<Ok<PagedList<OrderResponse>>> ListOrders(
        [AsParameters] ListOrdersQuery query,
        ISender sender,
        CancellationToken ct)
    {
        var result = await sender.Send(query, ct);
        return TypedResults.Ok(result);
    }
}

Read the full file on GitHub · 304 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. 2mo ago First seen · 304 lines · 101 tokens per session scan A 00a3dd3ee44b

Subscribe to this mod's changes

minimal-api is a skill published in the GitHub repository codewithmukesh/dotnet-claude-kit (805 stars, last pushed 2d ago), licensed MIT. It adds 101 tokens to every session and 2,352 once invoked, about $0.0004 per session on Opus 5.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.

Related

minimal-api compared with skills from other repositories

minimal-api next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
minimal-apicodewithmukesh/dotnet-claude-kitSkill8052d agoMITA101Claude Code
agui-dotnet-streaming-chatag-ui-protocol/ag-uiSkill17kyesterdayMITA223Claude Code
azure-maps-search-dotnetmicrosoft/skillsSkill3.2kyesterdayMITA91Claude Code
azure-mgmt-apicenter-dotnetmicrosoft/skillsSkill3.2kyesterdayMITA97Claude Code
azure-ai-voicelive-dotnetmicrosoft/skillsSkill3.2kyesterdayMITA92Claude Code
create-datadriven-aspnetcoredotnet/skillsSkill5.8kyesterdayMITA147Claude Code
omnistudio-callable-apex-generateforcedotcom/sf-skillsSkill1.1k2d agoApache-2.0A176Claude Code, Codex