Skill page Web v1.0.0

Minimal APIs

Design and implement Minimal APIs in ASP.NET Core using handler-first endpoints, route groups, filters, and lightweight composition suited to modern .NET services.

Trigger On

  • building new HTTP APIs in ASP.NET Core
  • creating lightweight microservices
  • choosing between Minimal APIs and controllers
  • organizing endpoints with route groups
  • implementing validation and filters

Workflow

  1. Define endpoints directly in Program.cs (for small APIs)
  2. Use route groups for related endpoints
  3. Move handlers to separate classes as the API grows
  4. Apply filters for cross-cutting concerns
  5. Use TypedResults for type-safe responses
  6. Generate OpenAPI docs with .WithOpenApi()

Deliver

  • clean, organized Minimal API endpoints
  • proper use of route groups and filters
  • type-safe responses with TypedResults
  • OpenAPI documentation
  • validation with endpoint filters

Validate

  • endpoints return correct status codes
  • validation filters catch invalid input
  • OpenAPI spec is accurate
  • route groups share common configuration
  • handlers are testable (can mock dependencies)

Related skills

Skill

ASP.NET Core

v1.0.0

Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET.

Web
dotnet skills install aspnet-core
Skill

Blazor

v1.0.0

Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices.

Web
dotnet skills install blazor
v1.0.0

Build or review gRPC services and clients in .NET with correct contract-first design, streaming behavior, transport assumptions, and backend service integration.

Web
dotnet skills install grpc