Tooluck logoTooluck
SKILL.md

aspnet-minimal-api-openapi

Agent skill fromgithub/awesome-copilot

Create ASP.NET Minimal API endpoints with proper OpenAPI documentation

How to install aspnet-minimal-api-openapi

install aspnet-minimal-api-openapi
# install the awesome-copilot pack with the skills CLI
npx skills add github/awesome-copilot

# or add only this skill to Claude Code: copy the folder

skills/aspnet-minimal-api-openapi/

# into

~/.claude/skills/aspnet-minimal-api-openapi/ (all projects)

.claude/skills/aspnet-minimal-api-openapi/ (one project)

skills/aspnet-minimal-api-openapi/SKILL.md

MITFull file
1# ASP.NET Minimal API with OpenAPI
2
3Your goal is to help me create well-structured ASP.NET Minimal API endpoints with correct types and comprehensive OpenAPI/Swagger documentation.
4
5## API Organization
6
7- Group related endpoints using `MapGroup()` extension
8- Use endpoint filters for cross-cutting concerns
9- Structure larger APIs with separate endpoint classes
10- Consider using a feature-based folder structure for complex APIs
11
12## Request and Response Types
13
14- Define explicit request and response DTOs/models
15- Create clear model classes with proper validation attributes
16- Use record types for immutable request/response objects
17- Use meaningful property names that align with API design standards
18- Apply `[Required]` and other validation attributes to enforce constraints
19- Use the ProblemDetailsService and StatusCodePages to get standard error responses
20
21## Type Handling
22
23- Use strongly-typed route parameters with explicit type binding
24- Use `Results<T1, T2>` to represent multiple response types
25- Return `TypedResults` instead of `Results` for strongly-typed responses
26- Leverage C# 10+ features like nullable annotations and init-only properties
27
28## OpenAPI Documentation
29
30- Use the built-in OpenAPI document support added in .NET 9
31- Define operation summary and description
32- Add operationIds using the `WithName` extension method
33- Add descriptions to properties and parameters with `[Description()]`
34- Set proper content types for requests and responses
35…

Excerpt shown under the repository's MIT license.

More skills in awesome-copilot

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates