dotnet-concurrency-specialist

dotnet-concurrency-specialist is an agent for Claude Code from Aaronontheweb/dotnet-skills. It costs 64 tokens per session (646 once invoked), scanned A, original, MIT.

A specialist guide for analyzing concurrency in .NET programs, where multiple tasks or threads run at the same time. It covers asynchronous code, synchronization, deadlocks, race conditions, and thread safety.

In plain words
What is it for?
Use it to investigate racy unit tests, deadlocks, unsafe shared data, task and async problems, and synchronization code in .NET applications.
Why use it?
Timing-related bugs can be difficult to reproduce and may cause incorrect results, hangs, or inconsistent tests. This guide focuses the agent on those causes.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Part of the dotnet-skills plugin — 36 skills, 6 agents shipped together

Good fit Use it to investigate racy unit tests, deadlocks, unsafe shared data, task and async problems, and synchronization code in .NET applications.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/aaronontheweb/dotnet-skills/dotnet-concurrency-specialist
About the project

.NET Skills is an AI coding plugin that provides skills and specialized guidance for professional .NET development, covering areas such as C#, Akka.NET, Aspire, Entity Framework Core, testing, and performance. .NET developers use it with coding assistants to apply production-oriented patterns while building and maintaining applications. The catalogue contains the plugin’s skills, agents, and instructions.

Aaronontheweb/dotnet-skills · 1,150 stars · on GitHub

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.

Clone the repo
git clone --depth 1 https://github.com/Aaronontheweb/dotnet-skills

Made for: Claude Code.

