dotnet-web-backend

Defines cross-cutting ASP.NET Core conventions for HTTP clients, validation, resilience, observability, and caching.

1|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/envoydev/claude-stack --skill dotnet-web-backend-envoydev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-web-backend
Source: https://github.com/envoydev/claude-stack/tree/main/stack/skills/dotnet-web-backend
Command: npx skills add https://github.com/envoydev/claude-stack --skill dotnet-web-backend-envoydev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? ASP.NET Core services accumulate inconsistent patterns when every developer wires HTTP clients, validation, retries, logging, and caching differently. This Skill establishes one architecture-neutral baseline for the cross-cutting concerns every .NET web service shares, so conventions are decided once and applied uniformly. ## Core Features & Use Cases - HTTP and resilience standards: Enforces IHttpClientFactory with typed clients and Microsoft.Extensions.Http.Resilience (Polly v8) via AddStandardResilienceHandler instead of hand-rolled retry pipelines. - API design rules: Mandates explicit route versioning, plural kebab-case resources, correct success status codes, opaque cursor pagination envelopes, and OpenAPI generation for every public API. - Observability and configuration: Wires OpenTelemetry traces, metrics, and structured logs to OTLP with correlation IDs and health checks, plus typed options validated at startup via ValidateOnStart. - Use Case: When building a new ASP.NET Core minimal API for an orders service, load this Skill first to get the correct HttpClient registration, FluentValidation choice, resilience handler, OTLP exporter wiring, and paging envelope before routing to focused companions like dotnet-minimal-api or dotnet-web-error-handling. ## Quick Start Load the dotnet-web-backend skill before starting any ASP.NET Core Web API or microservice work to apply the house cross-cutting baseline.

Frequently Asked Questions about dotnet-web-backend

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

FAQPage Schema
How do I configure HttpClient resilience in ASP.NET Core?▼

Use IHttpClientFactory with a typed client and call AddStandardResilienceHandler from Microsoft.Extensions.Http.Resilience. It adds rate limiting, timeouts, retry with backoff, and circuit breaking in one line, and you can tune retry attempts and timeouts through its options.

What validation library should I use for ASP.NET Core APIs?▼

FluentValidation is the default validator for ASP.NET Core services. Reserve ModelState and data annotations for genuinely trivial DTOs where a single Required attribute says everything there is to say.

How do I set up OpenTelemetry in a .NET web service?▼

Call AddOpenTelemetry on the service collection, configure a resource with your service name, then add ASP.NET Core and HttpClient instrumentation with OTLP exporters for tracing, metrics, and logging. This keeps application code identical across environments.

Does this guidance apply to .NET Framework 4.8 applications?▼

The baseline targets ASP.NET Core on .NET 8 and later. For .NET Framework 4.8, the classic pipeline differs materially: there is no IHttpClientFactory, the request context is single-threaded, and OWIN replaces Core middleware, so a dedicated reference covers those deltas.

Why does options validation not run at startup in ASP.NET Core?▼

Validation runs lazily on first access unless you call ValidateOnStart in the options registration chain. Without it, a misconfigured service boots successfully and throws deep inside a request instead of failing fast at startup with a clear message.

When should I use HybridCache versus IMemoryCache in .NET?▼

Use IMemoryCache for single-process short-TTL caching and HybridCache for multi-instance services needing an in-process L1 plus distributed L2 with stampede protection. HybridCache targets .NET Standard 2.0, so it runs on the .NET 8 floor.