Architecture
managedcode/dotnet-skills
Design or review .NET solution architecture across modular monoliths, clean architecture, vertical slices, microservices, DDD, CQRS, and cloud-native boundaries without over-engineering.
Guidance for Akka.NET actor systems covering EventStream versus DistributedPubSub, supervision, Props versus DependencyResolver, work distribution and testable cluster code.
$ npx skills add Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Aaronontheweb/dotnet-skills akka-net-best-practices --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/Aaronontheweb/dotnet-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/akka-best-practices .claude/skills/akka-net-best-practices && 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 "akka-net-best-practices" agent skill from https://github.com/Aaronontheweb/dotnet-skills/tree/master/skills/akka-best-practices into .claude/skills/akka-net-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "akka-net-best-practices", 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/Aaronontheweb/dotnet-skills/tree/master/skills/akka-best-practicesType 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 Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Aaronontheweb/dotnet-skills akka-net-best-practices --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Aaronontheweb/dotnet-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/akka-best-practices .agents/skills/akka-net-best-practices && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "akka-net-best-practices" agent skill from https://github.com/Aaronontheweb/dotnet-skills/tree/master/skills/akka-best-practices into .agents/skills/akka-net-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "akka-net-best-practices", 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 Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Aaronontheweb/dotnet-skills akka-net-best-practices --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Aaronontheweb/dotnet-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/akka-best-practices .cursor/skills/akka-net-best-practices && 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 "akka-net-best-practices" agent skill from https://github.com/Aaronontheweb/dotnet-skills/tree/master/skills/akka-best-practices into .cursor/skills/akka-net-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "akka-net-best-practices", 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/Aaronontheweb/dotnet-skills.git --path skills/akka-best-practices--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 Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Aaronontheweb/dotnet-skills akka-net-best-practices --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Aaronontheweb/dotnet-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/akka-best-practices .gemini/skills/akka-net-best-practices && 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 "akka-net-best-practices" agent skill from https://github.com/Aaronontheweb/dotnet-skills/tree/master/skills/akka-best-practices into .gemini/skills/akka-net-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "akka-net-best-practices", 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 Aaronontheweb/dotnet-skills akka-net-best-practicesInstalls 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 Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Aaronontheweb/dotnet-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/akka-best-practices .github/skills/akka-net-best-practices && 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 "akka-net-best-practices" agent skill from https://github.com/Aaronontheweb/dotnet-skills/tree/master/skills/akka-best-practices into .github/skills/akka-net-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "akka-net-best-practices", 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 Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Aaronontheweb/dotnet-skills akka-net-best-practices --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Aaronontheweb/dotnet-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/akka-best-practices .opencode/skills/akka-net-best-practices && 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 "akka-net-best-practices" agent skill from https://github.com/Aaronontheweb/dotnet-skills/tree/master/skills/akka-best-practices into .opencode/skills/akka-net-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "akka-net-best-practices", 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.
akka-net-best-practicesGuidance for Akka.NET actor systems covering EventStream versus DistributedPubSub, supervision, Props versus DependencyResolver, work distribution and testable cluster code.
The main skill file warns that `Context.System.EventStream` is local to one ActorSystem, so subscribers on a second node never see events from the first. It points to `Akka.Cluster.Tools.PublishSubscribe` for events that must cross nodes, shows the Akka.Hosting call `WithDistributedPubSub`, and gives topic naming patterns for per-user, per-entity, broadcast and role-based topics. It then covers supervision, which applies to children, along with error handling in actors and the choice between Props and DependencyResolver.
Three companion files go deeper. One covers work distribution: database queues, Akka.Streams throttling and the outbox pattern. One shows how to abstract over cluster sharding so an actor system runs with or without cluster infrastructure in tests, using GenericChildPerEntityParent, IPubSubMediator and execution-mode wiring. The third covers actor-scoped CancellationToken use, linked cancellation sources and timeout handling. The code samples are in C#.
10 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 29878f2. 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.
No URLs in SKILL.md.
From 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.
Akka.NET Best Practices loads about 3.3k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 872 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 Aaronontheweb/dotnet-skills at commit 29878f2, republished under its MIT licence (© Aaronontheweb). 872 words, ~3,288 tokens.
.claude/skills/akka-net-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Use this skill when:
Context.System.EventStream is local to a single ActorSystem process. It does NOT work across cluster nodes.
// BAD: This only works on a single server
// When you add a second server, subscribers on server 2 won't receive events from server 1
Context.System.EventStream.Subscribe(Self, typeof(PostCreated));
Context.System.EventStream.Publish(new PostCreated(postId, authorId));When EventStream is appropriate:
For events that must reach actors across multiple cluster nodes, use Akka.Cluster.Tools.PublishSubscribe:
using Akka.Cluster.Tools.PublishSubscribe;
public class TimelineUpdatePublisher : ReceiveActor
{
private readonly IActorRef _mediator;
public TimelineUpdatePublisher()
{
// Get the DistributedPubSub mediator
_mediator = DistributedPubSub.Get(Context.System).Mediator;
Receive<PublishTimelineUpdate>(msg =>
{
// Publish to a topic - reaches all subscribers across all nodes
_mediator.Tell(new Publish($"timeline:{msg.UserId}", msg.Update));
});
}
}builder.WithDistributedPubSub(role: null); // Available on all roles, or specify a role| Pattern | Topic Format | Use Case |
|---|---|---|
| Per-user | timeline:{userId} | Timeline updates, notifications |
| Per-entity | post:{postId} | Post engagement updates |
| Broadcast | system:announcements | System-wide notifications |
| Role-based | workers:rss-poller | Work distribution |
A supervision strategy defined on an actor dictates how that actor supervises its children, NOT how the actor itself is supervised.
public class ParentActor : ReceiveActor
{
// This strategy applies to children of ParentActor, NOT to ParentActor itself
protected override SupervisorStrategy SupervisorStrategy()
{
return new OneForOneStrategy(
maxNrOfRetries: 10,
withinTimeRange: TimeSpan.FromSeconds(30),
decider: ex => ex switch
{
ArithmeticException => Directive.Resume,
NullReferenceException => Directive.Restart,
ArgumentException => Directive.Stop,
_ => Directive.Escalate
});
}
}The default OneForOneStrategy already includes rate limiting:
You rarely need a custom strategy unless you have specific requirements.
Good reasons:
AllForOneStrategyBad reasons:
Use try-catch when:
public class RssFeedPollerActor : ReceiveActor
{
public RssFeedPollerActor()
{
ReceiveAsync<PollFeed>(async msg =>
{
try
{
var feed = await _httpClient.GetStringAsync(msg.FeedUrl);
var items = ParseFeed(feed);
// Process items...
}
catch (HttpRequestException ex)
{
// Expected failure - log and schedule retry
_log.Warning("Feed {Url} unavailable: {Error}", msg.FeedUrl, ex.Message);
Context.System.Scheduler.ScheduleTellOnce(
TimeSpan.FromMinutes(5), Self, msg, Self);
}
catch (XmlException ex)
{
// Invalid feed format - log and mark as bad
_log.Error("Feed {Url} has invalid format: {Error}", msg.FeedUrl, ex.Message);
Sender.Tell(new FeedPollResult.InvalidFormat(msg.FeedUrl));
}
});
}
}Let exceptions propagate (trigger supervision) when:
// BAD: Swallowing exceptions hides problems
catch (Exception ex)
{
_log.Error(ex, "Error processing work");
// Actor continues with potentially corrupt state
}
// GOOD: Handle known exceptions, let unknown ones propagate
catch (HttpRequestException ex)
{
// Known, expected failure - handle gracefully
_log.Warning("HTTP request failed: {Error}", ex.Message);
Sender.Tell(new WorkResult.TransientFailure());
}
// Unknown exceptions propagate to supervisionUse Props.Create() when:
IServiceProvider or IRequiredActor<T>// Simple actor with no DI needs
public static Props Props(PostId postId, IPostWriteStore store)
=> Akka.Actor.Props.Create(() => new PostEngagementActor(postId, store));Use resolver.Props<T>() when:
IServiceProvider to create scoped servicesIRequiredActor<T> to get references to other actors// Registration with DI
builder.WithActors((system, registry, resolver) =>
{
var actor = system.ActorOf(resolver.Props<OrderProcessorActor>(), "order-processor");
registry.Register<OrderProcessorActor>(actor);
});You almost never need remote deployment. If you're not doing remote deployment (and you probably aren't):
Props.Create(() => new Actor(...)) with closures is fineFor most applications, use cluster sharding instead of remote deployment - it handles distribution automatically.
When you have many background jobs (RSS feeds, email sending, etc.), don't process them all at once - this causes thundering herd problems.
Three patterns to solve this:
FOR UPDATE SKIP LOCKED for natural cross-node distributionSee work-distribution-patterns.md for full code samples.
| Mistake | Why It's Wrong | Fix |
|---|---|---|
| Using EventStream for cross-node pub/sub | EventStream is local only | Use DistributedPubSub |
| Defining supervision to "protect" an actor | Supervision protects children | Understand the hierarchy |
| Catching all exceptions | Hides bugs, corrupts state | Only catch expected errors |
| Always using DependencyResolver | Adds unnecessary complexity | Use plain Props when possible |
| Processing all background jobs at once | Thundering herd, resource exhaustion | Use database queue + rate limiting |
| Throwing exceptions for expected failures | Triggers unnecessary restarts | Return result types, use messaging |
Need to communicate between actors?
├── Same process only? -> EventStream is fine
├── Across cluster nodes?
│ ├── Point-to-point? -> Use ActorSelection or known IActorRef
│ └── Pub/sub? -> Use DistributedPubSub
└── Fire-and-forget to external system? -> Consider outbox patternException occurred in actor?
├── Expected failure (HTTP timeout, invalid input)?
│ └── Try-catch, handle gracefully, continue
├── State might be corrupt?
│ └── Let supervision restart
├── Unknown cause?
│ └── Let supervision restart
└── Programming error (null ref, bad logic)?
└── Let supervision restart, fix the bugCreating actor Props?
├── Actor needs IServiceProvider?
│ └── Use resolver.Props<T>()
├── Actor needs IRequiredActor<T>?
│ └── Use resolver.Props<T>()
├── Simple actor with constructor params?
│ └── Use Props.Create(() => new Actor(...))
└── Remote deployment needed?
└── Probably not - use cluster sharding insteadFor applications that need to run both in clustered production and local/test environments, use abstraction patterns to toggle between implementations:
AkkaExecutionMode enum - Controls which implementations are used (LocalTest vs Clustered)GenericChildPerEntityParent - Mimics sharding behavior locally using the same IMessageExtractorIPubSubMediator - Abstracts DistributedPubSub for swappable local/cluster implementationsSee cluster-local-abstractions.md for complete implementation code.
<T>In actors, use ILoggingAdapter from Context.GetLogger() instead of DI-injected ILogger<T>:
public class MyActor : ReceiveActor
{
private readonly ILoggingAdapter _log = Context.GetLogger();
public MyActor()
{
Receive<MyMessage>(msg =>
{
_log.Info("Processing message for user {UserId}", msg.UserId);
_log.Error(ex, "Failed to process {MessageType}", msg.GetType().Name);
});
}
}Why ILoggingAdapter:
Info(), Debug(), Warning(), Error() (not Log* variants)Don't inject ILogger<T> into actors - it bypasses Akka's logging infrastructure.
// Named placeholders for better log aggregation and querying
_log.Info("Order {OrderId} processed for customer {CustomerId}", order.Id, order.CustomerId);
// Prefer named placeholders over positional
// Good: {OrderId}, {CustomerId}
// Avoid: {0}, {1}When actors launch async operations via PipeTo, those operations can outlive the actor if not properly managed. Key practices:
PostStop()See async-cancellation-patterns.md for complete implementation code.
© Aaronontheweb, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files in skills/akka-best-practices of Aaronontheweb/dotnet-skills.
Open the folder on GitHubat commit 29878f2
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Aaronontheweb/dotnet-skills, which our catalogue first saw on October 7, 2026.
Akka.NET Best Practices 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 |
|---|---|---|---|---|---|---|
| Akka.NET Best Practices this skillAaronontheweb/dotnet-skills | 1.2k | 1 repos | ~3.3k | Automated safety check: Pass | MIT | |
| Architecturemanagedcode/dotnet-skills | 486 | — | ~659 | Automated safety check: Pass | MIT | |
| Tsp Csharpquerylenshq/ef-querylens | 225 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Dotnet Backend Patternswshobson/agents | 40k | 8 repos | ~6.6k | Automated safety check: Pass | MIT | |
| Dotnet Csharpnovotnyllc/dotnet-artisan | 232 | — | ~1.7k | Automated safety check: Pass | MIT | |
| C# and .NET DeveloperJeffallan/claude-skills | 12k | — | ~1.3k | Automated safety check: Pass | MIT |
managedcode/dotnet-skills
Design or review .NET solution architecture across modular monoliths, clean architecture, vertical slices, microservices, DDD, CQRS, and cloud-native boundaries without over-engineering.
querylenshq/ef-querylens
Comprehensive C and .NET development skill for TSP projects.
wshobson/agents
Master C/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications.
novotnyllc/dotnet-artisan
Baseline C skill loaded for every .NET code path. An agent skill from novotnyllc/dotnet-artisan.
Jeffallan/claude-skills
Guides C# work on .NET 8+: ASP.NET Core APIs, Entity Framework Core data access, Blazor apps and CQRS with MediatR, following a five-step build workflow.
davila7/claude-code-templates
Write modern C code with advanced features like records, pattern matching, and async/await.
Aaronontheweb/dotnet-skills
Guides making .NET libraries trimming-safe and Native-AOT compatible: the MSBuild properties, trimming attributes, warning codes and a playbook of safe patterns.
Aaronontheweb/dotnet-skills
Write and simplify C property-based, model-based, and executable specification tests with CsCheck.
Aaronontheweb/dotnet-skills
Shows how to build entity actors with Akka.Hosting so the same code runs in local unit tests and in a sharded cluster in production.
Aaronontheweb/dotnet-skills
Publish .NET services as container images with the built-in SDK tooling (dotnet publish /t:PublishContainer, Microsoft.NET.Build.Containers) - no Dockerfile required.
Aaronontheweb/dotnet-skills
Sets up Akka.Management and Cluster.Bootstrap so Akka.NET clusters form through service discovery on Kubernetes, Azure or config instead of static seed nodes.
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.
Categories
Guidance for Akka.NET actor systems covering EventStream versus DistributedPubSub, supervision, Props versus DependencyResolver, work distribution and testable cluster code. EventStream` is local to one ActorSystem, so subscribers on a second node never see events from the first.Hosting call `WithDistributedPubSub`, and gives topic naming patterns for per-user, per-entity, broadcast and role-based topics.
Akka.NET Best Practices fits situations like: choosing between EventStream and DistributedPubSub for actor messaging; setting supervision and error handling for child actors; designing work distribution across cluster nodes; making an actor system testable without a running cluster.
Run `npx skills add Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a claude-code`. Or copy the skill folder (skills/akka-best-practices in Aaronontheweb/dotnet-skills) into .claude/skills/akka-net-best-practices in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a codex`. Or copy the skill folder (skills/akka-best-practices in Aaronontheweb/dotnet-skills) into .agents/skills/akka-net-best-practices 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 Aaronontheweb/dotnet-skills --skill akka-net-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/akka-net-best-practices, .gemini/skills/akka-net-best-practices, .github/skills/akka-net-best-practices and .opencode/skills/akka-net-best-practices in your project.
SKILL.md names no scripts, command-line tools or credentials: Akka.NET Best Practices is instructions for the agent only. Our summary lists: An Akka.NET project written in C#.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. 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.
Akka.NET Best Practices is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.3k tokens (SKILL.md is roughly 13k 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 Akka.NET Best Practices: Architecture (managedcode/dotnet-skills, 486 stars), Tsp Csharp (querylenshq/ef-querylens, 225 stars), Dotnet Backend Patterns (wshobson/agents, 40k stars) and Dotnet Csharp (novotnyllc/dotnet-artisan, 232 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Aaronontheweb (a GitHub user) maintains it in Aaronontheweb/dotnet-skills, which has 1,209 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 10, 2026.
Source: Aaronontheweb/dotnet-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.