This is a comprehensive C# reference that covers modern language features from C# 11 and 12, including primary constructors, collection expressions, and pattern matching. It's densely packed with actual code examples for async/await patterns, LINQ queries, and enterprise development scenarios. The examples are production-ready, showing things like ValueTask optimization, IAsyncEnumerable streaming, and proper cancellation token handling. If you're working on .NET 8+ projects and want Claude to write idiomatic modern C#, this gives it the context to use recent language features instead of falling back to older patterns. The code snippets are realistic enough that you could probably copy-paste them directly into a project.

skills.sh installs
219
GitHub stars
44
last updated
Aug 21, 2026

Install

$ npx -y skills add personamanagmentlayer/pcl --skill csharp-expert --agent claude-code

Installs into .claude/skills of the current project.

Files

C# Expert

You are an expert C# developer with deep knowledge of modern C# (12+), .NET 8+, ASP.NET Core, LINQ, async programming, and enterprise application development. You write clean, performant, and maintainable C# code following industry best practices.

Best Practices

1. Use Modern C# Features

// Records for DTOs
public record UserDto(int Id, string Name, string Email);

// Pattern matching
string GetMessage(object value) => value switch
{
    int i => $"Integer: {i}",
    string s => $"String: {s}",
    _ => "Unknown"
};

// Null-coalescing assignment
_cache ??= new Dictionary<string, object>();

2. Async All the Way

// Good - async all the way
public async Task<User> GetUserAsync(int id)
{
    return await _repository.GetByIdAsync(id);
}

// Bad - blocking on async
public User GetUser(int id)
{
    return _repository.GetByIdAsync(id).Result; // Deadlock risk!
}

3. Use Dependency Injection

// Good - constructor injection
public class UserService
{
    private readonly IUserRepository _repository;

    public UserService(IUserRepository repository)
    {
        _repository = repository;
    }
}

Sponsors

Details

Repository
github.com/personamanagmentlayer/pcl
Category
.NET & C#
First seen
Jun 3, 2026

More from personamanagmentlayer/pcl

All 99

Recommended

More .NET & C#
1dotnet avatarnuget-trusted-publishingdotnet/skillsSet up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet OIDC,4.1Kskills.sh installs
2aaronontheweb avatarefcore-patternsaaronontheweb/dotnet-skillsEntity Framework Core best practices including NoTracking by default, query splitting for navigation collections, migration management, dedicated migration serv1.6Kskills.sh installs
3aaronontheweb avatarplaywright-blazor-testingaaronontheweb/dotnet-skillsWrite UI tests for Blazor applications (Server or WebAssembly) using Playwright. Covers navigation, interaction, authentication, selectors, and common Blazor-sp560skills.sh installs
4github avataraspnet-minimal-api-openapigithub/awesome-copilotCreate ASP.NET Minimal API endpoints with proper OpenAPI documentation9.2Kskills.sh installs
5github avatarcsharp-mcp-server-generatorgithub/awesome-copilotGenerate a complete MCP server project in C# with tools, prompts, and proper configuration8.4Kskills.sh installs
6affaan-m avatarfsharp-testingaffaan-m/eccF# testing patterns with xUnit, FsUnit, Unquote, FsCheck property-based testing, integration tests, and test organization best practices.5.3Kskills.sh installs