managedcode/dotnet-skills/minimal-apis
Claude Code and agent skill by managedcode/dotnet-skills
- community
Checking that the SKILL.md file is still in the repository.
Design and implement Minimal APIs in ASP.NET Core using handler-first endpoints, route groups, filters, and lightweight composition suited to modern .NET services. USE FOR: building new HTTP APIs in ASP.NET Core; creating lightweight microservices; choosing between Minimal APIs and controllers. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Install
npx vskill@latest install managedcode/dotnet-skills/minimal-apisSKILL.md
The same SKILL.md was published earlier as managedcode/dotnet-skills/minimal-apis.
Minimal APIs
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
Documentation
References
- patterns.md - detailed route groups, filters, TypedResults patterns, parameter binding, error handling, and testing
- anti-patterns.md - common Minimal API mistakes to avoid
When to Use Minimal APIs vs Controllers
| Use Minimal APIs | Use Controllers | |
|---|---|---|
| New projects | Existing MVC/API projects | |
| Microservices | Complex model binding | |
| Simple CRUD APIs | OData, JsonPatch | |
| Lightweight handlers | Heavy use of attributes | |
| .NET 8+ projects | Need [ApiController] features |
Workflow
- Define endpoints directly in Program.cs (for small APIs)
- Use route groups for related endpoints
- Move handlers to separate classes as the API grows
- Apply filters for cross-cutting concerns
- Use TypedResults for type-safe responses
- Generate OpenAPI docs with
.WithOpenApi()
Current Upstream Notes
dotnet/aspnetcorev10.0.11is servicing; it does not change the Minimal API route-group, filter, orTypedResultsmodel, but it updates the OpenAPI stack to2.7.5. Re-run document-generation and contract snapshots after upgrading.- The August 2026
aspnetcore-10.0overview still routes lightweight HTTP APIs here. Use the dedicated Minimal API pages when exact OpenAPI, filter, or parameter-binding behavior matters.
Basic Patterns
Simple Endpoints
TypedResults (Strongly-Typed)
Dependency Injection
Route Groups
Basic Grouping
Groups with Shared Configuration
Endpoint Filters
Inline Filter
Class-Based Filter
Global Filters via Root Group
Organizing Larger APIs
Extension Method Pattern
Request/Response DTOs
Anti-Patterns to Avoid
| Anti-Pattern | Why It's Bad | Better Approach | |
|---|---|---|---|
| Everything in Program.cs | Unmaintainable | Use extension methods | |
| No route groups | Repetitive config | Group related endpoints | |
| Manual validation | Error-prone | Use filters + FluentValidation | |
| Exposing entities | Tight coupling | Use DTOs | |
| No TypedResults | No compile-time checks | Use TypedResults | |
| Ignoring OpenAPI | No documentation | Add .WithOpenApi() |
OpenAPI Integration
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)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcatalog/Frameworks/Minimal-APIs/skills/minimal-apis/SKILL.md
Popularity
- Repository stars
- 477
- Repository forks
- 34
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 10 Sep 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/managedcode/dotnet-skills/minimal-apis)