modern-csharp-coding-standards

Enforce modern C# coding standards for .NET 6+ projects.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/tvcosta/ai-customer-service --skill modern-csharp-coding-standards-tvcosta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modern-csharp-coding-standards
Source: https://github.com/tvcosta/ai-customer-service/tree/main/.claude/skills/csharp-coding-standards
Command: npx skills add https://github.com/tvcosta/ai-customer-service --skill modern-csharp-coding-standards-tvcosta

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces modern C# coding standards for high-performance software.

Core Features & Use Cases

  • Immutability and value types: use records and readonly structs to model domain data safely.
  • Modern language features: pattern matching, init-only properties, and Span<T>/Memory<T> for zero-allocation high-throughput code.
  • API design and composition: prefer abstractions, interface-based composition, and avoid inheritance pitfalls.

Quick Start

Apply these standards to a new or refactoring C# project to guide API design, data modeling, and performance-oriented coding.

Frequently Asked Questions about modern-csharp-coding-standards

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

FAQPage Schema
How do I enforce modern C# coding standards for high-performance software?

To enforce modern C# coding standards for high-performance software, apply rules targeting immutable data with records and readonly structs, pattern matching, and Span<T>/Memory<T> for zero-allocation code in .NET 6+ projects.

What is the best way to model immutable domain data in C#?

The best way to model immutable domain data in C# is by using records and readonly structs. These modern language features ensure value-based equality and prevent accidental mutation, safely structuring your domain models.

How do I write zero-allocation high-throughput C# code?

You write zero-allocation high-throughput C# code by leveraging Span<T> and Memory<T> to work directly with contiguous memory regions without creating garbage, drastically reducing allocation overhead in performance-critical paths.

Does this C# coding standards approach work with async/await and API design?

Yes, this C# coding standards approach works with async/await and API design by preferring interface-based composition over inheritance pitfalls. It guides you to build robust APIs by combining small, focused abstractions.

When do I need nullable references and pattern matching in C# refactoring?

You need nullable references and pattern matching in C# refactoring when targeting .NET 6+ to eliminate null reference exceptions and simplify complex branching logic. These features make your domain data and control flows safer and more expressive.