codewithmukesh/dotnet-claude-kit/openapi
Claude Code and agent skill by codewithmukesh/dotnet-claude-kit
- community
Checking that the SKILL.md file is still in the repository.
Built-in OpenAPI support for .NET 10 applications. Covers document generation, transformers, TypedResults metadata, security schemes, XML comments, build-time generation, and multiple document support. No Swashbuckle needed. Load this skill when setting up API documentation, customizing OpenAPI output, adding security schemes to docs, or when the user mentions "OpenAPI", "AddOpenApi", "MapOpenApi", "document transformer", "operation transformer", "schema transformer", "OpenAPI 3.1", "API documentation", "Swashbuckle replacement", "Produces", "WithSummary", "WithDescription", "ProblemDetails", "Kiota", or "client generation".
Install
npx vskill@latest install codewithmukesh/dotnet-claude-kit/openapiSKILL.md
The same SKILL.md was published earlier as codewithmukesh/dotnet-claude-kit/openapi.
OpenAPI
Core Principles
- Built-in, not Swashbuckle — .NET 10 ships
Microsoft.AspNetCore.OpenApias the official, framework-maintained OpenAPI solution. Swashbuckle was removed from templates in .NET 9 and is no longer recommended. - TypedResults drive the schema —
TypedResults.Ok<T>()automatically generates correct OpenAPI response schemas.Results.Ok()does not. Always useTypedResults. - Transformers over workarounds — Document, operation, and schema transformers compose cleanly. Use them for security schemes, global responses, and schema customization.
- Metadata on every endpoint — Use
.WithName(),.WithSummary(),.WithTags()on every endpoint. This metadata feeds directly into the OpenAPI spec and client generators.
Patterns
Basic Setup
Endpoint Metadata
With TypedResults, response metadata is inferred automatically:
Bearer Token Security Scheme
Document Info Transformer
Multiple OpenAPI Documents
Endpoints without .WithGroupName() appear in all documents.
XML Documentation Comments (.NET 10)
Enable in the project file — the source generator extracts <summary>, <param>, <response> tags automatically:
XML comments on lambdas are not captured by the compiler. Use named methods.
Schema Transformer
Per-Endpoint Operation Transformer (.NET 10)
Build-Time Document Generation
The spec file is generated in the output directory during build.
YAML Endpoint (.NET 10)
Anti-patterns
Don't Use Swashbuckle for New Projects
Don't Use WithOpenApi() in .NET 10
Don't Use Untyped Results
Don't Skip WithName on Endpoints
Don't Use OpenApiAny in .NET 10
Decision Guide
| Scenario | Recommendation | |
|---|---|---|
| New API project | AddOpenApi() + MapOpenApi() (built-in) | |
| API documentation UI | Scalar (MapScalarApiReference()) | |
| Security schemes in docs | Document transformer with IOpenApiDocumentTransformer | |
| Response documentation | TypedResults with union return types | |
| XML doc integration | <GenerateDocumentationFile>true</GenerateDocumentationFile> | |
| Multiple API versions | Multiple AddOpenApi("v1") calls + WithGroupName() | |
| Client code generation | Kiota (Microsoft recommended) or NSwag | |
| Build-time spec | Microsoft.Extensions.ApiDescription.Server package | |
| OpenAPI version | 3.1 (default in .NET 10), force 3.0 if consumers require it | |
| Per-endpoint customization | .AddOpenApiOperationTransformer() on the endpoint |
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/openapi/SKILL.md
Popularity
- Repository stars
- 471
- Repository forks
- 121
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Jun 2026, 5 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/codewithmukesh/dotnet-claude-kit/openapi)