dotnet-techne-csharp-coding-standards

Solid

Use when writing or refactoring modern C# with maintainability and performance standards. Keywords: coding standards, C# best practices, refactor C#, records, pattern matching, async best practices.

Code & Development 12 stars 1 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
37
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Modern C# Coding Standards ## When to Use This Skill Use this skill when: - Writing new C# code or refactoring existing code - Designing public APIs for libraries or services - Optimizing performance-critical code paths - Implementing domain models with strong typing - Building async/await-heavy applications - Working with binary data, buffers, or high-throughput scenarios ## Reference Files - [value-objects-and-patterns.md](value-objects-and-patterns.md): Full value object examples and pattern matching code - [performance-and-api-design.md](performance-and-api-design.md): Span<T>/Memory<T> examples and API design principles - [composition-and-error-handling.md](composition-and-error-handling.md): Composition over inheritance, Result type, testing patterns - [anti-patterns-and-reflection.md](anti-patterns-and-reflection.md): Reflection avoidance and common anti-patterns ## Core Principles 1. **Immutability by Default** - Use `record` types and `init`-only properties 2. **Type Safety** - Leverage nullable reference types and value objects 3. **Modern Pattern Matching** - Use `switch` expressions and patterns extensively 4. **Async Everywhere** - Prefer async APIs with proper cancellation support 5. **Zero-Allocation Patterns** - Use `Span<T>` and `Memory<T>` for performance-critical code 6. **API Design** - Accept abstractions, return appropriately specific types 7. **Composition Over Inheritance** - Avoid abstract base classes, prefer composition 8. **Value Objects as...

Details

Author
Metalnib
Repository
Metalnib/dotnet-episteme-skills
Created
6 months ago
Last Updated
2 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category