csharp-coding-standards

Guide C# coding standards for .NET 8 and ASP.NET Core Web API development.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/AndyHsuTW/everything-llm-workspace --skill csharp-coding-standards-andyhsutw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-coding-standards
Source: https://github.com/AndyHsuTW/everything-llm-workspace/tree/main/.github/skills/csharp-coding-standards
Command: npx skills add https://github.com/AndyHsuTW/everything-llm-workspace --skill csharp-coding-standards-andyhsutw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines and best practices for writing clean, maintainable, and efficient C# code, covering both general programming principles and specific ASP.NET Core development.

Core Features & Use Cases

  • Coding Standards: Enforces naming conventions, immutability, error handling, and async patterns.
  • ASP.NET Core Best Practices: Details Minimal API structure, dependency injection, middleware, and global exception handling.
  • API Design: Outlines REST conventions, response formats, and input validation.
  • File Organization: Presents Clean Architecture and Vertical Slice patterns.
  • Code Quality: Identifies and advises against common code smells like long methods and deep nesting.
  • Use Case: A new developer joins a .NET team and needs to quickly understand and adhere to the established coding standards for building a new ASP.NET Core Web API.

Quick Start

Review the C# coding standards documentation to understand best practices for .NET 8 and C# 12 development.

Frequently Asked Questions about csharp-coding-standards

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

FAQPage Schema
How do I organize files for an ASP.NET Core Web API using Clean Architecture or Vertical Slice?

Organizing files for an ASP.NET Core Web API involves adopting either Clean Architecture or Vertical Slice patterns to structure project dependencies logically, which enhances code quality and maintainability across complex applications.

What are the C# coding standards for .NET 8 and C# 12 development?

C# coding standards for .NET 8 and C# 12 encompass naming conventions, immutability, error handling, async/await, nullable reference types, primary constructors, and collection expressions to ensure clean, maintainable, and efficient code.

How do I structure a Minimal API in ASP.NET Core Web API?

Structuring a Minimal API in ASP.NET Core involves applying Clean Architecture or Vertical Slice patterns for file organization, alongside utilizing dependency injection and middleware to ensure proper separation of concerns.

What are the best practices for async/await and nullable reference types in C#?

Best practices for async/await and nullable reference types in C# include enforcing immutability, avoiding deep nesting, and properly managing asynchronous operations to prevent null-related runtime errors and maintain code quality.

How do I implement global exception handling in an ASP.NET Core Web API?

Global exception handling in an ASP.NET Core Web API is implemented by configuring specific middleware to catch unhandled exceptions centrally, ensuring consistent REST response formats and robust API design without cluttering endpoint logic.

How should I organize files for an ASP.NET Core Web API using Clean Architecture or Vertical Slice?

Organizing files for an ASP.NET Core Web API involves adopting Clean Architecture or Vertical Slice patterns to structure dependencies logically, which enhances code quality and maintainability across complex applications.