csharp-guide
Installation
SKILL.md
C# Guide
Applies to: C# 12+, .NET 8+, ASP.NET Core, Console Apps, Libraries
Core Principles
- Type Safety: Enable nullable reference types project-wide; treat warnings as errors
- Immutability First: Prefer records,
readonly, andinitproperties for data types - Async All The Way: Use
async/awaitend-to-end; never block on async code - Dependency Injection: Constructor injection via
IServiceCollection; no service locator - Fail Fast: Validate inputs at boundaries; use guard clauses and
ArgumentException
Guardrails
Version & Dependencies
- Target .NET 8+ with C# 12+ language features
- Use
<Nullable>enable</Nullable>and<ImplicitUsings>enable</ImplicitUsings>in.csproj - Pin package versions explicitly in
.csproj(avoid floating*versions)
Related skills