csharp-conventions

Standardize modern C# 12+ conventions across .NET codebases.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/jsamuelsen11/claude-config --skill csharp-conventions
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: csharp-conventions
Source: https://github.com/jsamuelsen11/claude-config/tree/main/plugins/ccfg-csharp/skills/csharp-conventions
Command: npx skills add https://github.com/jsamuelsen11/claude-config --skill csharp-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide codifies modern C# 12+ conventions to help teams write clearer, more maintainable, and idiomatic .NET code across projects.

Core Features & Use Cases

  • File-scoped namespaces: encourages reduced nesting and aligns with contemporary C# practices.
  • Records for DTOs and value objects: promotes immutable data carriers and concise validation.
  • Nullable reference types and pattern matching: ensures safer code with explicit null handling and expressive checks.
  • Primary constructors and DI-friendly patterns: reduces boilerplate and improves testability.

Quick Start

Apply modern C# 12+ conventions across new and existing codebases.

Frequently Asked Questions about csharp-conventions

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

FAQPage Schema
What are modern C# conventions for .NET code reviews?▼

Modern C# conventions enforce file-scoped namespaces, records for DTOs, nullable reference types, and primary constructors to standardize .NET code reviews with explicit guardrails.

How do I apply nullable reference types and pattern matching in C# 12?▼

Apply nullable reference types and pattern matching in C# 12 to ensure safer code with explicit null handling and expressive checks, reducing runtime errors across .NET applications.

When should I use records for DTOs and value objects in dotnet?▼

Use records for DTOs and value objects in dotnet to promote immutable data carriers and concise validation, which improves maintainability and reduces boilerplate in your applications.

Can I use primary constructors and DI-friendly patterns in existing C# codebases?▼

Yes, you can apply primary constructors and DI-friendly patterns to existing C# codebases to reduce boilerplate and improve testability across both small libraries and large systems.

What's the best way to standardize async-await and idiomatic C# across a team?▼

Standardize async-await and idiomatic C# across a team by codifying clean, maintainable patterns for ongoing development, mentoring, and code reviews to align with contemporary practices.

Why does modern C# prefer file-scoped namespaces over traditional namespace blocks?▼

Modern C# prefers file-scoped namespaces over traditional blocks to reduce nesting and align with contemporary .NET practices, making code clearer and more maintainable across large systems.