C# & .NET best practices
Created by CodeCraft LLCWrite, advise on, and review C# and .NET code
Product and technology names are trademarks of their respective owners, used only to identify what this skill covers. CodeCraft LLC is not affiliated with or endorsed by them.
by Jace (@jamick)v1.2.0 · updated 2026-10-18Report copyright infringement
Description
Write, advise on, and review C# and .NET code — project/SDK and language-version detection, nullable reference types, async/await and cancellation, IDisposable/await using, records and pattern matching, LINQ, dependency injection, logging, configuration/options, exceptions, EF Core data access, ASP.NET Core APIs, security (SQL injection, secrets, deserialization), analyzers and `dotnet format`, and testing. Use whenever the project has .cs/.csproj/.sln/.slnx files or the user mentions C#, .NET, ASP.NET Core, EF Core, Blazor, MAUI, Unity scripting, NuGet, or asks to review or modernize C# code.
Included with all-access
$9.00 value as a single download
AiSkillz is in preview: browse the catalogue now - skill downloads and subscriptions open soon.
All skills are included with the all-access subscription
Changelog
v1.2.0Oct 18, 2026Latest
Added
references/nullable-reference-types.md:[MemberNotNullWhen]for result types,[DoesNotReturnIf]guard helpers,[NotNullIfNotNull], and the built-inThrowIfNull/ThrowIfNullOrWhiteSpaceguards.
Fixed
references/dependency-injection.md: the manual-scope example now usesCreateAsyncScopewithawait using; a synchronousCreateScopethrows on dispose when a scoped service is onlyIAsyncDisposable.
v1.1.0Oct 16, 2026
Added
references/async-await.md: an async/await deep dive (deadlocks, ConfigureAwait, cancellation, throttling, async streams) - merged from the formercsharp-async-awaitskill.references/dependency-injection.md: a dependency-injection deep dive (lifetimes, captive dependencies, keyed services, options validation, test overrides) - merged from the formercsharp-dependency-injectionskill.references/exceptions-and-resilience.md: exceptions and resilience (layering, filters, ProblemDetails, Polly v8 pipelines) - merged from the formercsharp-exception-handlingskill.references/linq.md: a LINQ deep dive (deferred execution, operators, EF translation, projections, compiled queries) - merged from the formercsharp-linqskill.references/nullable-reference-types.md: a nullable-reference-types deep dive (warnings, attributes, generics, incremental migration) - merged from the formercsharp-nullableskill.references/solid-design-review.md: a SOLID design-review reference with a smell table - merged from the formercsharp-solid-principlesskill.
v1.0.2Oct 3, 2026
Changed
- Checked against the official documentation (October 2026).
- Added support dates: .NET 8 and .NET 9 end of support November 10, 2026; .NET 10 LTS until November 14, 2028; .NET 11 ships November 2026.
v1.0.1Oct 3, 2026
Changed
- Renamed the title to describe what the skill does with the product, so it doesn't read as an official or endorsed edition.
- Added a trademark notice to the README.
v1.0.0Oct 2, 2026
Added
- First release.