minimal-api

Configure type-safe .NET 10 minimal API endpoints with TypedResults and endpoint filters.

640|145|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill minimal-api
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: minimal-api
Source: https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/minimal-api
Command: npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill minimal-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Minimal APIs in .NET 10 can become inconsistent, untyped, and scattered across Program.cs, which leads to poor OpenAPI documentation, brittle validation, and hard-to-maintain routing. This Skill prescribes a composable, architecture-friendly approach that keeps endpoint wiring isolated, ensures compile-time response types, and centralizes cross-cutting concerns so teams can scale HTTP surface areas without degrading quality.

Core Features & Use Cases

  • Endpoint Group Auto-Discovery: Define one IEndpointGroup per feature and use a single MapEndpoints call so Program.cs never grows with each new feature.
  • Type-Safe Responses: Use TypedResults and explicit union return types to produce accurate OpenAPI schemas and avoid untyped IResult leaks.
  • Parameter Binding & Validation: Recommend [AsParameters] for complex queries, header binding conventions, and endpoint filters (e.g., FluentValidation) for request validation.
  • OpenAPI, Rate Limiting & Caching: Use built-in AddOpenApi, AddRateLimiter, and AddOutputCache patterns to generate docs, protect APIs, and cache responses.
  • Cross-cutting Filters: Apply endpoint filters at group or endpoint level for logging, validation, and auth policies.

Quick Start

Scaffold an IEndpointGroup that registers /api/orders endpoints using TypedResults, endpoint filters for validation, and OpenAPI metadata.

Frequently Asked Questions about minimal-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure minimal APIs in .NET to avoid cluttering Program.cs?▼

To structure minimal APIs without cluttering Program.cs, define one IEndpointGroup per feature and use a single MapEndpoints call for auto-discovery. This isolates endpoint wiring and keeps routing maintainable as your HTTP surface area scales.

How do I generate accurate OpenAPI schemas for .NET minimal APIs?▼

You generate accurate OpenAPI schemas by using TypedResults with explicit union return types in your minimal APIs. This ensures compile-time response types and avoids untyped IResult leaks, producing correct documentation via the built-in AddOpenApi service registration.

What is the best way to validate parameters in .NET minimal APIs?▼

The best way to validate parameters in minimal APIs is applying endpoint filters at the group or endpoint level. You can use [AsParameters] for complex query binding and integrate FluentValidation filters to handle request validation consistently across endpoints.

Can I apply rate limiting and output caching to specific minimal API endpoint groups?▼

Yes, you can apply rate limiting and output caching to minimal API endpoint groups by registering AddRateLimiter and AddOutputCache services. These built-in patterns allow you to protect APIs and cache responses effectively at the group level.

Does this minimal API approach work for migrating from MVC in .NET 10?▼

Yes, this minimal API approach works for migrating from MVC in .NET 10. It provides a composable, architecture-friendly structure using type-safe endpoints and cross-cutting filters, allowing you to scale HTTP surface areas without degrading quality during migration.