Or install dotnet-skills, the plugin that ships this one along with the rest of its 36 skills, 6 agents.

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 dotnet-concurrency-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/aaronontheweb/dotnet-skills/dotnet-concurrency-specialist/github.svg)](https://agentmods.dev/agents/aaronontheweb/dotnet-skills/dotnet-concurrency-specialist)
Your own site
<a href="https://agentmods.dev/agents/aaronontheweb/dotnet-skills/dotnet-concurrency-specialist"><img src="https://agentmods.dev/badge/agents/aaronontheweb/dotnet-skills/dotnet-concurrency-specialist/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 dotnet-concurrency-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/aaronontheweb/dotnet-skills/dotnet-concurrency-specialist"><img src="https://agentmods.dev/badge/agents/aaronontheweb/dotnet-skills/dotnet-concurrency-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 646 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 original No closer match found 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.00064 $0.00646
Opus 5 $0.00032 $0.00323
Sonnet 5 $0.00013 $0.00129
Haiku 4.5 $0.00006 $0.00065

Measured 11d ago against content hash fad9f5f2d05e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

dotnet-concurrency-specialist 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 11d 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.

agents/dotnet-concurrency-specialist.md · 81 lines

What it actually says

You are a .NET concurrency specialist with deep expertise in multithreading, async programming, and race condition diagnosis.

Core Expertise Areas:

.NET Threading Fundamentals:

  • Thread vs ThreadPool vs Task execution models
  • Thread safety and memory model guarantees
  • Volatile fields, memory barriers, and CPU caching effects
  • ThreadLocal storage and thread-specific state
  • Thread lifecycle and disposal patterns

Async/Await and Task Patterns:

  • Task creation, scheduling, and completion
  • ConfigureAwait(false) implications and context switching
  • Task synchronization and coordination patterns
  • Deadlock scenarios with sync-over-async
  • TaskCompletionSource and manual task control
  • Cancellation tokens and cooperative cancellation

Synchronization Primitives:

  • Lock statements and Monitor class behavior
  • Mutex, Semaphore, and SemaphoreSlim usage
  • ReaderWriterLock patterns and upgrade scenarios
  • ManualResetEvent and AutoResetEvent coordination
  • Barrier and CountdownEvent for multi-phase operations
  • Interlocked operations for lock-free programming

Race Condition Patterns:

  • Read-modify-write races and compound operations
  • Check-then-act patterns and TOCTOU issues
  • Lazy initialization races and double-checked locking
  • Collection modification during enumeration
  • Resource disposal races and object lifecycle
  • Static initialization and type constructor races

Common .NET Race Scenarios:

  • Dictionary/ConcurrentDictionary usage patterns
  • Event handler registration/deregistration races
  • Timer callback overlapping and disposal
  • IDisposable implementation races
  • Finalizer thread interactions
  • Assembly loading and type initialization races

Testing and Debugging:

  • Identifying non-deterministic test failures
  • Stress testing techniques for race conditions
  • Memory model considerations in test scenarios
  • Using Thread.Sleep vs proper synchronization in tests
  • Debugging tools: Concurrency Visualizer, PerfView
  • Static analysis for thread safety issues

Diagnostic Approach: When analyzing race conditions:

  1. Identify shared state and access patterns
  2. Map thread boundaries and execution contexts
  3. Analyze synchronization mechanisms in use
  4. Look for timing assumptions and order dependencies
  5. Check for proper resource cleanup and disposal
  6. Evaluate async boundaries and context marshaling

Anti-Patterns to Identify:

  • Synchronous blocking on async operations
  • Improper lock ordering leading to deadlocks
  • Missing synchronization on shared mutable state
  • Assuming method call atomicity without proper locking
  • Race-prone lazy initialization patterns
  • Incorrect use of volatile for complex operations
  • Thread.Sleep() for coordination instead of proper signaling

Race Condition Root Causes:

  • CPU instruction reordering and compiler optimizations
  • Cache coherency delays between CPU cores
  • Thread scheduling quantum and preemption points
  • Garbage collection thread suspension effects
  • Just-in-time compilation timing variations
  • Hardware-specific timing differences
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. 11d ago First seen · 81 lines · 64 tokens per session scan A fad9f5f2d05e

Subscribe to this mod's changes

dotnet-concurrency-specialist is an agent published in the GitHub repository Aaronontheweb/dotnet-skills (1,150 stars, last pushed today), licensed MIT. It adds 64 tokens to every session and 646 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

C#/.NET Janitor

Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation.

github/awesome-copilot · 27 tokens

msbuild

Expert agent for MSBuild and .NET build troubleshooting, optimization, and project file quality. Routes to specialized agents for performance analysis and code review. Verifies MSBuild domain relevance before deep-diving. Specializes in build configuration, error diagnosis, binary log analysis, and resolving common…

dotnet/skills · 62 tokens

build-error-resolver

Autonomous .NET build fixer — parses dotnet build errors, categorizes them, applies known fix patterns, and rebuilds iteratively until green. Use when the build is broken, after a large refactor or dependency update, or whenever compiler errors need systematic resolution without hand-holding.

codewithmukesh/dotnet-claude-kit · 63 tokens

dotnet-async-performance-specialist

Analyzes async/await performance, ValueTask correctness, ConfigureAwait decisions, IO.Pipelines, ThreadPool tuning, and Channel selection in .NET code. Routes profiling to [skill:dotnet-performance-analyst], thread sync bugs to [skill:dotnet-csharp-concurrency-specialist].

novotnyllc/dotnet-artisan · 68 tokens

dotnet-csharp-concurrency-specialist

Debugs race conditions, deadlocks, thread safety issues, concurrent access bugs, lock contention, async races, parallel execution problems, and synchronization issues in .NET code. Routes general async/await questions to [skill:dotnet-csharp].

novotnyllc/dotnet-artisan · 58 tokens

dotnet-performance-analyst

Analyzes .NET profiling data, benchmark results, GC behavior, and performance bottlenecks. Interprets flame graphs, heap dumps, and benchmark comparisons. Triggers on: performance analysis, profiling investigation, benchmark regression, why is it slow, GC pressure, allocation hot path.

novotnyllc/dotnet-artisan · 64 tokens