dotnet-webapi

Creates ASP.NET Core Web API endpoints with OpenAPI metadata and error handling.

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/bittlinkm/claude-setup --skill dotnet-webapi-bittlinkm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-webapi
Source: https://github.com/bittlinkm/claude-setup/tree/main/skills/dotnet-webapi
Command: npx skills add https://github.com/bittlinkm/claude-setup --skill dotnet-webapi-bittlinkm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building ASP.NET Core Web APIs involves many decisions—controllers vs minimal APIs, DTO design, status codes, OpenAPI wiring, and error handling—and inconsistent choices lead to fragile, poorly documented endpoints. This Skill guides the creation and modification of Web API endpoints so they follow correct HTTP semantics, proper OpenAPI documentation, and centralized error handling. ## Core Features & Use Cases - Endpoint Implementation: Adds or modifies endpoints using controllers or minimal APIs, matching the existing project style and defaulting to minimal APIs for new projects. - DTO and OpenAPI Conventions: Enforces sealed record DTOs, DateTimeOffset, string-serialized enums, XML doc comments, and built-in .NET 9+ OpenAPI support without Swashbuckle. - Error Handling and Testing: Sets up RFC 7807 Problem Details via IExceptionHandler middleware and generates .http test files for every endpoint. - Use Case: When asked to add a products CRUD API to an existing ASP.NET Core project, the Skill inspects the current style, creates request/response records, implements endpoints with correct status codes and CancellationToken forwarding, wires OpenAPI metadata, and produces a .http file to verify each route. ## Quick Start Ask the AI to add a new REST endpoint for a resource in your ASP.NET Core project, including DTOs, OpenAPI metadata, error handling, and a .http test file.

Frequently Asked Questions about dotnet-webapi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new endpoint to an ASP.NET Core Web API?

First inspect the project for existing controllers or minimal API registrations, then follow that same style. Create sealed record request/response DTOs, implement the endpoint with correct status codes and CancellationToken, and add OpenAPI metadata like WithName and WithSummary.

Should I use controllers or minimal APIs in ASP.NET Core?

Match whatever style the project already uses and never mix both in one project. For brand-new projects, default to minimal APIs unless controllers are explicitly requested, organizing endpoints by resource in static Map methods.

Does .NET 9 need Swashbuckle for OpenAPI documentation?

No, .NET 9 and later include built-in OpenAPI support via AddOpenApi() and MapOpenApi() with no extra packages. Swashbuckle has known compatibility issues with .NET 9+ OpenAPI types and should only be used for .NET 8 or earlier projects.

Why does TypedResults cause a CS1593 delegate error in minimal APIs?

The error occurs when TypedResults.Ok and TypedResults.NotFound are used in a ternary without an explicit return type, since they share no common base type. Annotate the handler with Task<Results<Ok<T>, NotFound>> so the compiler can infer the signature.

When should I not use this Web API guidance?

Do not apply it to EF Core query optimization, general C# style refactors, Blazor or Razor frontend work, gRPC services, or SignalR hubs. It is scoped specifically to HTTP Web API endpoints, DTOs, OpenAPI, and error handling.