Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET.
ASP.NET Core Web API
Build or maintain controller-based ASP.NET Core APIs when the project needs controller conventions, advanced model binding, validation extensions, OData, JsonPatch, or existing API patterns.
Trigger On
- working on controller-based APIs in ASP.NET Core
- needing controller-specific extensibility or conventions
- migrating or reviewing existing API controllers and filters
Workflow
- Use controllers when the API needs controller-centric features, not simply because older templates did so.
- Keep controllers thin: map HTTP concerns to application services or handlers, and avoid embedding data access and business rules directly in actions.
- Use clear DTO boundaries, explicit validation, and predictable HTTP status behavior.
- Review authentication and authorization at both controller and endpoint levels so the API surface is not accidentally inconsistent.
- Keep OpenAPI generation, versioning, and error contract behavior deliberate rather than incidental.
- Use
minimal-apisfor new simple APIs instead of defaulting to controllers out of habit.
Deliver
- controller APIs with explicit contracts and policies
- reduced controller bloat
- tests or smoke checks for critical API behavior
Validate
- controller features are actually justified
- actions do not hide business logic and persistence details
- HTTP semantics stay predictable across endpoints
References
- patterns.md - Controller patterns, model binding, validation, versioning, response handling, and filter patterns
- anti-patterns.md - Common API mistakes to avoid including fat controllers, inconsistent errors, missing cancellation tokens, and improper HTTP semantics
Related skills
Microsoft.AspNetCore.*
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices.
Microsoft.AspNetCore.Components.*
Design and implement Minimal APIs in ASP.NET Core using handler-first endpoints, route groups, filters, and lightweight composition suited to modern .NET services.
Related agents
.NET Aspire Orchestrator
Specialist orchestration agent for .NET Aspire work.
agents install aspire-orchestrator
Also works: dotnet agents install aspire-orchestrator
Routes to
aspnet-core+6 more