csharp-concurrency-patterns

csharp-concurrency-patterns is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 48 tokens per session (2,011 once invoked), scanned A, a copy of csharp-concurrency-patterns, MIT.

A guide for choosing how .NET code handles concurrent work, meaning several operations happening at the same time. It recommends async/await for most I/O, Channels for producer-consumer flows, and more advanced models for stateful entities.

In plain words
What is it for?
Use it to process asynchronous requests, streams, batches, or debounced work, and to manage shared state across concurrent entities.
Why use it?
It helps avoid race conditions and unnecessary locking. Choosing an abstraction that matches the problem makes concurrent code easier to reason about.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to process asynchronous requests, streams, batches, or debounced work, and to manage shared state across concurrent entities.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comeonoliver/skillshub/csharp-concurrency-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ComeOnOliver/skillshub --skill csharp-concurrency-patterns
Clone the repo
git clone --depth 1 https://github.com/ComeOnOliver/skillshub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for csharp-concurrency-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/csharp-concurrency-patterns/github.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/csharp-concurrency-patterns)
Your own site
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/csharp-concurrency-patterns"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/csharp-concurrency-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for csharp-concurrency-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/csharp-concurrency-patterns"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/csharp-concurrency-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,011 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.02011
Opus 5.5 $0.00019 $0.00804
Sonnet 5.5 $0.00010 $0.00402
Haiku 4.5 $0.00005 $0.00201

Measured 1mo ago against content hash 63ec31dd4f7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

csharp-concurrency-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to csharp-concurrency-patterns — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/Aaronontheweb/dotnet-skills/csharp-concurrency-patterns/SKILL.md · 275 lines

How it starts

The opening of the file, as written. The whole thing — 275 lines — stays where its author put it; the contents beside it link to each section on GitHub.

.NET Concurrency: Choosing the Right Tool

When to Use This Skill

Use this skill when:

  • Deciding how to handle concurrent operations in .NET
  • Evaluating whether to use async/await, Channels, Akka.NET, or other abstractions
  • Tempted to use locks, semaphores, or other synchronization primitives
  • Need to process streams of data with backpressure, batching, or debouncing
  • Managing state across multiple concurrent entities

Reference Files

  • advanced-concurrency.md: Akka.NET Streams, Reactive Extensions, Akka.NET Actors (entity-per-actor, state machines, cluster sharding), and async local function patterns

The Philosophy

Start simple, escalate only when needed.

Most concurrency problems can be solved with async/await. Only reach for more sophisticated tools when you have a specific need that async/await can't address cleanly.

Try to avoid shared mutable state. The best way to handle concurrency is to design it away. Immutable data, message passing, and isolated state (like actors) eliminate entire categories of bugs.

Locks should be the exception, not the rule. When you can't avoid shared mutable state:

  1. First choice: Redesign to avoid it (immutability, message passing, actor isolation)
  2. Second choice: Use System.Collections.Concurrent (ConcurrentDictionary, etc.)
  3. Third choice: Use Channel<T> to serialize access through message passing
  4. Last resort: Use lock for simple, short-lived critical sections

Decision Tree

What are you trying to do?
│
├─► Wait for I/O (HTTP, database, file)?
│   └─► Use async/await
│
├─► Process a collection in parallel (CPU-bound)?
│   └─► Use Parallel.ForEachAsync
│
├─► Producer/consumer pattern (work queue)?
│   └─► Use System.Threading.Channels
│
├─► UI event handling (debounce, throttle, combine)?
│   └─► Use Reactive Extensions (Rx)
│
├─► Server-side stream processing (backpressure, batching)?
│   └─► Use Akka.NET Streams
│
├─► State machines with complex transitions?
│   └─► Use Akka.NET Actors (Become pattern)
│
├─► Manage state for many independent entities?
│   └─► Use Akka.NET Actors (entity-per-actor)
│
├─► Coordinate multiple async operations?
│   └─► Use Task.WhenAll / Task.WhenAny
│
└─► None of the above fits?
    └─► Ask yourself: "Do I really need shared mutable state?"
        ├─► Yes → Consider redesigning to avoid it
        └─► Truly unavoidable → Use Channels or Actors to serialize access

Read the full file on GitHub · 275 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 275 lines · 48 tokens per session scan A 63ec31dd4f7a

Subscribe to this mod's changes

csharp-concurrency-patterns is a skill published in the GitHub repository ComeOnOliver/skillshub (64 stars, last pushed 3mo ago), licensed MIT. It adds 48 tokens to every session and 2,011 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to csharp-concurrency-patterns, differing in 3 lines, and is treated as a copy.

Related

Other skills, from other repositories

fastapi-patterns

FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

affaan-m/ECC · 35 tokens

stripe-projects

Provision SaaS services + sync creds via Stripe Projects.

NousResearch/hermes-agent · 15 tokens

status

Show whether Mem0 memory is working in this repository, covering configuration, capture state, pending flushes, and whether the Mem0 API key is valid. Use when the user asks whether memory is on, why a memory is missing, or anything looks broken.

mem0ai/mem0 · 54 tokens

mem0-test-integration

Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…

mem0ai/mem0 · 207 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens