[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EA12JX8KMZNGYWTYWXSMSX":3,"skill-same:01M7EA12JX8KMZNGYWTYWXSMSX":110},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":13,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7EA12JX8KMZNGYWTYWXSMSX","aspnetcore",null,"Host-level .NET code for ASP.NET Core 10 and worker services. Covers the Generic Host, DI lifetimes, options, middleware order, minimal API endpoints, ProblemDetails, typed HTTP clients with resilience, health checks, background services, and the wiring of CORS, rate limits, and authentication. Use when the user writes or reviews Program.cs, endpoints, controllers, middleware, DI registrations, options classes, HttpClient code, BackgroundService or IHostedService, or health checks in a project with Microsoft.NET.Sdk.Web or Microsoft.Extensions.Hosting. Not for C# language rules (dev-stack:csharp), security rules (dev-stack:secure-coding), OpenAPI and versioning detail (dev-stack:aspnetcore-openapi), FluentValidation rules (dev-stack:fluentvalidation), EF Core (dev-stack:efcore), logging setup (dev-stack:dotnet-observability), or Aspire AppHost wiring.","Charmedme\u002Fmaikelsoft-skills","Charmedme","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11330182?v=4","01M7E9YWP4Z4JJ1BRXTMWNXAEV","01M7E9YWPS4N3GKRGAYBBDJWNQ",0,"MIT","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: aspnetcore\ndescription: Host-level .NET code for ASP.NET Core 10 and worker services. Covers the Generic Host, DI lifetimes, options, middleware order, minimal API endpoints, ProblemDetails, typed HTTP clients with resilience, health checks, background services, and the wiring of CORS, rate limits, and authentication. Use when the user writes or reviews Program.cs, endpoints, controllers, middleware, DI registrations, options classes, HttpClient code, BackgroundService or IHostedService, or health checks in a project with Microsoft.NET.Sdk.Web or Microsoft.Extensions.Hosting. Not for C# language rules (dev-stack:csharp), security rules (dev-stack:secure-coding), OpenAPI and versioning detail (dev-stack:aspnetcore-openapi), FluentValidation rules (dev-stack:fluentvalidation), EF Core (dev-stack:efcore), logging setup (dev-stack:dotnet-observability), or Aspire AppHost wiring.\nmetadata:\n  verified: \"2026-10-27\"\n  versions: \".NET 10 (10.0.14, SDK 10.0.403), ASP.NET Core 10, Microsoft.Extensions.Http.Resilience 10.11.0, .NET 11 RC 3 in references\u002Fnet11.md\"\n---\n\n# ASP.NET Core and the Generic Host\n\nThis skill covers code that needs a host: `IServiceCollection`, `IHost`, `HttpContext`, or an endpoint. Code that compiles in a plain class library is `dev-stack:csharp`, and this skill does not repeat its rules. Security rules are in `dev-stack:secure-coding`. This skill only shows where the security parts go in the pipeline.\n\n## First\n\n1. Read `references\u002Fstack-rules.md`.\n2. Read the version gate:\n   - Read `TargetFramework` in the `*.csproj` files and in `Directory.Build.props`, and the `Sdk` attribute.\n   - `net10.0`: use this file. The app runs on runtime 10.0.14 or later, a security release of 2026-10-25. Check the base image tag or the runtime version in CI.\n   - `net11.0`: also read `references\u002Fnet11.md`. Its rules apply only when the project targets `net11.0`.\n   - `net8.0` or `net9.0`: the rules apply, except `AddValidation` (rule 24) and the .NET 10 behavior changes (rules 9, 22, 34). Both versions end support on 2026-11-10. Tell the human.\n   - A ServiceDefaults project (Aspire) exists: it already adds resilience, health checks, and OpenTelemetry. Do not add them a second time. Use the `aspire` skill for that project.\n3. Read `Program.cs` and one existing feature before you write. The project style wins in existing code (stack rule 3).\n\nDone when you can name the target framework, the endpoint style (minimal APIs or controllers), the validation library, and the error style of the project.\n\n## Defaults for new code\n\nExisting code keeps its style. For new code, use the accepted decision in `docs\u002Fdev-team\u002Fdecisions.md`. When a decision has no accepted answer, ask the human (stack rule 4). The detail of each decision is in `references\u002Fdecisions.md`.\n\n| Area | Default | ID |\n|------|---------|----|\n| Endpoints | Minimal APIs | API-01 |\n| Organization | Static `MapX` per feature, `MapGroup`, named static handler methods | API-02 |\n| Contracts | `sealed record` per request and per response, no entities | API-03 |\n| Errors | ProblemDetails everywhere, extension `code`, `traceId` | API-04 |\n| Expected failures | `TypedResults` union, no result library | API-05 |\n| Handlers | Direct handler class, no mediator (MediatR is not allowed) | API-06 |\n| Mapping | Manual, Mapperly for large mappings (AutoMapper is not allowed) | API-07 |\n| Validation | `AddValidation` for shape rules, FluentValidation when the project uses it | API-08 |\n| JSON | Web defaults, `JsonStringEnumConverter`, `NumberHandling.Strict`, `DateTimeOffset` | API-11 |\n| Paging | Offset with a maximum page size and a stable sort | API-12 |\n| Idempotency | Natural (client id or unique key), key header only for external side effects | API-13 |\n| Rate limiting | Built-in limiter, 429, named policies on sensitive endpoints | API-14 |\n| CORS | Same origin, else one named policy with exact origins | API-15 |\n| Health | `\u002Fhealthz\u002Flive` and `\u002Fhealthz\u002Fready` | API-16 |\n| URLs | `\u002Fapi\u002Forders\u002F{id}\u002Fline-items`, actions as `POST \u002Fapi\u002Forders\u002F{id}\u002Fcancel` | API-17 |\n| Options | Typed options, DataAnnotations, `ValidateOnStart` | CFG-01 |\n| Secrets | User-secrets in Development, environment or orchestrator secrets in production | CFG-02 |\n| Feature flags | Plain options, Microsoft.FeatureManagement for rollouts | CFG-03 |\n| Outbound HTTP | Typed client | CFG-05 |\n| Resilience | Standard handler on all clients, no retry for unsafe methods | CFG-06 |\n| Background work | `BackgroundService`, Hangfire when a job must survive a restart | CFG-07 |\n| Authentication | JWT bearer from the IdP of the organization, browser SPA through a BFF | CFG-08 |\n| Authorization | Fallback policy \"authenticated user\", named policies | CFG-09 |\n| Messages | Stable `code` plus English `detail`, the client translates | CFG-10 |\n\n## Rules\n\n### Host and DI\n\n1. Use `WebApplication.CreateBuilder` for web apps and `Host.CreateApplicationBuilder` for workers. `WebHost` and `WebHostBuilder` are obsolete in .NET 10. A `Startup` class still works, but it is the old model.\n2. Register the services of a feature in `AddX(this IServiceCollection)` and map its endpoints in `MapX(this IEndpointRouteBuilder)`. `Program.cs` then stays short.\n3. Turn on `ValidateScopes` and `ValidateOnBuild` in each environment with `builder.Host.UseDefaultServiceProvider`. Production turns them off by default, so a captive dependency shows only under load.\n4. A singleton or a hosted service does not take a scoped service. Create a scope per unit of work with `IServiceScopeFactory.CreateAsyncScope()`.\n5. Do not call `BuildServiceProvider()` during registration. It makes a second container with its own singletons. Use the `(sp, ...) =>` factory overloads or `IOptions\u003CT>`.\n\n### Configuration and options\n\n6. Bind each settings section to an options class: `AddOptions\u003CT>().BindConfiguration(section).ValidateDataAnnotations().ValidateOnStart()`. Bad configuration then stops the start, not the first request.\n7. Mark nested objects with `[ValidateObjectMembers]` and lists with `[ValidateEnumeratedItems]`. Without them, the validator skips the members. For trimming or native AOT, use a source-generated `[OptionsValidator]`.\n8. Read `IOptions\u003CT>` for values that do not change, `IOptionsMonitor\u003CT>` in a singleton that must see changes. Use `IOptionsSnapshot\u003CT>` only in scoped services.\n9. .NET 10: a JSON `null` in configuration now binds as `null` (or `default(T)` for a value type). It no longer keeps the default value of the class. Remove a `null` entry that means \"use the default\", and validate required values.\n10. Keep secrets out of `appsettings.json`. Read them from user-secrets in Development and from environment variables, orchestrator secrets, or a vault in production.\n\n### Pipeline order\n\n11. Add middleware in this order: `UseForwardedHeaders` (behind a proxy), `UseExceptionHandler`, `UseStatusCodePages`, `UseHsts`, `UseHttpsRedirection`, `UseCors`, `UseAuthentication`, `UseAuthorization`, `UseRateLimiter`, then the endpoints. The order is the behavior: a wrong order gives a wrong client IP, failed CORS preflights, or unprotected endpoints.\n\n### Endpoints\n\n12. Write new endpoints as minimal APIs. In a project with controllers, add controllers. Do not mix the two styles in one project.\n13. Return `TypedResults`. Declare more than one outcome with a `Results\u003CT1, T2>` return type. A ternary with `TypedResults` and no declared return type does not compile (CS1678, CS1661).\n14. Take a `CancellationToken` in each handler and pass it to each I\u002FO call (CA2016).\n15. A create returns 201 with a `Location` header (`TypedResults.Created`, `CreatedAtRoute`). A delete returns 204.\n16. Use `sealed record` types for requests and responses, and `DateTimeOffset` for instants. Do not expose EF entities, because they leak fields and change the contract with each schema change.\n17. Call handler classes directly and map with a static `ToResponse()` method or a constructor. MediatR and AutoMapper are not allowed (stack rule 5).\n18. Configure JSON with `ConfigureHttpJsonOptions` for minimal APIs and `AddJsonOptions` for controllers. They are two different option objects. In an existing API, keep the JSON settings, because a change breaks clients.\n\n### Errors\n\n19. Register `AddProblemDetails()`, `UseExceptionHandler()`, and `UseStatusCodePages()`. Then each error is `application\u002Fproblem+json`, and endpoints need no try\u002Fcatch.\n20. Return expected failures as results: `TypedResults.NotFound()`, or `TypedResults.Problem` with status 409 and a `code` extension. Throw exceptions only for bugs and infrastructure failures.\n21. Map infrastructure exceptions to a status code in one `IExceptionHandler`, or with `ExceptionHandlerOptions.StatusCodeSelector`.\n22. .NET 10: when `TryHandleAsync` returns `true`, the middleware does not log the exception. It also does not add `error.type` to the metric. Log in the handler, or set `SuppressDiagnosticsCallback = _ => false`.\n23. Do not put `exception.Message` or a stack trace in a response. Do not call `UseDeveloperExceptionPage()`: `WebApplication` turns it on in Development.\n\n### Validation\n\n24. .NET 10 minimal APIs: call `builder.Services.AddValidation()` and put DataAnnotations on the request records. Invalid input then gets a 400 ProblemDetails. The source generator sees only the types of the assembly that calls `AddValidation`.\n25. When the project uses FluentValidation: inject `IValidator\u003CT>`, call `ValidateAsync` with the token, and return `TypedResults.ValidationProblem(result.ToDictionary())`. For minimal APIs, use one small generic endpoint filter (`references\u002Fendpoints-errors.md`). Do not use the package `FluentValidation.AspNetCore`: its owner deprecated it. Rules for validators: `dev-stack:fluentvalidation`.\n26. Validate one contract with one library. Two libraries give two error formats.\n\n### Outbound HTTP\n\n27. Use typed clients from `AddHttpClient\u003CTClient>()`. Do not create `new HttpClient()` per call, because it exhausts sockets.\n28. Do not inject a typed client into a singleton. The singleton keeps one handler and does not see DNS changes. In a singleton, inject `IHttpClientFactory` and create a named client per call.\n29. Add one resilience handler per client: `ConfigureHttpClientDefaults(b => b.AddStandardResilienceHandler())`. A second handler on a client stacks, and a test counted 16 attempts, not 4 attempts. To change one client, first call `RemoveAllResilienceHandlers()` (experimental, EXTEXP0001). Then add the handler of the client.\n30. Turn off retries for calls that are not idempotent: `options.Retry.DisableForUnsafeHttpMethods()`. The standard handler retries POST by default and can write twice.\n31. Keep `HttpClient.Timeout` (100 s default) above the total timeout of the pipeline (30 s default), or set `Timeout.InfiniteTimeSpan`.\n32. Do not add `Microsoft.Extensions.Http.Polly` to new code. It pins Polly 7. Use `Microsoft.Extensions.Http.Resilience`.\n\n### Health, background work, shutdown\n\n33. Liveness runs no checks (`Predicate = _ => false`). Readiness runs the checks with the tag `ready`. Mark both `AllowAnonymous()` and `ShortCircuit()`, and keep them off the public ingress.\n34. .NET 10: `ExecuteAsync` runs fully on a background thread, so code before the first `await` no longer delays the start. Put work that must finish before the app takes traffic in `StartAsync`.\n35. In a `BackgroundService` loop, use `PeriodicTimer(period, timeProvider)`, one scope per iteration, and a catch per iteration that lets `OperationCanceledException` pass. An unhandled exception stops the host.\n36. Pass `stoppingToken` to each call. Keep shutdown work under `HostOptions.ShutdownTimeout` (30 s default) and under the grace period of the orchestrator.\n37. For work that starts in a request and ends later, write to a `Channel\u003CT>` that a `BackgroundService` reads. `Task.Run` from a request loses the work on shutdown and loses the request scope.\n\n### Cross-cutting wiring\n\nThe security rules for these parts are in `dev-stack:secure-coding`. This skill gives the place in the pipeline.\n\n38. Behind a proxy, configure `KnownIPNetworks` or `KnownProxies` and call `UseForwardedHeaders` first. `KnownNetworks` is obsolete (ASPDEPR005).\n39. CORS: one named policy with exact origins from configuration. Call `UseCors` before `UseAuthorization`.\n40. Authorization: set a fallback policy `RequireAuthenticatedUser()`, use named policies, and mark public endpoints `AllowAnonymous()`. A forgotten attribute then fails closed.\n41. Rate limiting: `AddRateLimiter` with `RejectionStatusCode = 429` (the default is 503), and `RequireRateLimiting` on login, export, upload, and expensive endpoints.\n42. File uploads: follow `dev-stack:secure-coding` (file signatures, size limits, storage).\n\n### OpenAPI and versioning\n\n43. Use `AddOpenApi()` and `MapOpenApi()` in Development. Do not add Swashbuckle to a new project (API-09). Do not call `.WithOpenApi()` (ASPDEPR002). Declare each status code with `Results\u003C...>` and `.ProducesProblem(status)`. Detail, Scalar, and versioning: `dev-stack:aspnetcore-openapi`.\n\n## Never write\n\n| Wrong | Correct |\n|-------|---------|\n| `Startup.cs`, `WebHost.CreateDefaultBuilder(args)` | `WebApplication.CreateBuilder(args)` in `Program.cs` |\n| `services.BuildServiceProvider()` to read a setting | `(sp, x) => sp.GetRequiredService\u003CIOptions\u003CT>>().Value` |\n| `services.Configure\u003CT>(config.GetSection(\"X\"))` without validation | `AddOptions\u003CT>().BindConfiguration(\"X\").ValidateDataAnnotations().ValidateOnStart()` |\n| `configuration[\"Payment:Url\"]` in a service | Inject `IOptions\u003CPaymentOptions>` |\n| Scoped `DbContext` in a singleton or `BackgroundService` constructor | `IServiceScopeFactory.CreateAsyncScope()` per unit of work |\n| `Results.Ok(x)` and `IResult` everywhere | `TypedResults.Ok(x)` with `Results\u003COk\u003CT>, NotFound>` |\n| `try { } catch (Exception ex) { return StatusCode(500, ex.Message); }` | `UseExceptionHandler()` and an `IExceptionHandler` |\n| `Detail = exception.Message` | A fixed title and a stable `code` |\n| Own exception middleware class | `IExceptionHandler` or `StatusCodeSelector` |\n| `app.UseDeveloperExceptionPage();` | Nothing: Development has it by default |\n| `AddFluentValidation()`, `AddFluentValidationAutoValidation()` | `ValidateAsync` in an endpoint filter |\n| `using var client = new HttpClient();` in a method | Typed client from `AddHttpClient\u003CT>()` |\n| `.AddTransientHttpErrorPolicy(p => p.WaitAndRetryAsync(3, ...))` | `.AddStandardResilienceHandler()` |\n| `services.AddStandardResilienceHandler()` | It extends `IHttpClientBuilder`: `AddHttpClient\u003CT>().AddStandardResilienceHandler()` |\n| Two resilience handlers on one client | One handler, or `RemoveAllResilienceHandlers()` first |\n| `Task.Run(() => SendMailAsync())` in a handler | `Channel\u003CT>` and a `BackgroundService` |\n| `while (true) { ...; await Task.Delay(10000); }` | `PeriodicTimer` with `TimeProvider` and `stoppingToken` |\n| `AddSwaggerGen()` and `.WithOpenApi()` in a new .NET 10 API | `AddOpenApi()`, `MapOpenApi()` |\n| `KnownNetworks.Add(new IPNetwork(...))` | `KnownIPNetworks.Add(IPNetwork.Parse(\"10.0.0.0\u002F8\"))` |\n| `AllowAnyOrigin()` with `AllowCredentials()` | `WithOrigins(origins)` from configuration |\n| `public partial class Program { }` for tests | Not needed in .NET 10 |\n| MediatR `ISender.Send(...)`, AutoMapper `IMapper.Map(...)` | Handler class, manual mapping or Mapperly |\n\n## Check\n\nRun the tools in this order. Fix each error. For each warning, fix it or give the reason.\n\n1. Build with the analyzers. Pass: 0 warnings and 0 errors.\n\n   ```\n   dotnet build -warnaserror\n   ```\n\n2. Check the format. Pass: exit code 0.\n\n   ```\n   dotnet format --verify-no-changes\n   ```\n\n3. Run the rule check of this skill. Pass: `stackcheck: 0 errors`. In an existing project, add `--changed \u003Cbase branch>`.\n\n   ```\n   python3 \u003Cskill folder>\u002Fscripts\u002Fstackcheck.py --root \u003Crepo>\n   ```\n\n4. Find deprecated and vulnerable packages. Pass: no rows.\n\n   ```\n   dotnet list package --deprecated --vulnerable --include-transitive\n   ```\n\n5. Run the tests. Pass: all green, including one test that starts the host with `ValidateOnBuild` and one HTTP test per new endpoint (`dev-stack:dotnet-testing`).\n\n   ```\n   dotnet test\n   ```\n\n## Review checklist\n\nThe full list is in `references\u002Freview-checklist.md`.\n\n1. `Program.cs` uses `WebApplication.CreateBuilder` or `Host.CreateApplicationBuilder`. tool (ASPDEPR004, ASPDEPR008, ASP-WEBHOST)\n2. No `BuildServiceProvider()` during registration. tool (ASP0000, ASP-BUILD-PROVIDER)\n3. No scoped service in a singleton or hosted service, and `ValidateOnBuild` is on. judge\n4. Each options class binds a section, validates it, and uses `ValidateOnStart`. tool (ASP-OPTIONS-NO-VALIDATE, ASP-OPTIONS-CONFIGURE-SECTION)\n5. Middleware order matches rule 11. tool (ASP-ORDER-CORS, ASP-ORDER-AUTH, ASP-ORDER-FORWARDED) and judge\n6. Handlers return `TypedResults` with a declared `Results\u003C...>` type. tool (ASP-RESULTS-UNTYPED)\n7. Each handler takes a `CancellationToken` and passes it on. tool (CA2016) and judge\n8. Requests and responses are records, not entities. judge\n9. Errors are ProblemDetails, and no response contains an exception message. tool (ASP-EXCEPTION-MESSAGE) and judge\n10. An `IExceptionHandler` that returns `true` logs the exception. judge\n11. No `new HttpClient(`, no typed client in a singleton. tool (ASP-NEW-HTTPCLIENT) and judge\n12. One resilience handler per client, no retry for unsafe methods, no Polly 7. tool (ASP-PKG-HTTP-POLLY, ASP-POLLY-POLICY) and judge\n13. Liveness has no checks, readiness has the `ready` checks. judge\n14. A `BackgroundService` uses a scope and a catch per iteration and honors `stoppingToken`. judge\n15. No deprecated FluentValidation integration, no MediatR, no AutoMapper. tool (ASP-PKG-FV-ASPNETCORE, ASP-FV-AUTOVALIDATION, ASP-PKG-MEDIATR, ASP-PKG-AUTOMAPPER)\n\n## Report\n\nEnd with the report of stack rule 8 (`references\u002Fstack-rules.md`): the same headings in the same order on each run.\n\n## References\n\n- `references\u002Fprogram-template.md`: read before you write a new `Program.cs`, endpoint group, typed client, exception handler, background service, or worker. All code compiled.\n- `references\u002Fhosting-di-options.md`: read when you register services, bind options, or write a hosted service.\n- `references\u002Fendpoints-errors.md`: read when you write an endpoint, a request or response type, error handling, validation, or JSON settings.\n- `references\u002Fhttp-resilience.md`: read when the code calls another HTTP API.\n- `references\u002Fpipeline-wiring.md`: read when you add forwarded headers, CORS, authentication, authorization, rate limiting, or health endpoints.\n- `references\u002Fnet11.md`: read only when the project targets `net11.0`.\n- `references\u002Fdecisions.md`: read when new code needs a decision from the defaults table.\n- `references\u002Freview-checklist.md`: read when you review a change.\n- `references\u002Fsources.md`: the primary sources and the date of each check.\n- `references\u002Fstack-rules.md`: the common rules of each dev-stack skill.\n- `references\u002Flanguage.md`: the rules for text output.\n","# ASP.NET Core and the Generic Host\n\nThis skill covers code that needs a host: `IServiceCollection`, `IHost`, `HttpContext`, or an endpoint. Code that compiles in a plain class library is `dev-stack:csharp`, and this skill does not repeat its rules. Security rules are in `dev-stack:secure-coding`. This skill only shows where the security parts go in the pipeline.\n\n## First\n\n1. Read `references\u002Fstack-rules.md`.\n2. Read the version gate:\n   - Read `TargetFramework` in the `*.csproj` files and in `Directory.Build.props`, and the `Sdk` attribute.\n   - `net10.0`: use this file. The app runs on runtime 10.0.14 or later, a security release of 2026-10-25. Check the base image tag or the runtime version in CI.\n   - `net11.0`: also read `references\u002Fnet11.md`. Its rules apply only when the project targets `net11.0`.\n   - `net8.0` or `net9.0`: the rules apply, except `AddValidation` (rule 24) and the .NET 10 behavior changes (rules 9, 22, 34). Both versions end support on 2026-11-10. Tell the human.\n   - A ServiceDefaults project (Aspire) exists: it already adds resilience, health checks, and OpenTelemetry. Do not add them a second time. Use the `aspire` skill for that project.\n3. Read `Program.cs` and one existing feature before you write. The project style wins in existing code (stack rule 3).\n\nDone when you can name the target framework, the endpoint style (minimal APIs or controllers), the validation library, and the error style of the project.\n\n## Defaults for new code\n\nExisting code keeps its style. For new code, use the accepted decision in `docs\u002Fdev-team\u002Fdecisions.md`. When a decision has no accepted answer, ask the human (stack rule 4). The detail of each decision is in `references\u002Fdecisions.md`.\n\n| Area | Default | ID |\n|------|---------|----|\n| Endpoints | Minimal APIs | API-01 |\n| Organization | Static `MapX` per feature, `MapGroup`, named static handler methods | API-02 |\n| Contracts | `sealed record` per request and per response, no entities | API-03 |\n| Errors | ProblemDetails everywhere, extension `code`, `traceId` | API-04 |\n| Expected failures | `TypedResults` union, no result library | API-05 |\n| Handlers | Direct handler class, no mediator (MediatR is not allowed) | API-06 |\n| Mapping | Manual, Mapperly for large mappings (AutoMapper is not allowed) | API-07 |\n| Validation | `AddValidation` for shape rules, FluentValidation when the project uses it | API-08 |\n| JSON | Web defaults, `JsonStringEnumConverter`, `NumberHandling.Strict`, `DateTimeOffset` | API-11 |\n| Paging | Offset with a maximum page size and a stable sort | API-12 |\n| Idempotency | Natural (client id or unique key), key header only for external side effects | API-13 |\n| Rate limiting | Built-in limiter, 429, named policies on sensitive endpoints | API-14 |\n| CORS | Same origin, else one named policy with exact origins | API-15 |\n| Health | `\u002Fhealthz\u002Flive` and `\u002Fhealthz\u002Fready` | API-16 |\n| URLs | `\u002Fapi\u002Forders\u002F{id}\u002Fline-items`, actions as `POST \u002Fapi\u002Forders\u002F{id}\u002Fcancel` | API-17 |\n| Options | Typed options, DataAnnotations, `ValidateOnStart` | CFG-01 |\n| Secrets | User-secrets in Development, environment or orchestrator secrets in production | CFG-02 |\n| Feature flags | Plain options, Microsoft.FeatureManagement for rollouts | CFG-03 |\n| Outbound HTTP | Typed client | CFG-05 |\n| Resilience | Standard handler on all clients, no retry for unsafe methods | CFG-06 |\n| Background work | `BackgroundService`, Hangfire when a job must survive a restart | CFG-07 |\n| Authentication | JWT bearer from the IdP of the organization, browser SPA through a BFF | CFG-08 |\n| Authorization | Fallback policy \"authenticated user\", named policies | CFG-09 |\n| Messages | Stable `code` plus English `detail`, the client translates | CFG-10 |\n\n## Rules\n\n### Host and DI\n\n1. Use `WebApplication.CreateBuilder` for web apps and `Host.CreateApplicationBuilder` for workers. `WebHost` and `WebHostBuilder` are obsolete in .NET 10. A `Startup` class still works, but it is the old model.\n2. Register the services of a feature in `AddX(this IServiceCollection)` and map its endpoints in `MapX(this IEndpointRouteBuilder)`. `Program.cs` then stays short.\n3. Turn on `ValidateScopes` and `ValidateOnBuild` in each environment with `builder.Host.UseDefaultServiceProvider`. Production turns them off by default, so a captive dependency shows only under load.\n4. A singleton or a hosted service does not take a scoped service. Create a scope per unit of work with `IServiceScopeFactory.CreateAsyncScope()`.\n5. Do not call `BuildServiceProvider()` during registration. It makes a second container with its own singletons. Use the `(sp, ...) =>` factory overloads or `IOptions\u003CT>`.\n\n### Configuration and options\n\n6. Bind each settings section to an options class: `AddOptions\u003CT>().BindConfiguration(section).ValidateDataAnnotations().ValidateOnStart()`. Bad configuration then stops the start, not the first request.\n7. Mark nested objects with `[ValidateObjectMembers]` and lists with `[ValidateEnumeratedItems]`. Without them, the validator skips the members. For trimming or native AOT, use a source-generated `[OptionsValidator]`.\n8. Read `IOptions\u003CT>` for values that do not change, `IOptionsMonitor\u003CT>` in a singleton that must see changes. Use `IOptionsSnapshot\u003CT>` only in scoped services.\n9. .NET 10: a JSON `null` in configuration now binds as `null` (or `default(T)` for a value type). It no longer keeps the default value of the class. Remove a `null` entry that means \"use the default\", and validate required values.\n10. Keep secrets out of `appsettings.json`. Read them from user-secrets in Development and from environment variables, orchestrator secrets, or a vault in production.\n\n### Pipeline order\n\n11. Add middleware in this order: `UseForwardedHeaders` (behind a proxy), `UseExceptionHandler`, `UseStatusCodePages`, `UseHsts`, `UseHttpsRedirection`, `UseCors`, `UseAuthentication`, `UseAuthorization`, `UseRateLimiter`, then the endpoints. The order is the behavior: a wrong order gives a wrong client IP, failed CORS preflights, or unprotected endpoints.\n\n### Endpoints\n\n12. Write new endpoints as minimal APIs. In a project with controllers, add controllers. Do not mix the two styles in one project.\n13. Return `TypedResults`. Declare more than one outcome with a `Results\u003CT1, T2>` return type. A ternary with `TypedResults` and no declared return type does not compile (CS1678, CS1661).\n14. Take a `CancellationToken` in each handler and pass it to each I\u002FO call (CA2016).\n15. A create returns 201 with a `Location` header (`TypedResults.Created`, `CreatedAtRoute`). A delete returns 204.\n16. Use `sealed record` types for requests and responses, and `DateTimeOffset` for instants. Do not expose EF entities, because they leak fields and change the contract with each schema change.\n17. Call handler classes directly and map with a static `ToResponse()` method or a constructor. MediatR and AutoMapper are not allowed (stack rule 5).\n18. Configure JSON with `ConfigureHttpJsonOptions` for minimal APIs and `AddJsonOptions` for controllers. They are two different option objects. In an existing API, keep the JSON settings, because a change breaks clients.\n\n### Errors\n\n19. Register `AddProblemDetails()`, `UseExceptionHandler()`, and `UseStatusCodePages()`. Then each error is `application\u002Fproblem+json`, and endpoints need no try\u002Fcatch.\n20. Return expected failures as results: `TypedResults.NotFound()`, or `TypedResults.Problem` with status 409 and a `code` extension. Throw exceptions only for bugs and infrastructure failures.\n21. Map infrastructure exceptions to a status code in one `IExceptionHandler`, or with `ExceptionHandlerOptions.StatusCodeSelector`.\n22. .NET 10: when `TryHandleAsync` returns `true`, the middleware does not log the exception. It also does not add `error.type` to the metric. Log in the handler, or set `SuppressDiagnosticsCallback = _ => false`.\n23. Do not put `exception.Message` or a stack trace in a response. Do not call `UseDeveloperExceptionPage()`: `WebApplication` turns it on in Development.\n\n### Validation\n\n24. .NET 10 minimal APIs: call `builder.Services.AddValidation()` and put DataAnnotations on the request records. Invalid input then gets a 400 ProblemDetails. The source generator sees only the types of the assembly that calls `AddValidation`.\n25. When the project uses FluentValidation: inject `IValidator\u003CT>`, call `ValidateAsync` with the token, and return `TypedResults.ValidationProblem(result.ToDictionary())`. For minimal APIs, use one small generic endpoint filter (`references\u002Fendpoints-errors.md`). Do not use the package `FluentValidation.AspNetCore`: its owner deprecated it. Rules for validators: `dev-stack:fluentvalidation`.\n26. Validate one contract with one library. Two libraries give two error formats.\n\n### Outbound HTTP\n\n27. Use typed clients from `AddHttpClient\u003CTClient>()`. Do not create `new HttpClient()` per call, because it exhausts sockets.\n28. Do not inject a typed client into a singleton. The singleton keeps one handler and does not see DNS changes. In a singleton, inject `IHttpClientFactory` and create a named client per call.\n29. Add one resilience handler per client: `ConfigureHttpClientDefaults(b => b.AddStandardResilienceHandler())`. A second handler on a client stacks, and a test counted 16 attempts, not 4 attempts. To change one client, first call `RemoveAllResilienceHandlers()` (experimental, EXTEXP0001). Then add the handler of the client.\n30. Turn off retries for calls that are not idempotent: `options.Retry.DisableForUnsafeHttpMethods()`. The standard handler retries POST by default and can write twice.\n31. Keep `HttpClient.Timeout` (100 s default) above the total timeout of the pipeline (30 s default), or set `Timeout.InfiniteTimeSpan`.\n32. Do not add `Microsoft.Extensions.Http.Polly` to new code. It pins Polly 7. Use `Microsoft.Extensions.Http.Resilience`.\n\n### Health, background work, shutdown\n\n33. Liveness runs no checks (`Predicate = _ => false`). Readiness runs the checks with the tag `ready`. Mark both `AllowAnonymous()` and `ShortCircuit()`, and keep them off the public ingress.\n34. .NET 10: `ExecuteAsync` runs fully on a background thread, so code before the first `await` no longer delays the start. Put work that must finish before the app takes traffic in `StartAsync`.\n35. In a `BackgroundService` loop, use `PeriodicTimer(period, timeProvider)`, one scope per iteration, and a catch per iteration that lets `OperationCanceledException` pass. An unhandled exception stops the host.\n36. Pass `stoppingToken` to each call. Keep shutdown work under `HostOptions.ShutdownTimeout` (30 s default) and under the grace period of the orchestrator.\n37. For work that starts in a request and ends later, write to a `Channel\u003CT>` that a `BackgroundService` reads. `Task.Run` from a request loses the work on shutdown and loses the request scope.\n\n### Cross-cutting wiring\n\nThe security rules for these parts are in `dev-stack:secure-coding`. This skill gives the place in the pipeline.\n\n38. Behind a proxy, configure `KnownIPNetworks` or `KnownProxies` and call `UseForwardedHeaders` first. `KnownNetworks` is obsolete (ASPDEPR005).\n39. CORS: one named policy with exact origins from configuration. Call `UseCors` before `UseAuthorization`.\n40. Authorization: set a fallback policy `RequireAuthenticatedUser()`, use named policies, and mark public endpoints `AllowAnonymous()`. A forgotten attribute then fails closed.\n41. Rate limiting: `AddRateLimiter` with `RejectionStatusCode = 429` (the default is 503), and `RequireRateLimiting` on login, export, upload, and expensive endpoints.\n42. File uploads: follow `dev-stack:secure-coding` (file signatures, size limits, storage).\n\n### OpenAPI and versioning\n\n43. Use `AddOpenApi()` and `MapOpenApi()` in Development. Do not add Swashbuckle to a new project (API-09). Do not call `.WithOpenApi()` (ASPDEPR002). Declare each status code with `Results\u003C...>` and `.ProducesProblem(status)`. Detail, Scalar, and versioning: `dev-stack:aspnetcore-openapi`.\n\n## Never write\n\n| Wrong | Correct |\n|-------|---------|\n| `Startup.cs`, `WebHost.CreateDefaultBuilder(args)` | `WebApplication.CreateBuilder(args)` in `Program.cs` |\n| `services.BuildServiceProvider()` to read a setting | `(sp, x) => sp.GetRequiredService\u003CIOptions\u003CT>>().Value` |\n| `services.Configure\u003CT>(config.GetSection(\"X\"))` without validation | `AddOptions\u003CT>().BindConfiguration(\"X\").ValidateDataAnnotations().ValidateOnStart()` |\n| `configuration[\"Payment:Url\"]` in a service | Inject `IOptions\u003CPaymentOptions>` |\n| Scoped `DbContext` in a singleton or `BackgroundService` constructor | `IServiceScopeFactory.CreateAsyncScope()` per unit of work |\n| `Results.Ok(x)` and `IResult` everywhere | `TypedResults.Ok(x)` with `Results\u003COk\u003CT>, NotFound>` |\n| `try { } catch (Exception ex) { return StatusCode(500, ex.Message); }` | `UseExceptionHandler()` and an `IExceptionHandler` |\n| `Detail = exception.Message` | A fixed title and a stable `code` |\n| Own exception middleware class | `IExceptionHandler` or `StatusCodeSelector` |\n| `app.UseDeveloperExceptionPage();` | Nothing: Development has it by default |\n| `AddFluentValidation()`, `AddFluentValidationAutoValidation()` | `ValidateAsync` in an endpoint filter |\n| `using var client = new HttpClient();` in a method | Typed client from `AddHttpClient\u003CT>()` |\n| `.AddTransientHttpErrorPolicy(p => p.WaitAndRetryAsync(3, ...))` | `.AddStandardResilienceHandler()` |\n| `services.AddStandardResilienceHandler()` | It extends `IHttpClientBuilder`: `AddHttpClient\u003CT>().AddStandardResilienceHandler()` |\n| Two resilience handlers on one client | One handler, or `RemoveAllResilienceHandlers()` first |\n| `Task.Run(() => SendMailAsync())` in a handler | `Channel\u003CT>` and a `BackgroundService` |\n| `while (true) { ...; await Task.Delay(10000); }` | `PeriodicTimer` with `TimeProvider` and `stoppingToken` |\n| `AddSwaggerGen()` and `.WithOpenApi()` in a new .NET 10 API | `AddOpenApi()`, `MapOpenApi()` |\n| `KnownNetworks.Add(new IPNetwork(...))` | `KnownIPNetworks.Add(IPNetwork.Parse(\"10.0.0.0\u002F8\"))` |\n| `AllowAnyOrigin()` with `AllowCredentials()` | `WithOrigins(origins)` from configuration |\n| `public partial class Program { }` for tests | Not needed in .NET 10 |\n| MediatR `ISender.Send(...)`, AutoMapper `IMapper.Map(...)` | Handler class, manual mapping or Mapperly |\n\n## Check\n\nRun the tools in this order. Fix each error. For each warning, fix it or give the reason.\n\n1. Build with the analyzers. Pass: 0 warnings and 0 errors.\n\n   ```\n   dotnet build -warnaserror\n   ```\n\n2. Check the format. Pass: exit code 0.\n\n   ```\n   dotnet format --verify-no-changes\n   ```\n\n3. Run the rule check of this skill. Pass: `stackcheck: 0 errors`. In an existing project, add `--changed \u003Cbase branch>`.\n\n   ```\n   python3 \u003Cskill folder>\u002Fscripts\u002Fstackcheck.py --root \u003Crepo>\n   ```\n\n4. Find deprecated and vulnerable packages. Pass: no rows.\n\n   ```\n   dotnet list package --deprecated --vulnerable --include-transitive\n   ```\n\n5. Run the tests. Pass: all green, including one test that starts the host with `ValidateOnBuild` and one HTTP test per new endpoint (`dev-stack:dotnet-testing`).\n\n   ```\n   dotnet test\n   ```\n\n## Review checklist\n\nThe full list is in `references\u002Freview-checklist.md`.\n\n1. `Program.cs` uses `WebApplication.CreateBuilder` or `Host.CreateApplicationBuilder`. tool (ASPDEPR004, ASPDEPR008, ASP-WEBHOST)\n2. No `BuildServiceProvider()` during registration. tool (ASP0000, ASP-BUILD-PROVIDER)\n3. No scoped service in a singleton or hosted service, and `ValidateOnBuild` is on. judge\n4. Each options class binds a section, validates it, and uses `ValidateOnStart`. tool (ASP-OPTIONS-NO-VALIDATE, ASP-OPTIONS-CONFIGURE-SECTION)\n5. Middleware order matches rule 11. tool (ASP-ORDER-CORS, ASP-ORDER-AUTH, ASP-ORDER-FORWARDED) and judge\n6. Handlers return `TypedResults` with a declared `Results\u003C...>` type. tool (ASP-RESULTS-UNTYPED)\n7. Each handler takes a `CancellationToken` and passes it on. tool (CA2016) and judge\n8. Requests and responses are records, not entities. judge\n9. Errors are ProblemDetails, and no response contains an exception message. tool (ASP-EXCEPTION-MESSAGE) and judge\n10. An `IExceptionHandler` that returns `true` logs the exception. judge\n11. No `new HttpClient(`, no typed client in a singleton. tool (ASP-NEW-HTTPCLIENT) and judge\n12. One resilience handler per client, no retry for unsafe methods, no Polly 7. tool (ASP-PKG-HTTP-POLLY, ASP-POLLY-POLICY) and judge\n13. Liveness has no checks, readiness has the `ready` checks. judge\n14. A `BackgroundService` uses a scope and a catch per iteration and honors `stoppingToken`. judge\n15. No deprecated FluentValidation integration, no MediatR, no AutoMapper. tool (ASP-PKG-FV-ASPNETCORE, ASP-FV-AUTOVALIDATION, ASP-PKG-MEDIATR, ASP-PKG-AUTOMAPPER)\n\n## Report\n\nEnd with the report of stack rule 8 (`references\u002Fstack-rules.md`): the same headings in the same order on each run.\n\n## References\n\n- `references\u002Fprogram-template.md`: read before you write a new `Program.cs`, endpoint group, typed client, exception handler, background service, or worker. All code compiled.\n- `references\u002Fhosting-di-options.md`: read when you register services, bind options, or write a hosted service.\n- `references\u002Fendpoints-errors.md`: read when you write an endpoint, a request or response type, error handling, validation, or JSON settings.\n- `references\u002Fhttp-resilience.md`: read when the code calls another HTTP API.\n- `references\u002Fpipeline-wiring.md`: read when you add forwarded headers, CORS, authentication, authorization, rate limiting, or health endpoints.\n- `references\u002Fnet11.md`: read only when the project targets `net11.0`.\n- `references\u002Fdecisions.md`: read when new code needs a decision from the defaults table.\n- `references\u002Freview-checklist.md`: read when you review a change.\n- `references\u002Fsources.md`: the primary sources and the date of each check.\n- `references\u002Fstack-rules.md`: the common rules of each dev-stack skill.\n- `references\u002Flanguage.md`: the rules for text output.\n",{"name":5,"metadata":23,"description":7},{"verified":24,"versions":25},"2026-10-27",".NET 10 (10.0.14, SDK 10.0.403), ASP.NET Core 10, Microsoft.Extensions.Http.Resilience 10.11.0, .NET 11 RC 3 in references\u002Fnet11.md","main","c247fa77bdea99449b9df09f93d92a35fed91874","plugins\u002Fdev-stack\u002Fskills\u002Faspnetcore","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills","https:\u002F\u002Fgithub.com\u002FCharmedme","2026-11-13 14:41:21",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Charmedme\u002Fmaikelsoft-skills --skill aspnetcore",{"tool":38,"command":39},"bunx","bunx skills add Charmedme\u002Fmaikelsoft-skills --skill aspnetcore",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Charmedme\u002Fmaikelsoft-skills --skill aspnetcore","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002FSKILL.md",true,[46,52,56,60,64,68,72,76,80,84,88,92,96,102,106],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fdecisions.md","REFERENCE","参考文档",22220,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fdecisions.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fendpoints-errors.md",15635,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fendpoints-errors.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fhosting-di-options.md",10548,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fhosting-di-options.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fhttp-resilience.md",9259,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fhttp-resilience.md",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Flanguage.md",4840,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Flanguage.md",{"path":69,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fnet11.md",7126,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fnet11.md",{"path":73,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fpipeline-wiring.md",9318,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fpipeline-wiring.md",{"path":77,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fprogram-template.md",18592,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fprogram-template.md",{"path":81,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Freview-checklist.md",7611,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Freview-checklist.md",{"path":85,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fsources.md",9567,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fsources.md",{"path":89,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fstack-rules.md",7772,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Freferences\u002Fstack-rules.md",{"path":93,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":94,"sourceHtmlUrl":95},"rules.json",24441,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Frules.json",{"path":97,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":100,"sourceHtmlUrl":101},"scripts\u002Fconvert.py","SCRIPT","脚本",2928,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Fscripts\u002Fconvert.py",{"path":103,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":104,"sourceHtmlUrl":105},"scripts\u002Fdoccheck.py",29463,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Fscripts\u002Fdoccheck.py",{"path":107,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":108,"sourceHtmlUrl":109},"scripts\u002Fstackcheck.py",12200,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Faspnetcore\u002Fscripts\u002Fstackcheck.py",[111,118,125,132,139,146],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":18},"01M7EA9S53810TTZTXYDGBWXHY","web-accessibility","Web accessibility to WCAG 2.2 AA - a checklist for the design, the tool checks (axe-core, the Tab walk, reduced motion), and the manual checks that no tool does (screen reader, zoom, status messages) - with the EAA and EN 301 549 status. Use when a design, mockup, or built feature must be checked for accessibility, when a review must cover keyboard and screen reader use, when the user asks about focus, a focus trap, contrast, or a screen reader on a page, or when the user asks which accessibility rules apply.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fweb-accessibility\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":18},"01M7EA9MGJ7ESKQ7WE2Z96858T","ux-states","State inventory for each screen - default, empty, loading, partial, error, success, disabled, overflow, offline, and the business states (no permission, stale data, locked by another user, waiting on an external system, bulk result with failures, read only) - with what the user sees, can do, and how the user recovers. Use when a screen or flow needs its states designed or checked, or when a design shows only the happy path.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-states\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":18},"01M7EA9FHYR0C26BHNQF7AZT4Q","ux-setup","Set up a project for UX work - finds the design tools, the design-system source, the brand files, the languages, and the run command, asks the human one round of questions, and writes the \"## Design\" section of .claude\u002Frules\u002Fdelivery.md that the ux-design commands and the ux-designer agent read. Moves an older \"## Design\" section out of CLAUDE.md. Use when \u002Fsetup, \u002Fux-design, or \u002Fux-review needs the design facts, when the ux-designer agent returns NEEDS_HUMAN because the \"## Design\" section is missing, or when the user wants to set up or change the design tools of a project.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-setup\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":18},"01M7EA99DQDFVJQBJNYDJQC643","ux-review","UX review of a built feature against its approved design - Playwright walks each flow and state at 390, 820, and 1440 px, axe-core and the tell checks run on each state, and each heuristic gets a verdict - with findings by owner, severity, and origin, and a verdict in ux-review.md in the work folder of the item. Use when a built feature or screen must be checked against its design, mockups, or prototype, in each state or at each screen size, when built screens need findings by severity, when the build of an item with a UX design is done, or when existing screens need a UX audit.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-review\u002FSKILL.md",[],[],{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":18},"01M7EA95YPJQQ1YDW5HS0RVAN2","ux-prototype","Clickable prototype of a designed story in the proto-shell standard, with variants for an A\u002FB test, all states in scope, three sizes, and a test plan with tasks. Use when a design or mockups exist and the team must test the flow or compare variants with users before the build.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-prototype\u002FSKILL.md",[],[],{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":18},"01M7EA91SKA2RNFGW9VDG9JFW7","ux-practice","The method of the ux-designer agent for the UX design of a story, a feature, or a screen - Double Diamond phases, a design spec with a source for each decision, the UX decision log, evidence tags, severity, and the modes light, full, and new-direction. Preloaded by the ux-designer agent. Use when the ux-designer agent or another UX skill names this method. For the design of an item, a person starts ux-design:ux-design.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-practice\u002FSKILL.md",[],[]]