This skill should be used when building C# and ASP.NET Core applications following C# 14 best practices. It covers naming conventions, nullable reference types, pattern matching, project structure, Entity Framework Core, JWT authentication, validation, global error handling, unit testing with xUnit/Moq, caching strategies, and async/await performance patterns.
<Nullable>enable</Nullable>; use is null / is not null consistently.Result or .Wait()builder.Services; prefer Scoped for repositoriesreferences/naming-formatting-language-features.md — PascalCase/camelCase/underscore rules,
file-scoped namespaces, nameof, pattern matching, switch expressions, nullable annotations,
XML documentation commentsreferences/project-structure-data-access-auth.md — solution folder layout, Program.cs
bootstrap, EF Core DbContext + generic repository, Include/AsNoTracking/projection queries,
JWT bearer configuration, authorization policies, health checksreferences/validation-testing-performance.md — data annotations, FluentValidation,
global exception handler middleware, xUnit + Moq unit tests with [Fact]/[Theory],
IMemoryCache + Redis distributed cache, Task.WhenAll parallel patternsTASK RECEIVED
|
├── Naming / Null safety / Pattern matching / Docs?
| → naming-formatting-language-features.md
├── Project setup / EF Core / Auth / Health checks?
| → project-structure-data-access-auth.md
└── Validation / Error handling / Tests / Performance?
→ validation-testing-performance.md
| Pattern | Rule |
|---|---|
| Classes / Methods | PascalCase |
| Private fields | _camelCase |
| Interfaces | IPrefix |
| Namespaces | File-scoped (namespace X.Y;) |
| Null checks | is null / is not null |
| Exception guards | throw new ArgumentNullException(nameof(x)) |
| Async method suffix | Async (e.g., GetUserAsync) |
| Read-only EF queries | .AsNoTracking() |
| Parallel async | await Task.WhenAll(...) |
| Validation library | FluentValidation (AbstractValidator<T>) |
| Unit test framework | xUnit + Moq |
| Containerize | dotnet publish --os linux --arch x64 |