Design .NET types for performance. Covers struct vs class decision matrix, sealed by default, readonly structs, ref struct and Span/Memory selection, FrozenDictionary, ValueTask, and collection return types. Use when designing new types and APIs, reviewing code for performance issues, choosing between class, struct, and record, or working with collections and enumerables.
$npx -y skills add wshaddix/dotnet-skills --skill csharp-type-design-performanceInstalls into the current project.
Run `npx skills use "https://github.com/wshaddix/dotnet-skills" --skill "wshaddix/dotnet-skills/csharp-type-design-performance"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/wshaddix/dotnet-skills" that are relevant to the current task. Run `npx skills add "https://github.com/wshaddix/dotnet-skills"` and select the relevant skills, then follow their instructions.