web-api
Installation
SKILL.md
ASP.NET Core Web API
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.