
httpclient-factory
IHttpClientFactory and typed HTTP clients for .NET 10 applications
by codewithmukeshFree
Description
HttpClient Factory is an agent skill that guides how a .NET 10 application creates and uses HTTP clients. It covers IHttpClientFactory, named, typed and keyed clients, and DelegatingHandlers. The core advice is to avoid creating a new HttpClient for each request, since that can exhaust sockets under load and ignores DNS changes. It recommends keyed clients over typed clients, because typed clients captured in singletons can silently break handler rotation. It asks that every external HTTP call have retry, a circuit breaker and a timeout, and shows the standard resilience handler as a one-line set of defaults. Authentication tokens, correlation IDs and logging belong in the handler pipeline instead of being scattered across service methods. The skill is for .NET developers who call external APIs and want reliable, well-structured HTTP code, and the agent applies these rules when it writes or reviews that code in your project.…
Highlights
- Named, typed and keyed HTTP clients
- Standard resilience handler with retry, circuit breaker and timeout
- DelegatingHandlers for auth, correlation IDs and logging
- Guidance against a new HttpClient per request
- Written for .NET 10 applications
Ratings & Reviews
No ratings yet
Be the first to rate httpclient-factory.
People also visit
httpclient-factory FAQ
What does the httpclient-factory skill cover?
IHttpClientFactory and how to use named, typed and keyed clients, DelegatingHandlers for cross-cutting work, and resilience for external calls.
Why does it advise against new HttpClient() per request?
Creating a client for every request can exhaust sockets under load, and it ignores DNS changes. A factory manages handler lifetimes instead.
How do I install it?
Run npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill httpclient-factory in your project.
Which .NET version is it for?
The skill targets .NET 10 applications.
What do the security audits say?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best httpclient-factory alternatives?
Popular alternatives to httpclient-factory include dotnet-10-csharp-14, minimal-api and resilience. See all httpclient-factory alternatives






