Teach Claude Code modern .NET 10
The .NET Agent Kit is a free, open-source plugin I built for Claude Code. It comes with 37 skills, 11 slash commands, 3 agents, 8 rules, and 24 Roslyn MCP tools, so that Claude writes code that follows current .NET 10 and C# 14 practices.
- v0.15.0
- ·
- MIT licensed
- ·
- Free and open source
- ·
- .NET 10 / C# 14
An example session in a .NET 10 Web API project
- Skills
37
26 knowledge + 11 workflows
- Commands
11
/verify · /spec · /tdd
- Rules
8
Digest added at session start
- MCP tools
24
Read-only, built on Roslyn
The problem
5 patterns · before / afterWhat Claude writes without the kit
Out of the box, Claude Code doesn't know the conventions of modern .NET, so it often falls back to older patterns. Here are five common examples, and what the same code looks like once the kit is installed. Pick a tab to compare them side by side.
try
{
var product = await _repository
.GetByIdAsync(id);
if (product == null)
throw new NotFoundException();
return Ok(product);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error");
return StatusCode(500);
}public async Task<Results<Ok<ProductResponse>,
ProblemHttpResult>> HandleAsync(Guid id, CancellationToken ct)
{
var product = await db.Products
.Where(p => p.Id == id)
.Select(p => new ProductResponse(p.Id, p.Name))
.FirstOrDefaultAsync(ct);
if (product is null)
return Problems.NotFound();
return TypedResults.Ok(product);
}The kit teaches Claude these patterns, so you spend less time correcting its code in review.
Does it work?
Evals · benchmark · v0.15.0I measure it with evals
The kit has 26 eval cases that run with claude plugin eval. Each request is answered with the
plugin and without it, and a grader scores both answers from 0 to 1. These numbers come from the full run on
Claude Sonnet on 2026-12-01, with 2 runs per case for each side.
- All 26 eval cases
0.62 0.99
Score with the kit, against without it
- 18 quality cases
0.79 0.99
The code-quality cases alone
- Navigator accuracy
61 92
Blinded judge, 0 to 100, 55 questions
- Tool calls
137 62
Same 55 questions, 32% less time
| What the case checks | Without | With |
|---|---|---|
| Pushes back on a generic repository over EF Core | 0 | 1.0 |
| Another user's order is a 404, enforced in the query, with a cross-user test | 0.33 | 1.0 |
| Per-caller rate limits, strict login limit, 429 + Retry-After, per-instance limits | 0.40 | 1.0 |
| Pins EF Core to an exact 10.0.x on net10.0 (no floating 10.*) | 0.5 | 0.88–1.0 |
| xUnit v3 + Testcontainers fixture with no in-memory database | 0.63 | 1.0 |
| Handlers return TypedResults unions with ProblemDetails | 0.75 | 1.0 |
| EF Core 10 named query filters | 0.75 | 1.0 |
| Built-in OpenAPI + Scalar instead of Swashbuckle | 0.83 | 1.0 |
| Production hardening behind a proxy (KnownIPNetworks, HSTS, strict CORS) | 1.0 | 1.0 |
| Loads the right workflow (/verify, /migrate, /spec, /build-fix, /code-review) | – | every run |
Reading the eval scores
Ten of the 18 quality cases already score 1.0 without the kit on current Sonnet, including production
hardening, because the model already knows KnownIPNetworks and HSTS. I keep them in the suite as
regression checks. The 8 routing cases check that the right kit workflow loads, so they can only pass with the
plugin installed. Each case ran twice per side on one model, so treat the scores as the direction of the
difference and keep the small sample in mind.
Roslyn navigator benchmark
I asked Claude Code 11 everyday questions on each of five open-source solutions, from 9 to 270 projects, with and without the navigator, and a blinded judge scored every answer. Across all 55 questions, accuracy went from 61 to 92, the total time went from 734 to 502 seconds, and tool calls dropped from 137 to 62. It was slower on 7 of the 55 questions and cost slightly more on the two largest solutions, and each question ran once per side.
What's inside
Skills · Agents · MCP · TemplatesThe four parts of the kit
Skills hold the .NET knowledge, and 11 of them are the slash commands you type. The three agents handle work that needs its own context or a read-only toolset, the MCP tools let Claude look up your code without reading whole files, and the templates give Claude your project's conventions from the very first session. On top of these, 8 rules and a set of guard hooks keep every session on the same conventions.
Architecture Advisor
Asks first, then recommends modular slices, VSA, Clean Architecture, or DDD
Modular Slices
The default: modules of vertical slices, contracts projects, per-module outbox
Architecture advisor
Try it · 3 questionsPick an architecture for your project
Choosing an architecture at the start of a project is not easy, so the kit includes an advisor for it. For business apps it starts from modular slices, which is a modular monolith whose modules are built from vertical slices, and the questions decide whether something else fits better. Answer the three questions below to get a quick recommendation. The full advisor inside Claude Code asks up to 16 questions and also considers things like compliance needs, integrations, and scale.
Pick three answers
tell me about your project
1 How many business areas?
2 How complex are the business rules?
3 Where are you starting from?
Recommendation
Modular slices
This is the default for business apps. Each area becomes a module with its own contracts project, schema, and outbox, and each feature lives in one folder with its endpoint, handler, and validator. It costs little more than a single project on day one and saves you a restructure later.
The recommendation updates as you change your answers
See it in action
7 example scenariosCommon tasks with the kit
Click on a scenario to see how Claude handles a common .NET task when the kit is installed. The skills, agents, and MCP tools are the real ones from the kit, and the output is a simplified example of what you would see.
Quick start
3 stepsInstalling the kit in three steps
You need Claude Code and the .NET 10 SDK. Add the plugin from inside Claude Code, and then run
/dotnet-init in your project so the kit can generate a CLAUDE.md file for it. The Roslyn MCP server
starts on its own through dotnet dnx, so there is no separate install step.
- 01
Install the plugin
Add the marketplace and install the plugin from inside Claude Code, or clone the repository and load it from disk.
- 02
Set up your project
Run /dotnet-init to generate a CLAUDE.md and copy the 8 rules into .claude/rules/, or copy the template that matches your project type.
- 03
Start building
From here, Claude loads the matching skills and MCP tools on its own as you work. If something seems off, run /doctor.
How I Use dotnet-agent-kit: Making Claude Code Write Senior-Level .NET
If you want more than the install commands, this article walks through what Claude Code gets wrong on .NET out of the box, how each skill, agent, and MCP tool helps, and the workflow I follow day to day.
FAQ
14 questions-
Q01 What is the .NET Agent Kit?
The .NET Agent Kit is a free, open-source plugin I built for Claude Code. It teaches Claude how modern .NET code should be written. Version 0.15.0 includes 37 skills (26 knowledge skills and 11 slash-command workflows), 3 agents, 8 rules, 24 read-only Roslyn MCP tools, a set of guard hooks, and 7 CLAUDE.md templates, all built for .NET 10 and C# 14. It also ships a free runnable starter solution that you can install with dotnet new.
-
Q02 How does it differ from using Claude Code without the kit?
Without the kit, Claude often writes generic C#. It reaches for DateTime.Now instead of TimeProvider, wraps EF Core in a repository, uses an in-memory database in tests instead of Testcontainers, and reads whole files to find one method. With the kit, Claude follows current .NET 10 patterns such as modular slices, one IEndpoint per feature, TypedResults with ProblemDetails, HybridCache, and xUnit v3 with Testcontainers, and it uses the Roslyn MCP tools to look up code. I measure this with evals: across 26 cases on Claude Sonnet, the answers score 0.99 with the kit and 0.62 without it.
-
Q03 What happens when I open a .NET repo with the kit installed?
A SessionStart hook detects the .NET repo and adds a skill index plus a digest of the 8 rules, which is about 1.5k tokens. Without that nudge Claude rarely loads skills on its own, so this is what makes the kit active, and it adds nothing outside .NET repos. The other hooks block destructive shell commands, format the C# files you edited once per turn, run restore after a .csproj change, and stop shortcuts like skipped tests, Assert.True(true), and empty catch blocks.
-
Q04 Which .NET project types are supported?
The kit comes with 7 CLAUDE.md templates: Web API, Modular Monolith (the default for business apps), Blazor App, Worker Service, Class Library, Console CLI, and Desktop App for Avalonia, WPF, WinForms, or MAUI. Each one sets up the conventions for that type of project. You can also run /dotnet-init, which detects your project, asks a few architecture questions, and generates a CLAUDE.md for you.
-
Q05 What is the modular-slices starter?
It is a complete .NET 10 solution in the kit's default architecture, which you install with dotnet new. It has two modules, Catalog and Orders, that talk to each other through public contracts and a per-module outbox. It uses minimal APIs with TypedResults and ProblemDetails, EF Core 10 on PostgreSQL, and built-in OpenAPI with Scalar, and it has 35 tests, which are xUnit v3 integration tests with Testcontainers plus architecture tests for the module boundaries. It also includes an Aspire 17 AppHost, a Dockerfile, GitHub Actions CI, and a CLAUDE.md with the 8 rules. From a clone of the repository, run 'dotnet new install ./starters/modular-slices' and then 'dotnet new cwm-modular-slices -n Acme.Shop'. It is free like the rest of the kit.
-
Q06 Which agents does the kit include?
The kit has three agents. code-reviewer does read-only reviews of correctness, security, and performance, and it learns your conventions across sessions. build-error-resolver parses build errors, fixes them, and rebuilds until the build is green. refactor-cleaner removes dead code and cleans up in an isolated git worktree, so your working copy stays untouched. Earlier versions had ten specialist agents, but their knowledge already lived in skills, so I folded them back into the skills. An agent now exists only where a separate context or a tool restriction is worth the cost.
-
Q07 What are MCP tools and why do they matter?
MCP (Model Context Protocol) tools let Claude ask questions about your code through Roslyn instead of reading raw files. For example, find_symbol finds where a type is defined, get_symbol_source returns just one method instead of the whole file, and get_endpoint_map lists every route in the solution. The 24 tools are read-only and return file paths, line numbers, and short snippets with a Truncated flag, so a single call can't flood Claude's context. The server starts through dotnet dnx, so there is nothing to install. In my benchmark of 55 questions across five open-source solutions, accuracy went from 61 to 92 with the navigator, the total time dropped by 32%, and tool calls went from 137 to 62.
-
Q08 How does the architecture advisor work?
Modular slices is the default for business apps. It is a modular monolith whose modules are built from vertical slices, and the modules talk to each other only through contracts projects and an outbox. The architecture-advisor skill starts from that default and asks up to 16 questions about your domain, team, lifetime, compliance needs, existing code, and integrations. When the answers point elsewhere, it recommends single-project Vertical Slice Architecture, Clean Architecture, or DDD instead, explains which answers drove the pick, and shows how you can move to another architecture later.
-
Q09 What are slash commands and how do they work?
The kit has 11 slash commands, which are workflow skills that you type in Claude Code: /dotnet-init, /spec, /verify, /tdd, /scaffold, /code-review, /build-fix, /migrate, /de-sloppify, /wrap-up, and /doctor. For example, /verify runs a 7-phase check (build, analyzers, anti-patterns, tests, security, format, and diff), and /verify security checks 7 layers, including object-level authorization, hardening behind a proxy, and rate limiting. /migrate packages reports outdated packages, CVEs, and commercial-license traps like MediatR 13+, and /doctor checks that the kit itself works on your machine.
-
Q10 Is the kit compatible with existing projects?
Yes. Run /dotnet-init in your project folder. It detects your solution, looks at your project SDKs and tech stack, and generates a CLAUDE.md file that fits your project. If you already have a CLAUDE.md, it asks whether to merge, overwrite, or keep it, and it backs up the original first. It can also copy the 8 rules into .claude/rules/ so they load in full every session. In an existing codebase the kit follows the architecture that is already there, so you don't need to migrate or refactor anything first.
-
Q11 How do I install the .NET Agent Kit?
You need Claude Code and the .NET 10 SDK. Inside Claude Code, run '/plugin marketplace add codewithmukesh/dotnet-agent-kit' and then '/plugin install dotnet-agent-kit'. The Roslyn MCP server starts on its own through dotnet dnx, so there is no separate tool to install. After that, you can run /dotnet-init once per project. If you prefer to load the kit from disk, clone the repository and start Claude Code with 'claude --plugin-dir ./dotnet-agent-kit'. If you installed it under the old dotnet-claude-kit name, reinstall it once, because the plugin ID changed.
-
Q12 Does it work with other AI coding tools?
Claude Code is the main target, and it is the only one that the evals, hook tests, and session hook cover. The repository also ships config for Cursor, Codex CLI, OpenCode, and Kimi Code, which get the same skills and rules. CI checks that their counts and versions match, but nobody tests them end to end yet, so reports and fixes from people who use them are welcome.
-
Q13 Is the .NET Agent Kit free and open source?
Yes, it is completely free and MIT licensed. Everything in the kit, including the skills, agents, rules, hooks, templates, the Roslyn MCP server, and the modular-slices starter, is open source on GitHub. Contributions are always welcome.
-
Q14 How often is the kit updated?
I keep updating the kit as .NET changes. Version 0.15.0 was checked against .NET 10.0.15, .NET 11.0.0, Aspire 17, and EF Core 10. A weekly CI job checks the package versions that the docs mention and compiles the code samples, and it opens an issue when something drifts. If you find guidance that is wrong or out of date, there is a GitHub issue template for exactly that.
Use the kit in your next
claude
session
on a .NET 10 project
The kit comes with 37 skills, 11 slash commands, 3 agents, 24 MCP tools, 7 templates, and a runnable starter. It is free, open source, and MIT licensed.
Join 9,735 developers on the newsletter