csharp-guide

Installation
SKILL.md

C# Guide

Applies to: C# 12+, .NET 8+, ASP.NET Core, Console Apps, Libraries

Core Principles

  1. Type Safety: Enable nullable reference types project-wide; treat warnings as errors
  2. Immutability First: Prefer records, readonly, and init properties for data types
  3. Async All The Way: Use async/await end-to-end; never block on async code
  4. Dependency Injection: Constructor injection via IServiceCollection; no service locator
  5. 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
Installs
6
Repository
ar4mirez/samuel
First Seen
Mar 1, 2026