dotnet-performance
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
Use for performance-sensitive C#/.NET code involving async pipelines, concurrency, streaming, memory, allocations, or throughput.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Xian55/WowClassicGrindBottheir own version, first seen Oct 8, 2026
- Attemainio/dotnet-toolkittheir own version, first seen Sep 19, 2026
- wieslawsoltes/Performance-Skilltheir own version, first seen Jul 26, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Xian55/WowClassicGrindBot★ 349same name
- wieslawsoltes/Performance-Skill★ 34same name
- Attemainio/dotnet-toolkit★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- aspnet-core-apiSkill
- aspnet-mvcSkill
- blazorSkill
- docker-dotnetSkill
- dotnet-expertSkill
- dotnet-file-based-appsSkill
- dotnet-messagingSkill
- dotnet-observabilitySkill
- dotnet-testingSkill
- dotnet-version-guideSkill
- efcore-postgresqlSkill
- gitlab-basicsSkill
- gitlab-ci-dotnetSkill
- pandocSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Use for measured performance work, high-throughput services, bounded worker pipelines, large payloads, and allocation-sensitive paths.
- Distinctive: line 31
Do not optimize without a workload, baseline, or acceptance metric.
- Distinctive: line 39
Test cancellation, errors, backpressure, ordering, duplicates, and shutdown.
- Distinctive: line 43
Keep async all the way; never use Result, Wait, or unbounded fire-and-forget.
- Distinctive: line 45
Use bounded channels and explicit full-mode behavior for backpressure.
- Distinctive: line 48
Use ArrayPool only with strict ownership and finally-return.
- Distinctive: line 49
Prefer database-side filtering, projection, pagination, and batch operations.
- Distinctive: line 82
Keep queue capacity and worker count explicit.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
.NET Performance
When to Use
Use for measured performance work, high-throughput services, bounded worker pipelines, large payloads, and allocation-sensitive paths.
When Not to Use
Do not optimize without a workload, baseline, or acceptance metric. Do not trade correctness and operability for speculative micro-optimizations.
Workflow
- Define throughput, latency, memory, concurrency, and correctness targets.
- Profile or benchmark the current implementation.
- Identify the bottleneck: I/O, CPU, allocations, locks, database, serialization, or dependency.
- Make the smallest change and benchmark again.
- Test cancellation, errors, backpressure, ordering, duplicates, and shutdown.
Rules
- Keep async all the way; never use Result, Wait, or unbounded fire-and-forget.
- Bound concurrency with Channel, SemaphoreSlim, or Parallel.ForEachAsync.
- Use bounded channels and explicit full-mode behavior for backpressure.
- Stream large files and responses; avoid unbounded ToList, ReadToEnd, or buffering.
- Pass CancellationToken through every I/O path.
- Use ArrayPool only with strict ownership and finally-return; clear sensitive buffers.
- Prefer database-side filtering, projection, pagination, and batch operations.
- Measure serialization and logging overhead on hot paths.
- Preserve ordering only when the contract requires it.
- Make retries bounded and cancellation-aware.
Quality Gate
Provide before/after measurements, resource assumptions, failure behavior, and a rollback-safe change.
Example: Bounded Channel Pipeline
var channel = Channel.CreateBounded<WorkItem>(
new BoundedChannelOptions(256)
{
FullMode = BoundedChannelFullMode.Wait,
SingleWriter = true
});
var producer = ProduceAsync(channel.Writer, ct);
var consumers = Enumerable.Range(0, 4)
.Select(_ => ConsumeAsync(channel.Reader, ct));
await Task.WhenAll(consumers.Append(producer));
static async Task ConsumeAsync(
ChannelReader<WorkItem> reader,
CancellationToken ct)
{
await foreach (var item in reader.ReadAllAsync(ct))
await ProcessAsync(item, ct);
}Keep queue capacity and worker count explicit. Decide whether ordering, retries, duplicate processing, and shutdown draining are part of the contract. Measure throughput, queue depth, latency, allocations, and memory before and after the change.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

