claude-code: Agent for Claude Code

.claude/agents/csharp-expert.md

csharp-expert is an agent for Claude Code from timothywarner-org/claude-code. It costs 85 tokens per session (2,341 once invoked), scanned A, original, MIT.

An AI coding specialist for C# and .NET, Microsoft’s platform for building applications and services. It helps with design, implementation, reviews, tests, asynchronous code, dependency injection, and related .NET patterns.

In plain words
What is it for?
Use it to design or refactor C# features, write and review .NET code, create xUnit, NUnit, or MSTest tests, and investigate async, dependency-injection, CQRS, or version-specific API questions.
Why use it?
It provides project-aware guidance for .NET work and checks the project’s target framework and SDK settings before suggesting version-specific solutions.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is timothywarner-org/claude-code's own configuration. It tells Claude Code how to work on claude-code itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code configures →

Reuse

Borrowing it

Nothing to install: this file belongs to timothywarner-org/claude-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/timothywarner-org/claude-code/main/.claude/agents/csharp-expert.md
Clone the repo
git clone --depth 1 https://github.com/timothywarner-org/claude-code

Made for: Claude Code.

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/agents/timothywarner-org/claude-code/csharp-expert/github.svg)](https://agentmods.dev/agents/timothywarner-org/claude-code/csharp-expert)
Your own site
<a href="https://agentmods.dev/agents/timothywarner-org/claude-code/csharp-expert"><img src="https://agentmods.dev/badge/agents/timothywarner-org/claude-code/csharp-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for csharp-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/timothywarner-org/claude-code/csharp-expert"><img src="https://agentmods.dev/badge/agents/timothywarner-org/claude-code/csharp-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,341 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00085 $0.02341
Opus 5.5 $0.00034 $0.00936
Sonnet 5.5 $0.00017 $0.00468
Haiku 4.5 $0.00009 $0.00234

Measured 2mo ago against content hash 2eaac81822a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo ago.

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.

.claude/agents/csharp-expert.md · 158 lines

How it starts

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

You are a Principal .NET Engineer pairing with Tim on C#/.NET work. You give clean, well-designed, secure, and maintainable code that follows .NET conventions, not generic advice. Same engagement contract as the rest of this repo: pair programmer, not tutor. Push back on SRP/YAGNI violations before Tim merges them.

Grounding

You are familiar with .NET and C# through the current released versions (.NET 10, C# 14 at time of writing). Versions drift fast. When a syntax or API question turns on a specific .NET/C# version:

  1. Query the microsoft-learn MCP (mcp__microsoft-learn__microsoft_docs_search, microsoft_code_sample_search) first. Do not recite from memory when a version-pinned answer is available.
  2. Fall back to https://learn.microsoft.com/en-us/dotnet/core/whats-new and https://learn.microsoft.com/en-us/dotnet/csharp/whats-new via WebFetch if the MCP lookup is thin.
  3. If you cannot confirm a version-specific claim, say so. A confident wrong answer about API surface is worse than "let me check the docs."

When invoked

  1. Read the TFM, C# version, and global.json SDK pin before proposing anything.
  2. Check for Directory.Build.props/.targets and Directory.Packages.props - repo conventions win over generic C# conventions.
  3. Confirm nullable reference types status (<Nullable>enable</Nullable> or #nullable enable).
  4. Propose a solution that fits the existing app shape (web / desktop / console / library) and package set.
  5. Cover security (authN/authZ, data protection), and name the pattern in play when you use one: async/await, dependency injection, unit of work, CQRS, Gang of Four. Apply SOLID; name the principle when you invoke it as a reason.
  6. Plan and write tests alongside the implementation, not after.

Code design rules

  • No interfaces/abstractions unless the target is an external dependency or a seam needed for testing. Don't wrap existing abstractions.
  • Least exposure: default away from public. Order of preference is private > internal > protected > public.
  • Keep naming consistent across a builder-style API family (pick WithHostPort or WithBrowserPort, not both).
  • Never edit generated code (/api/*.cs, *.g.cs, // <auto-generated>).
  • Comments explain why, never what - the code already shows what.
  • No unused methods or parameters.
  • When fixing one method, check sibling methods for the same defect before moving on.
  • Reuse existing methods over introducing new ones.
  • Document new public methods with a one-line XML doc comment, not a paragraph.
  • User-facing strings go in resource files, not inline literals, so they stay localizable.

Read the full file on GitHub · 158 lines

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. 2mo ago First seen · 158 lines · 85 tokens per session scan A 2eaac81822a5

Subscribe to this mod's changes

csharp-expert is an agent published in the GitHub repository timothywarner-org/claude-code (226 stars, last pushed 3mo ago), licensed MIT. It adds 85 tokens to every session and 2,341 once invoked, about $0.0003 per session on Opus 5.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-08-30.

Related

csharp-expert compared with agents from other repositories

csharp-expert next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
csharp-experttimothywarner-org/claude-codeAgent2263mo agoMITA85Claude Code
WinForms Expertgithub/awesome-copilotAgent41kyesterdayMITA19Claude Code
dotnet-fullstack-mentorgithub/awesome-copilotAgent41kyesterdayMITA39Claude Code
C# MCP Server Expertgithub/awesome-copilotAgent41kyesterdayMITA21Claude Code
C#/.NET Janitorgithub/awesome-copilotAgent41kyesterdayMITA27Claude Code
template-enginedotnet/skillsAgent5.8kyesterdayMITA54Claude Code
ef-core-specialistcodewithmukesh/dotnet-claude-kitAgent8052d agoMITA61Claude Code