csharp-expert

csharp-expert is a skill for Claude Code, Codex from personamanagmentlayer/pcl. It costs 70 tokens per session (1,361 once invoked), scanned A, original, Apache-2.0.

A guide for modern C# and .NET, including ASP.NET Core for web applications, LINQ for querying data, and asynchronous programming.

In plain words
What is it for?
Use it to build .NET applications, ASP.NET Core APIs, data queries, and enterprise services.
Why use it?
It helps navigate current C# syntax and common .NET application patterns without piecing together separate guidance for language, web, and data code.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/personamanagmentlayer/pcl/csharp-expert
Any agent
npx skills add personamanagmentlayer/pcl --skill csharp-expert
Clone the repo
git clone --depth 1 https://github.com/personamanagmentlayer/pcl

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for csharp-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/csharp-expert.svg)](https://agentmods.dev/skills/personamanagmentlayer/pcl/csharp-expert)
Your own site
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/csharp-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/csharp-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.01361
Opus 5 $0.00035 $0.00681
Sonnet 5 $0.00014 $0.00272
Haiku 4.5 $0.00007 $0.00136

Measured today against content hash caacd1918d0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

csharp-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

stdlib/languages/csharp-expert/SKILL.md · 242 lines

How it starts

The opening of the file, as written. The whole thing — 242 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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;
    }
}

// Bad - new keyword
public class UserService
{
    private readonly UserRepository _repository = new UserRepository();
}

4. IDisposable Pattern

public class ResourceManager : IDisposable
{
    private bool _disposed;
    private readonly FileStream _stream;

    public ResourceManager(string path)
    {
        _stream = new FileStream(path, FileMode.Open);
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    protected virtual void Dispose(bool disposing)
    {
        if (_disposed) return;

        if (disposing)
        {
            _stream?.Dispose();
        }

        _disposed = true;
    }
}

// Usage
using var manager = new ResourceManager("file.txt");

5. Configuration

// appsettings.json
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Database=mydb"
  },
  "EmailSettings": {
    "SmtpServer": "smtp.example.com",
    "Port": 587
  }
}

// Strongly-typed configuration
public class EmailSettings
{
    public string SmtpServer { get; set; } = string.Empty;
    public int Port { get; set; }
}

// Register
builder.Services.Configure<EmailSettings>(
    builder.Configuration.GetSection("EmailSettings"));

// Use
public class EmailService
{
    private readonly EmailSettings _settings;

    public EmailService(IOptions<EmailSettings> settings)
    {
        _settings = settings.Value;
    }
}

Read the full file on GitHub · 242 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · -752 lines · +40 tokens per session caacd1918d0a
  2. yesterday First seen · 994 lines · 30 tokens per session scan A 85788dbcfd61

Subscribe to this mod's changes

csharp-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (41 stars, last pushed today), licensed Apache-2.0. It adds 70 tokens to every session and 1,361 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

dpg-migration

Migration logic for Azure SDK for .NET data-plane libraries migrating from AutoRest/Swagger to TypeSpec-based generation. Uses MCP tools from the generator-agent server for automated deterministic fixes.

Azure/azure-sdk-for-net · 41 tokens

csharp-azure-spector-coverage-gaps

Discovers and implements gaps in Spector test coverage for the Azure C# HTTP client emitter. Use when asked to find missing Spector scenarios, add Spector test coverage, or implement a specific Spector spec for the Azure C# emitter. Can also compare coverage between the Azure dashboard and the Standard (TypeSpec core)…

Azure/azure-sdk-for-net · 78 tokens

mitigate-breaking-changes

Patterns and techniques for mitigating breaking changes in Azure management-plane SDKs. Covers SDK-side customizations (partial classes, CodeGenType, CodeGenSuppress) and TypeSpec decorator customizations (clientName, access, markAsPageable, alternateType, hierarchyBuilding).

Azure/azure-sdk-for-net · 60 tokens

generate-code-cs

Generate the code from typespec for C#. Parameter: C# SDK repository root location .

Azure/azure-sdk-for-net · 26 tokens

translate-a-sample

Translate the Azure SDK sample from python to C# and generate markdownn file for the sample. Parameters: C# SDK repository root; python SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; The name of sample file in Python SDK repository.

Azure/azure-sdk-for-net · 90 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens