← ClaudeAtlas

dotnet-controller-api-scaffolderlisted

Scaffolds controller-based ASP.NET Core Web API endpoints ([ApiController]/ControllerBase) that CONFORM to an existing codebase — base controller, validation (DataAnnotations or FluentValidation), service layer vs. mediator, response envelope, routing, versioning, DI. Detect-and-match, never impose. Use when adding controllers/actions to an existing controller-based API. Not for greenfield Minimal APIs (minimal-api-scaffolder); use dotnet-vertical-slice only when the team has chosen CQRS/vertical-slice.
michaelalber/ai-toolkit · ★ 1 · AI & Automation · score 77
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