csharp-coding-standards

Enforce modern C# coding standards for .NET applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining consistent, high-quality C# code by providing clear guidelines on modern language features, best practices, and common pitfalls.

Core Features & Use Cases

  • Enforce Naming Conventions: Ensures consistent PascalCase, camelCase, and private field naming.
  • Promote Immutability: Guides the use of record types, init-only properties, and immutable collections.
  • Leverage Modern C#: Demonstrates effective use of nullable reference types, primary constructors, collection expressions, pattern matching, and raw string literals.
  • Optimize LINQ & Async: Provides best practices for writing efficient LINQ queries and robust async/await patterns.
  • Improve Readability: Offers guidance on project structure, formatting, and structured logging.
  • Use Case: When reviewing a pull request for a new .NET API endpoint, use this Skill to ensure the code adheres to established C# best practices for maintainability and clarity.

Quick Start

Apply the C# coding standards to the provided code snippet.

Frequently Asked Questions about csharp-coding-standards

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

FAQPage Schema
What are the best practices for modern C# coding standards in .NET applications?

Modern C# coding standards enforce consistent naming conventions like PascalCase, promote immutability using record types, leverage nullable reference types, and optimize LINQ and async/await patterns to improve overall code quality.

How do I enforce C# naming conventions and immutability during code reviews?

To enforce C# coding standards, ensure consistent PascalCase and camelCase usage, validate private field naming, and require init-only properties or immutable collections to maintain code quality and consistency.

Does this coding standards guidance cover C# 12 features like primary constructors and collection expressions?

Yes, the C# coding standards guidance demonstrates effective use of C# 12 features, specifically focusing on primary constructors, collection expressions, pattern matching, and raw string literals to write cleaner code.

What is the best way to structure async/await patterns and LINQ queries in .NET?

The best way to structure async/await and LINQ is following established C# coding standards that provide specific best practices for writing efficient LINQ queries and robust asynchronous patterns to improve readability.

Can I use these C# coding standards for an existing .NET API refactoring project?

Yes, you can apply these C# coding standards to existing .NET API refactoring projects to ensure the codebase adheres to established best practices for maintainability, structured logging, and project structure clarity.

When should I not use immutable collections and nullable reference types in C#?

You should carefully evaluate using immutable collections and nullable reference types when existing codebases lack structured logging or have dependencies incompatible with modern C# 12+ project structure requirements.