What problem does it solve?
This Skill helps you reduce technical debt and runtime risk by applying modern C# language features consistently, making code more readable, efficient, and maintainable.
Core Features & Use Cases
- Primary constructors and modern DI-friendly class design: Use
public ClassName(dep1, dep2) to simplify service classes and reduce boilerplate in .NET 10 / C# 14.
- Cleaner collections, immutable DTOs, and value-centric modeling: Prefer collection expressions (
[]), record, and readonly record struct to make data handling more explicit and safer.
- More expressive, safer logic: Apply pattern matching (
switch, list patterns, is extraction), Span<T> for slicing without allocations, raw string literals for readable multi-line content, and field for validated auto-properties.
Quick Start
Load this skill while writing or reviewing C# code and ask your agent to refactor a target class using C# 14 features (primary constructors, records, pattern matching, span usage, and raw strings) while preserving behavior.