Akka.NET Testing Patterns
Aaronontheweb/dotnet-skills
Shows how to test Akka.NET actors with Akka.Hosting.TestKit: swapping services for fakes, using TestProbes, and checking persistence, plus when the older TestKit still fits.
IHttpClientFactory and typed HTTP clients for .NET 10 applications.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit httpclient-factory --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/httpclient-factory .claude/skills/httpclient-factory && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "httpclient-factory" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/httpclient-factory into .claude/skills/httpclient-factory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "httpclient-factory", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/httpclient-factoryType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit httpclient-factory --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/httpclient-factory .agents/skills/httpclient-factory && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "httpclient-factory" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/httpclient-factory into .agents/skills/httpclient-factory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "httpclient-factory", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit httpclient-factory --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/httpclient-factory .cursor/skills/httpclient-factory && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "httpclient-factory" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/httpclient-factory into .cursor/skills/httpclient-factory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "httpclient-factory", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/codewithmukesh/dotnet-claude-kit.git --path skills/httpclient-factory--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit httpclient-factory --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/httpclient-factory .gemini/skills/httpclient-factory && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "httpclient-factory" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/httpclient-factory into .gemini/skills/httpclient-factory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "httpclient-factory", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install codewithmukesh/dotnet-claude-kit httpclient-factoryInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/httpclient-factory .github/skills/httpclient-factory && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "httpclient-factory" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/httpclient-factory into .github/skills/httpclient-factory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "httpclient-factory", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit httpclient-factory --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/httpclient-factory .opencode/skills/httpclient-factory && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "httpclient-factory" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/httpclient-factory into .opencode/skills/httpclient-factory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "httpclient-factory", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
httpclient-factoryIHttpClientFactory and typed HTTP clients for .NET 10 applications.
Httpclient Factory is an agent skill from codewithmukesh/dotnet-claude-kit. IHttpClientFactory and typed HTTP clients for .NET 10 applications. Covers named/typed/keyed clients, DelegatingHandlers, resilience with Microsoft.Extensions.Http.Resilience, and testing patterns. Load this skill when configuring HTTP clients, adding retry/circuit breaker policies, or when the user mentions "HttpClient", "IHttpClientFactory", "AddHttpClient", "typed client", "named client", "DelegatingHandler", "resilience", "retry", "circuit breaker", "hedging", "Polly", "AddStandardResilienceHandler", "socket…
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Test strategy. It works with .NET. The repository describes itself as: Make Claude Code a .NET 10 Expert. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 2330089. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.github.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Httpclient Factory loads about 2.3k tokens when it runs. Until then it costs about 140 tokens; SKILL.md has 274 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from codewithmukesh/dotnet-claude-kit at commit 2330089, republished under its MIT licence (© codewithmukesh). 274 words, ~2,258 tokens.
.claude/skills/httpclient-factory/SKILL.md (or your agent's skills folder).new HttpClient() per request — Raw HttpClient creation causes socket exhaustion under load and ignores DNS changes. Use IHttpClientFactory to manage handler lifetimes..AddAsKeyed()) is the recommended pattern in .NET 10. Typed clients captured in singletons silently break handler rotation.AddStandardResilienceHandler() provides sensible defaults in one line.builder.Services.AddHttpClient("github", client =>
{
client.BaseAddress = new Uri("https://api.github.com/");
client.DefaultRequestHeaders.UserAgent.ParseAdd("MyApp/1.0");
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json"));
})
.AddStandardResilienceHandler();
// Usage via factory
public sealed class GitHubService(IHttpClientFactory factory)
{
public async Task<Repo?> GetRepoAsync(string owner, string name, CancellationToken ct)
{
var client = factory.CreateClient("github");
return await client.GetFromJsonAsync<Repo>($"repos/{owner}/{name}", ct);
}
}Combines named client configurability with direct injection. No string lookups.
builder.Services.AddHttpClient("payments", client =>
{
client.BaseAddress = new Uri("https://api.payments.example.com/");
})
.AddStandardResilienceHandler()
.AddAsKeyed(); // Register as keyed scoped service
// Inject directly — no IHttpClientFactory needed
app.MapPost("/charge", async (
[FromKeyedServices("payments")] HttpClient httpClient,
ChargeRequest request,
CancellationToken ct) =>
{
var response = await httpClient.PostAsJsonAsync("charges", request, ct);
return response.IsSuccessStatusCode
? TypedResults.Ok()
: TypedResults.Problem("Payment failed");
});Global opt-in: builder.Services.ConfigureHttpClientDefaults(b => b.AddAsKeyed());
AddStandardResilienceHandler() chains 5 strategies:
| Strategy | Default |
|---|---|
| Rate limiter | 1000 concurrent requests |
| Total timeout | 30 seconds |
| Retry | 3 retries, exponential backoff with jitter |
| Circuit breaker | Opens at 10% failure rate |
| Attempt timeout | 10 seconds per attempt |
builder.Services.AddHttpClient("api")
.AddStandardResilienceHandler(options =>
{
options.Retry.MaxRetryAttempts = 5;
options.Retry.Delay = TimeSpan.FromSeconds(1);
options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(60);
options.AttemptTimeout.Timeout = TimeSpan.FromSeconds(15);
// Disable retries for non-idempotent methods
options.Retry.DisableForUnsafeHttpMethods();
});public sealed class AuthenticationHandler(ITokenService tokenService)
: DelegatingHandler
{
protected override async Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request, CancellationToken cancellationToken)
{
var token = await tokenService.GetAccessTokenAsync(cancellationToken);
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
return await base.SendAsync(request, cancellationToken);
}
}
// Registration
builder.Services.AddTransient<AuthenticationHandler>();
builder.Services.AddHttpClient("api")
.AddHttpMessageHandler<AuthenticationHandler>()
.AddStandardResilienceHandler();public sealed class CorrelationIdHandler(IHttpContextAccessor httpContextAccessor)
: DelegatingHandler
{
protected override Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request, CancellationToken cancellationToken)
{
if (httpContextAccessor.HttpContext?.Request.Headers
.TryGetValue("X-Correlation-Id", out var correlationId) is true)
{
request.Headers.Add("X-Correlation-Id", correlationId.ToString());
}
return base.SendAsync(request, cancellationToken);
}
}builder.Services.AddHttpClient("advanced")
.UseSocketsHttpHandler((handler, _) =>
{
handler.PooledConnectionLifetime = TimeSpan.FromMinutes(2);
handler.PooledConnectionIdleTimeout = TimeSpan.FromMinutes(1);
handler.MaxConnectionsPerServer = 100;
handler.AutomaticDecompression =
DecompressionMethods.GZip | DecompressionMethods.Brotli;
});public sealed class MockHttpHandler(
HttpStatusCode statusCode,
string content) : HttpMessageHandler
{
protected override Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request, CancellationToken cancellationToken)
{
return Task.FromResult(new HttpResponseMessage(statusCode)
{
Content = new StringContent(content, Encoding.UTF8, "application/json")
});
}
}
// In test
var handler = new MockHttpHandler(HttpStatusCode.OK, """{"id":1}""");
var client = new HttpClient(handler) { BaseAddress = new Uri("https://api.test/") };
var service = new MyService(client);// BAD — socket exhaustion under load, ignores DNS changes
public async Task<string> GetDataAsync()
{
using var client = new HttpClient();
return await client.GetStringAsync("https://api.example.com/data");
}
// GOOD — factory-managed
public async Task<string> GetDataAsync(CancellationToken ct)
{
var client = factory.CreateClient("api");
return await client.GetStringAsync("https://api.example.com/data", ct);
}// BAD — transient HttpClient captured by singleton defeats handler rotation
services.AddSingleton<MySingletonService>();
services.AddHttpClient<MySingletonService>();
// GOOD — use keyed client or IHttpClientFactory in singletons
services.AddSingleton<MySingletonService>();
services.AddHttpClient("myservice").AddAsKeyed(ServiceLifetime.Singleton);// BAD — not thread-safe
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", token);
// GOOD — use DelegatingHandler or per-request HttpRequestMessage
using var request = new HttpRequestMessage(HttpMethod.Get, "/api/data");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
await httpClient.SendAsync(request, ct);// BAD — no cancellation support
var result = await httpClient.GetFromJsonAsync<Order>("/orders/1");
// GOOD — always pass CancellationToken
var result = await httpClient.GetFromJsonAsync<Order>("/orders/1", cancellationToken);// BAD — conflicting resilience strategies
builder.AddStandardResilienceHandler();
builder.AddStandardHedgingHandler();
// GOOD — one standard handler, or a custom pipeline
builder.AddStandardResilienceHandler();| Scenario | Recommendation |
|---|---|
| New .NET 10 project | Keyed clients with AddAsKeyed() |
| Singleton service needs HttpClient | Named client via IHttpClientFactory or keyed singleton |
| External API calls | AddStandardResilienceHandler() on every client |
| Auth token injection | DelegatingHandler registered with AddHttpMessageHandler |
| Hedging (parallel requests) | AddStandardHedgingHandler() for latency-sensitive calls |
| Non-idempotent methods | DisableForUnsafeHttpMethods() on retry options |
| Custom retry logic | AddResilienceHandler("name", builder => ...) |
| Connection pooling control | UseSocketsHttpHandler with PooledConnectionLifetime |
| API client generation | Refit with AddRefitClient<T>() |
| Integration testing | Custom HttpMessageHandler or MockHttpMessageHandler |
© codewithmukesh, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/httpclient-factory of codewithmukesh/dotnet-claude-kit.
Open the folder on GitHubat commit 2330089
We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in codewithmukesh/dotnet-claude-kit, which our catalogue first saw on October 7, 2026.
Httpclient Factory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Httpclient Factory this skillcodewithmukesh/dotnet-claude-kit | 751 | 1 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Akka.NET Testing PatternsAaronontheweb/dotnet-skills | 1.2k | 1 repos | ~2.4k | Automated safety check: Pass | MIT | |
| MAUI UI Test Shard Rebalancerdotnet/maui | 23k | — | ~995 | Automated safety check: Pass | MIT | |
| Verify Tests Catch the Bugdotnet/maui | 23k | — | ~2.7k | Automated safety check: Pass | MIT | |
| Dotnet Testingnovotnyllc/dotnet-artisan | 233 | — | ~972 | Automated safety check: Pass | MIT | |
| Csharp Testingaffaan-m/ECC | 274k | 1 repos | ~2.2k | Automated safety check: Pass | MIT |
Aaronontheweb/dotnet-skills
Shows how to test Akka.NET actors with Akka.Hosting.TestKit: swapping services for fakes, using TestProbes, and checking persistence, plus when the older TestKit still fits.
dotnet/maui
Splits a slow .NET MAUI UI-test category into method-level CI shards sized from historical Azure DevOps timings so each job fits a target duration.
dotnet/maui
Confirms that newly added tests actually fail without the fix, auto-detecting UI, device, unit or XAML tests and running the matching runner.
novotnyllc/dotnet-artisan
Defines .NET test strategy and implementation patterns across xUnit v3 (Facts, Theories, fixtures, IAsyncLifetime), integration testing (WebApplicationFactory, Testcontainers), Aspire testing…
affaan-m/ECC
C and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices.
affaan-m/ECC
F testing patterns with xUnit, FsUnit, Unquote, FsCheck property-based testing, integration tests, and test organization best practices.
codewithmukesh/dotnet-claude-kit
API versioning strategies for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
Architecture-aware feature scaffolding for .NET 10 projects.
codewithmukesh/dotnet-claude-kit
Architecture selection advisor for .NET applications. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
.NET Aspire for cloud-native orchestration. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
Authentication and authorization for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
Caching strategies for .NET 10 applications. An agent skill from codewithmukesh/dotnet-claude-kit.
Works with
Categories
IHttpClientFactory and typed HTTP clients for .NET 10 applications. Httpclient Factory is an agent skill from codewithmukesh/dotnet-claude-kit.NET 10 applications.
Httpclient Factory fits situations like: mentions HttpClient; IHttpClientFactory; delegatingHandler; circuit breaker.
Run `npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a claude-code`. Or copy the skill folder (skills/httpclient-factory in codewithmukesh/dotnet-claude-kit) into .claude/skills/httpclient-factory in your project. Claude Code loads it when a task matches its description.
Run `npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a codex`. Or copy the skill folder (skills/httpclient-factory in codewithmukesh/dotnet-claude-kit) into .agents/skills/httpclient-factory in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codewithmukesh/dotnet-claude-kit --skill httpclient-factory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/httpclient-factory, .gemini/skills/httpclient-factory, .github/skills/httpclient-factory and .opencode/skills/httpclient-factory in your project.
SKILL.md names no scripts, command-line tools or credentials: Httpclient Factory is instructions for the agent only.
SKILL.md names 1 domain. In commands or code: api.github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Httpclient Factory is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Httpclient Factory: Akka.NET Testing Patterns (Aaronontheweb/dotnet-skills, 1.2k stars), MAUI UI Test Shard Rebalancer (dotnet/maui, 23k stars), Verify Tests Catch the Bug (dotnet/maui, 23k stars) and Dotnet Testing (novotnyllc/dotnet-artisan, 233 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
codewithmukesh (a GitHub organization) maintains it in codewithmukesh/dotnet-claude-kit, which has 751 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on August 7, 2026.
Source: codewithmukesh/dotnet-claude-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.