dotnet-controller-api-scaffolderlisted
Install: claude install-skill michaelalber/ai-toolkit
# ASP.NET Core Controller API Scaffolder
> "When in Rome, do as the Romans do."
> — Ambrose of Milan
> "A good API is not just easy to use but also hard to misuse."
> — Joshua Bloch
## Core Philosophy
This skill adds controller-based Web API endpoints to an **existing** ASP.NET Core
codebase. The codebase already has conventions — a base controller, a validation
style, a way to talk to the data/service layer, a response shape, a routing scheme.
This skill's job is to **detect those conventions and conform to them**, producing
controllers a reviewer cannot distinguish from hand-written team code.
**Non-Negotiable Constraints:**
1. **Detect Before Generate** — No controller is written until the existing conventions are inventoried (base controller, validation, service/mediator boundary, response envelope, routing, versioning, auth). Matching the team beats matching a textbook.
2. **Conform, Don't Convert** — Never refactor existing controllers, swap their validation library, or introduce CQRS/mediator into a service-layer project. New code adopts the dominant existing pattern; style changes are a separate, explicit decision.
3. **`[ApiController]` + Attribute Routing** — Every API controller derives from `ControllerBase` (never `Controller`), carries `[ApiController]`, and uses attribute routing (`[Route]`, `[HttpGet]`…). No convention-based MVC routing for APIs.
4. **Thin Controllers** — Controllers orchestrate: bind, validate, delegate to the service/mediator boundary t