/net10-web:aspnetcore-10from net10-web
Use when writing or reviewing ASP.NET Core 10 code in a project that targets net10.0: Minimal API validation, OpenAPI documents and transformers, Swagger/Swashbuckle replacement, YAML OpenAPI, Server-Sent Events, JSON Patch, cookie/Identity/passkey authentication, OpenTelemetry tracing, ASPDEPR obsoletion warnings, and ASP.NET Core 9 to 10 upgrades. USE FOR: "AddValidation", "validation problem", "async validation", "AddOpenApi", "MapOpenApi", "IOpenApiDocumentTransformer", "Microsoft.OpenApi.Models", "OpenApiSecurityScheme", "bearer security scheme", "openapi yaml", "WithOpenApi", "text/event-stream", "SSE", "JsonPatchDocument", "passkey", "401 instead of redirect", "AddAspNetCoreInstrumentation", "ASPDEPR002".."ASPDEPR008". DO NOT USE FOR: projects on net11.0 (async validation, OpenAPI 3.2 and native tracing exist there), Blazor component authoring (opt-in net10-blazor branch), or ASP.NET (System.Web) on .NET Framework.
Ships in net10-web. 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.
Read when SKILL.md points to them.
ASP.NET Core 10 is the LTS web stack of .NET 10. It ships Microsoft.AspNetCore.OpenApi 10 on top of Microsoft.OpenApi 2.x and built-in Minimal API validation. Models trained on .NET 8/9 samples write Swashbuckle and Microsoft.OpenApi 1.x code; models that saw .NET 11 previews reach for async validation attributes and OpenAPI 3.2, which do not exist here.
TargetFramework is net10.0 and every direct Microsoft.AspNetCore.* package reference is 10.0.x.
Do not add Microsoft.OpenApi 3.x: ASP.NET Core 10 is built against 2.x. (Transitive out-of-band packages at
11.x, such as System.Diagnostics.DiagnosticSource from OpenTelemetry 1.21, are fine on net10.0.)dotnet run <net10-guardrails>/scripts/api-exists.cs -- IEndpointConventionBuilder.DisableValidation --project <app.csproj>| Need | ASP.NET Core 10 |
|---|---|
| Validate Minimal API input | builder.Services.AddValidation(); + DataAnnotations / IValidatableObject on records, classes, parameters. Automatic 400 application/problem+json. Opt out per endpoint: .DisableValidation() |
| Async rules (DB lookups) | Not attributes. IEndpointFilter (runs after attribute validation) or the handler, returning TypedResults.ValidationProblem(errors) |
| OpenAPI document | builder.Services.AddOpenApi(); app.MapOpenApi(); → /openapi/v1.json, OpenAPI 3.1 by default |
| YAML | app.MapOpenApi("/openapi/{documentName}.yaml"); (built in, no package, no custom MapGet) |
| Transformers | using Microsoft.OpenApi; (not .Models), document.AddComponent<IOpenApiSecurityScheme>("Bearer", ...), new OpenApiSecuritySchemeReference("Bearer", document), operation.Security ??= []; |
| Per-endpoint docs | .WithSummary(), .WithDescription(), .WithTags(), [EndpointSummary], .AddOpenApiOperationTransformer(...) (not WithOpenApi) |
| Swagger UI | Swashbuckle UI only (Swashbuckle.AspNetCore.SwaggerUi, UseSwaggerUI(o => o.SwaggerEndpoint("/openapi/v1.json", "v1"))) or Scalar.AspNetCore; never AddSwaggerGen next to AddOpenApi |
| Server-Sent Events | TypedResults.ServerSentEvents(asyncEnumerable, eventType: "price"); SseItem<T> (namespace System.Net.ServerSentEvents) for id/retry |
| JSON Patch | package Microsoft.AspNetCore.JsonPatch.SystemTextJson, JsonPatchDocument<T> from that namespace; no AddNewtonsoftJson |
| Cookie auth on APIs | Known API endpoints return 401/403 instead of a login redirect. .AllowCookieRedirect() / .DisableCookieRedirect() per endpoint |
| Tracing | OpenTelemetry.Extensions.Hosting + OpenTelemetry.Instrumentation.AspNetCore: .WithTracing(t => t.AddAspNetCoreInstrumentation()) |
Compiled examples, also run in TestServer by the tree's runtime checks: examples/Validation.cs, examples/OpenApi.cs, examples/ServerSentEvents.cs.
.Result/.Wait()
inside IValidatableObject.Validate or a ValidationAttribute.JsonNode instead of OpenApiString/OpenApiObject,
JsonSchemaType.Null flag instead of schema.Nullable, *Reference classes instead of Reference = new OpenApiReference.TypedResults + Results<...> return types; they feed OpenAPI without [ProducesResponseType] upkeep.public partial class Program { } added for WebApplicationFactory<Program>: it is generated in .NET 10.AddValidation() is missing, it is called in a
different assembly than the types, or a root type is not discoverable from handler signatures (mark it
[ValidatableType], experimental in 10: ASP0029 in class libraries).int?) are not validated before .NET 11. Make them non-nullable or check manually.AddValidation covers Minimal APIs only, not MVC controllers or Razor Pages.int/long get a digits pattern instead of type: integer unless
NumberHandling = JsonNumberHandling.Strict; client generators may emit string.Produces/[ProducesResponseType] per status code survives in the 10 document.PasskeySignInAsync does not enforce lockout or RequireConfirmed* options on
.NET 10 — check them yourself before signing in. Set IdentityPasskeyOptions.ServerDomain; otherwise the RP ID
comes from the Host header (configure AllowedHosts).IExceptionHandler.TryHandleAsync returns true, diagnostics are suppressed.
Restore with new ExceptionHandlerOptions { SuppressDiagnosticsCallback = _ => false }.ApplyTo mutates the target even if a later operation fails; validate before saving.ASPDEPR002 WithOpenApi, ASPDEPR003 Razor runtime compilation,
ASPDEPR004/ASPDEPR008 WebHostBuilder/IWebHost/WebHost, ASPDEPR005 KnownNetworks
(use KnownIPNetworks + System.Net.IPNetwork), ASPDEPR006 IActionContextAccessor, ASPDEPR007 IncludeOpenAPIAnalyzers.| ASP.NET Core 11 | ASP.NET Core 10 instead |
|---|---|
AsyncValidationAttribute, IAsyncValidatableObject | IEndpointFilter / handler + TypedResults.ValidationProblem (examples/Validation.cs) |
Validation localization (ValidationOptions.LocalizerProvider, IValidationMessageFormatter) | ErrorMessageResourceType/ErrorMessageResourceName on attributes, or CustomizeProblemDetails |
OpenAPI 3.2 default, OpenApiSpecVersion.OpenApi3_2, Microsoft.OpenApi 3.x | 3.1 (default) or OpenApi3_0; Microsoft.OpenApi 2.x |
Native tracing via .AddSource("Microsoft.AspNetCore") | OpenTelemetry.Instrumentation.AspNetCore + AddAspNetCoreInstrumentation() |
[ShortCircuit] attribute | .ShortCircuit() endpoint convention |
Zstandard response compression (ZstandardCompressionProviderOptions) | Brotli / Gzip providers |
| Automatic CSRF middleware | AddAntiforgery() + app.UseAntiforgery(), [ValidateAntiForgeryToken] |
Bundled dotnet new mcpserver template | dotnet new install Microsoft.McpServer.ProjectTemplates first |
C# union types in request/response bodies, [JsonUnion] | [JsonPolymorphic] + [JsonDerivedType] hierarchies |
Blazor DisplayName<T>, <BasePath />, [SupplyParameterFromTempData], async form validators | see the reference file |
Full tables (32 legacy → .NET 10 rewrites, breaking changes, doc snippets that do not compile, all 11-only APIs incl. SignalR and Blazor): references/aspnetcore-10-reference.md.
dotnet-webapi (Microsoft): building Web APIs end to end (ProblemDetails, versioning, controllers).aspire (community): .NET Aspire AppHost and service defaults.opentelemetry-net-instrumentation (community): tracing/metrics/logs setup in depth.net10-blazor branch (author-component, support-prerendering, ...).migrate-dotnet9-to-dotnet10 (Microsoft): full upgrade checklist.create-datadriven-aspnetcore still suggests .WithOpenApi(); on .NET 10 use
.WithSummary() / .AddOpenApiOperationTransformer() instead (ASPDEPR002).What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub codehepta/net10-skills --plugin net10-web3 skills in this plugin
/aspireBuild, upgrade, and operate Aspire 13.5.x C# or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing, MCP, and deployment patterns for distributed apps. USE FOR: Aspire.AppHost.Sdk, Aspire.Hosting.*, DistributedApplication.CreateBuilder, apphost.mts, createBuilder, WithReference, WaitFor, AddProject, AddRedis, AddPostgres, aspire run, aspire init, aspire. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made./dotnet-webapiGuides 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.