What problem does it solve?
This Skill prevents performance and reliability issues caused by misusing HttpClient, such as socket exhaustion, missing retry/timeout/circuit breaker behavior, and inconsistent cross-cutting concerns across services.
Core Features & Use Cases
- Safer client construction: Use IHttpClientFactory with named/typed/keyed clients to avoid per-request HttpClient creation and DNS/handler lifetime pitfalls.
- Production-grade resilience: Add standardized retry, circuit breaker, timeouts, rate limiting, and optional hedging for external calls.
- Clean cross-cutting integration: Register DelegatingHandlers for authentication, correlation IDs, and other pipeline concerns instead of scattering logic in service methods.
- Practical .NET testing: Validate behavior using custom HttpMessageHandler/test handlers rather than brittle integration-only patterns.
Use case example: You are implementing a payments API integration in a .NET 10 service that must reliably handle transient failures; use keyed clients plus AddStandardResilienceHandler and a DelegatingHandler for auth, then unit test using a mock HttpMessageHandler.
Quick Start
Load the httpclient-factory skill and ask for a recommended .NET 10 registration snippet that uses keyed HttpClient plus standard resilience and an auth DelegatingHandler for your target external API.