back
loading skill details...
Write modern, high-performance C# code using records, pattern matching, value objects, async/await, Span<T>/Memory<T>, and best-practice API design patterns.…
Modern C# coding standards covering records, pattern matching, value objects, async/await, and high-performance patterns. Use record types for immutable DTOs and domain entities; readonly record struct for value objects with zero-allocation semantics Leverage pattern matching with switch expressions, nullable reference types, and composition over inheritance for cleaner, type-safe code Apply async/await throughout with mandatory CancellationToken parameters; use Span<T>, Memory<T>, and ArrayPool<T> for performance-critical paths Handle expected business errors with Result<T, TError> types; reserve exceptions for unexpected system failures Avoid reflection-based metaprogramming (AutoMapper, Mapster) in favor of explicit mapping and composition patterns 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: Full value object examples and pattern matching code performance-and-api-design.md: Span/Memory examples and API design principles composition-and-error-handling.md: Composition over inheritance, Result type, testing patterns anti-patterns-and-reflection.md: Reflection avoidance and common anti-patterns
don't have the plugin yet? install it then click "run inline in claude" again.