/csharp-dotnet-development:aspnet-minimal-api-openapifrom csharp-dotnet-development
Creates or reviews ASP.NET Minimal API endpoints with typed results, DTO validation, endpoint groups, filters, ProblemDetails, and OpenAPI documentation. Useful when adding Minimal APIs or documenting endpoints with Swagger/OpenAPI.
Ships in csharp-dotnet-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create well-structured ASP.NET Minimal API endpoints by grouping routes, modeling request and response DTOs, returning typed results, and documenting operations so generated OpenAPI describes real behavior.
Use it for OpenAPI/Swagger documentation and strongly-typed endpoint design. Treat endpoint filters as the cross-cutting extension point.
| Concern | Recommended approach | Why it matters |
|---|---|---|
| Related endpoints | Group related endpoints using MapGroup() extension. | Keeps shared route prefixes, tags, authorization, filters, and metadata consistent. |
| Cross-cutting behavior | Use endpoint filters for validation, logging, authorization checks, or other concerns that do not belong in handlers. | Prevents duplicated handler boilerplate. |
| Large APIs | Structure larger APIs with separate endpoint classes or extension methods. | Keeps Program.cs small and discoverable. |
| Complex domains | Consider feature-based folders. | Collocates endpoint mapping, DTOs, validation, and tests by capability. |
Keep handlers thin: parse typed input, call application services, map domain outcomes to HTTP results, and attach metadata.
| Topic | Rule |
|---|---|
| DTOs | Define explicit request and response DTOs/models instead of accepting anonymous shapes. |
| Immutability | Use record types for immutable request/response objects when mutation is unnecessary. |
| Names | Use meaningful property names that align with API design standards and the public contract. |
| Validation | Create clear model classes with [Required] and other validation attributes to enforce constraints. |
| Nullability | Leverage nullable annotations and init-only properties so required and optional data are visible in C# and OpenAPI. |
| Errors | Use ProblemDetailsService and StatusCodePages to get standard error responses. |
Do not leak EF entities or internal domain models as public API contracts unless the project explicitly treats them as contracts.
| Need | API | Guidance |
|---|---|---|
| Multiple outcomes | Results<T1, T2> | Represent success, validation, not-found, and error outcomes in the method signature. |
| Strong response metadata | TypedResults | Prefer TypedResults instead of Results so response types flow into OpenAPI. |
| Route parameters | Strongly-typed route parameters | Use explicit type binding such as int id, Guid id, or custom binders where supported. |
| Standard errors | TypedResults.Problem, TypedResults.ValidationProblem, TypedResults.NotFound | Align runtime behavior with documented OpenAPI responses. |
| Documentation item | How to express it |
|---|---|
| Operation name | Add operationIds using WithName. |
| Summary and description | Define operation summary and description on the endpoint metadata supported by the target .NET version. |
| Request/response content types | Set proper content types for requests and responses. |
| Property and parameter descriptions | Add descriptions to properties and parameters with [Description()]. |
| Document-wide metadata | Use document transformers to add servers, tags, security schemes, and other document-level elements. |
| Schema customization | Use schema transformers to apply customizations to OpenAPI schemas. |
| Built-in support | Use the built-in OpenAPI document support added in .NET 9 when the project targets it. |
## ASP.NET Minimal API result
**Status:** created | reviewed | blocked
**Endpoint group:** `<route group or feature>`
| Endpoint | Request type | Response types | OpenAPI metadata |
| --- | --- | --- | --- |
| `<METHOD /route>` | `<DTO or none>` | `Results<T1, T2>` | `WithName`, summary, description, content types |
### Implementation notes
- Grouping: `<MapGroup decision>`
- Validation: `<attributes/filter/service>`
- Error shape: `<ProblemDetails/StatusCodePages behavior>`
### Validation
- `<build/test/openapi command>`: pass | fail | not run
MapGroup() or the absence of grouping is justified.[Required] are applied where the public contract requires them.TypedResults and Results<T1, T2> where multiple response types are possible.ProblemDetailsService, StatusCodePages, or typed problem results.WithName, summaries/descriptions, content types, and useful schema metadata.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
aspnet-minimal-api, openapi, swagger, dotnet-9, endpoint-design
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin csharp-dotnet-development9 skills in this plugin
/csharp-asyncReview, design, and fix C# async code using Task, Task<T>, ValueTask<T>, cancellation, ConfigureAwait, async streams, and TAP conventions. Use when the user asks for C# async best practices, deadlock fixes, async method naming, parallel awaits, or replacing .Wait(), .Result, and async void./csharp-mstestApply modern MSTest 3.x/4.x testing practices for C# projects. Use when asked to write or review MSTest unit tests, choose assertion APIs, convert ExpectedException tests, design data-driven tests, use TestContext, configure lifecycle hooks, add categories or work items, or run dotnet test for MSTest./csharp-nunitDesign, write, and review NUnit tests for .NET projects, including standard tests, data-driven tests, assertions, setup/teardown, categories, and isolation with mocks. Use this skill when the user asks for NUnit best practices, `dotnet test`, `[TestCase]`, `[TestCaseSource]`, or C# unit test structure./csharp-tunitWrite, review, or migrate C# unit tests using TUnit. Use when the user asks for TUnit best practices, .NET test project setup, TUnit assertions, lifecycle hooks, data-driven tests, parallel execution, retries, categories, or xUnit-to-TUnit migration./csharp-xunitApply xUnit best practices for C# unit tests, including test project setup, Fact and Theory structure, data-driven tests, assertions, fixtures, mocking, categorization, diagnostics, and dotnet test execution. Use when asked for xUnit guidance or to write .NET unit tests./dotnet-best-practicesReview or improve .NET and C# code against solution/project best practices for documentation, architecture, dependency injection, resources, async, tests, configuration, Semantic Kernel, logging, performance, security, SOLID, and code quality. Use when asked for .net/c# or .NET/C# best practices or cleanup.Other plugins' skills for the same job