csharp

Guide C# code quality with best practices for ASP.NET Core and EF Core.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/curphey/bosun --skill csharp-curphey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp
Source: https://github.com/curphey/bosun/tree/main/skills/csharp
Command: npx skills add https://github.com/curphey/bosun --skill csharp-curphey

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This guide helps engineers improve C# code quality by enforcing null safety, modern language features, and robust async patterns across ASP.NET Core projects.

Core Features & Use Cases

  • Enforce nullable reference types across codebases to prevent null reference errors.
  • Promote modern language features such as records for DTOs, pattern matching, and immutable data structures.
  • Standardize asynchronous programming, dependency injection patterns, and clean architecture in ASP.NET Core apps.

Quick Start

Enable project-wide nullable reference types, adopt records for DTOs, and ensure async all the way in your codebase.

Frequently Asked Questions about csharp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce nullable reference types across an ASP.NET Core codebase?

Enabling nullable reference types project-wide prevents null reference errors by making the compiler track nullability. You enable it in your .csproj, adopt records for DTOs, and ensure async all the way for safe execution.

What is the best way to structure dependency injection in ASP.NET Core services?

Standardizing dependency injection patterns in ASP.NET Core services promotes clean architecture and maintainable code. Adopting modern DI practices ensures services are decoupled, testable, and correctly scoped across minimal APIs and controllers.

Can I use records and pattern matching for DTOs in EF Core library code?

Yes, using records for DTOs and pattern matching in EF Core library code promotes immutable data structures and concise logic. Modern C# practices encourage these features to improve safety and readability across your application.

Why does async all the way matter for C# async/await patterns?

Async all the way matters for C# async/await patterns because mixing blocking calls with async code causes deadlocks and performance degradation. Standardizing asynchronous programming ensures robust execution across ASP.NET Core projects and services.

Does this C# guidance apply to minimal APIs and traditional controllers?

Yes, this C# guidance applies to both minimal APIs and traditional controllers in ASP.NET Core projects. It covers best-practice guidance for nullable types, async patterns, and dependency injection across all service boundaries.

When should I not use records for data structures in C#?

You should avoid using records for data structures in C# when you require mutable state or complex inheritance hierarchies that records do not naturally support. For mutable entities, standard classes remain the appropriate choice.