In short.
Type Design for Performance is a coding-assistant skill for C# developers, but some examples claim more than their code demonstrates. Its focused checklist covers sealed classes, readonly structs, deferred enumeration, Task and ValueTask, memory APIs and collection boundaries. Read-only interfaces do not establish immutability, and its asynchronous examples involve different concurrency behavior. The supplied material contains no benchmarks, and nothing was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is limited to skills/csharp-type-design-performance/SKILL.md at revision 5ca5db8cf25566f19d2a5dc53204d4af22b23a0d and the related repository-level LICENSE above that folder. The supplied manifest establishes complete selected-folder coverage. Other repository skills, host documentation and linked Microsoft pages are excluded. Nothing was executed; assistant loading, compilation, integration behavior and measured performance remain unassessed.
The overview
Identity
The resource is skills/csharp-type-design-performance/SKILL.md in Aaronontheweb/dotnet-skills. Its displayed title is Type Design for Performance, while its front matter names it type-design-performance and sets user-invocable to false.
It is a document of assistant instructions and C# examples. The original resource folder is [https://github.com/Aaronontheweb/dotnet-skills/tree/master/skills/csharp-type-design-performance].
Assessment
The skill provides a useful checklist for reviewing allocation, API design and collection handling. Paired examples make its recommendations concrete, including consolidating repeated list creation and distinguishing cached asynchronous results from database operations.
Its strongest use is as guidance for a developer who can question the examples. Claims about immutable collections, automatic speed improvements and allocation avoidance need qualification. The evidence does not establish measurable performance gains or reliable assistant behavior.
Users
The intended audience is C# developers designing types and APIs, reviewing performance-sensitive code, choosing classes or structs, and working with collections. Developers using an assistant for those tasks can use the document to supply consistent review priorities.
Beginners will benefit from basic familiarity with classes, value types, LINQ and asynchronous methods before applying the advice. Experienced developers should examine ownership, concurrency and workload assumptions behind each proposed change.
Capabilities
The document covers sealed classes and records, readonly value types, static functions with explicit inputs, delayed list materialization, asynchronous enumeration, Task versus ValueTask, Span and Memory, array pooling, and collection return types.
It includes C# snippets, decision tables and common mistakes. These supply advice for code generation or review; the captured resource contains no executable analyzer, profiler or benchmark suite.
Using it
Requirements
No supported assistant host, model, installation dependency or minimum version for the whole skill is specified. Applying its code examples requires a C# project with compatible language features and .NET APIs.
The frozen-collection example explicitly requires .NET 8 or later. Compatibility requirements for the other examples are not enumerated, so support across older target frameworks is unknown.
Mechanism
The skill supplies written rules and examples for an assistant or developer to apply when designing or reviewing code. Its use cases identify relevant tasks, and its quick-reference tables condense the recommended patterns.
The user-invocable: false metadata records an invocation preference, but the document does not explain host discovery, automatic activation or enforcement. Loading behavior and whether an assistant follows the guidance are unknown.
Setup
The captured folder supplies SKILL.md without installation commands or host-specific configuration. A documented installation procedure cannot be established from this material.
For adoption, obtain the original file at the recorded revision and follow the chosen assistant host's instructions for loading skills or reference material. Check the examples against the project's target framework before requesting changes. Host compatibility remains unassessed.
Example
The supplied GetActiveOrders example filters orders, creates a list, sorts that list and creates another list. Its proposed revision filters and sorts before making one final list. Inspection shows that this removes one explicit intermediate list materialization; no timing or allocation measurements are supplied.
Another variant returns IEnumerable<Order> and delays execution until enumeration. Because that example still sorts the results, delaying execution does not establish that ordered results can be produced without first considering the full input.
Assessment & evidence
Limitations
The document presents several context-dependent recommendations as broad rules. Its approximate struct-size threshold and claim that frozen dictionaries provide the fastest static lookup have no supporting measurements in the supplied material.
Declaring a method static alone does not establish purity, thread safety or a speed improvement. The string parsing example labels its string parameter as an allocation, but the shown method only receives a string; it does not demonstrate a new string allocation.
No compiler results, workload benchmarks, assistant integration results or comprehensive compatibility information are supplied. The performance claims remain unverified.
Reasoning
The collection examples do not establish the immutability they claim. GetOrders returns a newly created mutable List through IReadOnlyList, and BuildOrderItems also returns a List through that interface. The interface restricts the operations exposed to the caller, but it does not make the underlying object immutable. Copying the list also does not establish that its elements are immutable.
The asynchronous examples change more than allocation behavior. The IAsyncEnumerable loop awaits each item before advancing, while the Task.WhenAll alternatives can overlap operations. Those choices affect concurrency, resource use and completion behavior, so they are not interchangeable performance fixes.
These conclusions follow from inspecting the supplied examples. They are not results from compilation, execution or benchmarking.
Alternatives
The skill points readers to Microsoft's .NET performance guidance [https://learn.microsoft.com/en-us/dotnet/standard/performance/], memory and span guidance [https://learn.microsoft.com/en-us/dotnet/standard/memory-and-spans/], and frozen-collection API reference [https://learn.microsoft.com/en-us/dotnet/api/system.collections.frozen].
These are linked reference options for investigating individual recommendations. Their contents were not supplied, and no competing skill or comparative evaluation is available.
Evidence
The supplied source snapshot contains the complete selected SKILL.md and the repository-level MIT licence. The folder manifest lists no additional selected files. This supports analysis of the written guidance and its licence, but not claims about operational results.
The revision-specific original skill file is [https://raw.githubusercontent.com/Aaronontheweb/dotnet-skills/5ca5db8cf25566f19d2a5dc53204d4af22b23a0d/skills/csharp-type-design-performance/SKILL.md]. Installation documentation, test results and external reference contents are not included.
Access & freshness
Costs
The MIT licence grants permission to use the software and documentation free of charge. No separate resource price or subscription is stated.
Assistant access, model usage, development infrastructure and engineering effort are not priced in the evidence. Total adoption cost is unknown, and no measured runtime savings are established.
Rights
The repository-level MIT licence names Aaron Stannard as the 2025 copyright holder. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions.
The licence provides the material without warranty and limits liability. The captured original notice is available at [https://raw.githubusercontent.com/Aaronontheweb/dotnet-skills/5ca5db8cf25566f19d2a5dc53204d4af22b23a0d/LICENSE].
Freshness
The supplied snapshot was captured on 2026-11-16 at 23:26:37.099 UTC from revision 5ca5db8cf25566f19d2a5dc53204d4af22b23a0d. This identifies the analyzed source version; it does not establish when the skill was written or last updated.
No per-skill release version or dated changelog is included. Changes after the captured revision and the applicability of every recommendation to a particular runtime version are unknown.
Actions
Use the skill as a checklist for a bounded C# review. Check inheritance requirements before sealing types, ownership before changing collection APIs, and concurrency requirements before replacing Task.WhenAll with sequential asynchronous enumeration.
Treat read-only interfaces and immutable collections as distinct design choices. Verify host loading and compilation against the intended framework, then measure relevant workloads before accepting speed or allocation claims. None of those outcomes is established by the supplied examples.
