Agent skill · Testing & QA

dotnet-webapi

Guides creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling. USE FOR: adding new API endpoints (controllers or minimal APIs), wiring up OpenAPI/Swagger, creating .http test files, setting up global error handling middleware. DO NOT USE FOR: general C# coding style, EF Core data access or query optimization (use optimizing-ef-core-queries), frontend/Blazor work, gRPC services, or SignalR hubs.

dotnetgithub.com/dotnetGitHub ↗
claude-codeMIT
Install
npx skills add dotnet/skills --skill dotnet-webapi --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 21 KB
Bundled scripts: none
Path: plugins/dotnet-aspnetcore/skills/dotnet-webapi/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Guides creation and modification of ASP.NET Core Web API endpoints with proper HTTP semantics, OpenAPI documentation, and error handling.

How it works

  • Recommends using this skill for adding or modifying Web API endpoints implemented with controllers or minimal APIs, wiring up OpenAPI/Swagger metadata, defining request/response DTOs with consistent HTTP status behavior, and adding .http test files.
  • Specifies wiring up centralized API error handling middleware or exception mapping.
  • Provides detailed input/output DTO conventions (sealed records, XML docs, DateTimeOffset usage) and minimal API validation registration when using .NET 10+.
  • Outlines step-by-step implementation guidance: determine API style, define DTOs, implement endpoints (controllers or minimal APIs) with appropriate return types and cancellation handling, wire OpenAPI metadata, configure JSON options and enum serialization, set up OpenAPI without Swashbuckle on .NET 9+, and establish a global error handling strategy.
  • Recommends organizing minimal API endpoints by resource with static classes and Map<Resource> patterns, and preferring TypedResults with explicit return types when multiple results are possible.
  • Describes status codes for standard operations and guidance for 201 Created responses, cancellation tokens, and endpoint metadata chaining.
  • Emphasizes placing exception handling middleware and a dedicated Middleware directory, and using a service layer instead of direct data store injections.

When to use it

  • When adding or modifying ASP.NET Core HTTP APIs, including controllers or minimal APIs.
  • When wiring up OpenAPI/Swagger metadata and documenting endpoints.
  • When creating request/response DTOs and ensuring consistent HTTP status behavior.
  • When adding .http test files and configuring global error handling middleware.
  • When wiring up centralized API error handling and exception mapping.

What it can touch

  • Requires enabling OpenAPI support and using either controllers or minimal APIs as dictated by the project.
  • Instructions reference patterns like Program.cs, MapGet, MapPost, TypedResults, JsonStringEnumConverter, and IExceptionHandler implementations, and file organization under Middleware/.

Caveats

  • Do not use this skill for non-API tasks such as general C# coding style, EF Core data access or query optimization, frontend/Blazor work, gRPC services, or SignalR hubs.
  • It warns against Swashbuckle on .NET 9+ projects and proposes alternatives to OpenAPI configuration.
  • The skill prescribes specific DTO naming, XML docs, and DateTimeOffset usage to align with OpenAPI docs; deviations from these conventions may reduce compatibility with the guidance.
From the SKILL.md

# ASP.NET Core Web API Produce well-structured ASP.NET Core Web API endpoints with proper HTTP semantics, OpenAPI documentation, and error handling. ## When to Use Use this skill when working on ASP.NET Core HTTP APIs, including: - adding or modifying Web API endpoints implemented with controllers or minimal APIs; - wiring up OpenAPI/Swagger metadata and endpoint documentation; - defining request/response DTOs and consistent HTTP status code behavior; - adding `.http` files or similar request-based API testing artifacts; - configuring centralized API error handling middleware or exception mapping. ## When Not to Use Do not use this skill for: - general C# coding style or non-API refactoring; - EF Core data modeling or query optimization work; use `optimizing-ef-core-queries`; - frontend, Razor, or Blazor UI changes; - gRPC services; - SignalR hubs or real-time messaging flows. ## Inputs / prerequisites Before applying this skill, gather the project context needed to match the existing API style and wiring: - the ASP.NET Core entry point, typically `Program.cs`; - any existing controllers, especially classes inheriting `ControllerBase` or using `[ApiController]`; - any existing mini

What's inside
Steps it walks through
  1. When to Use
  2. When Not to Use
  3. Inputs / prerequisites
  4. Workflow
  5. Step 1: Determine the API style
  6. Step 2: Define request and response types
  7. Step 3: Implement the endpoints
  8. Step 4: Wire up OpenAPI
  9. Step 5: Set up error handling
  10. Step 6: Use a service layer
  11. Step 7: Create a .http test file
  12. Step 8: Build and verify
  13. Validation
  14. Common Pitfalls
More from skills
All skills →
About this skill
What does the dotnet-webapi skill do?

Guides creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling. USE FOR: adding new API endpoints (controllers or minimal APIs), wiring up OpenAPI/Swagger, creating .http test files, setting up global error handling middleware. DO NOT USE FOR: general C# coding style, EF Core data access or query optimization (use optimizing-ef-core-queries), frontend/Blazor work, gRPC services, or SignalR hubs.

How do I install it?

Run `npx skills add dotnet/skills --skill dotnet-webapi --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going