Make Claude Code a .NET 10 Expert
> /plugin marketplace add codewithmukesh/dotnet-claude-kit> /plugin install dotnet-claude-kit@dotnet-claude-kit
What's inside
📖 New here? Start with the guide
How I Use dotnet-claude-kit: Making Claude Code Write Senior-Level .NET →
The complete walkthrough: install and update the plugin, what happens in your first session, the everyday feature workflow, how the Roslyn MCP server cuts token usage, which commands keep a codebase healthy, plus FAQ and troubleshooting.
This README is the reference. The guide is how to actually use it.
Claude Code is powerful, but out of the box it doesn't know your .NET conventions. It generates DateTime.Now instead of TimeProvider. It wraps EF Core in repository abstractions. It picks an architecture without asking about your domain. It reads entire source files when a Roslyn query would cost 10x fewer tokens.
dotnet-claude-kit fixes all of that.
A curated knowledge and action layer that sits between Claude Code and your .NET project. Drop a single CLAUDE.md into your repo and Claude instantly knows:
IEndpointGroup auto-discovery, TypedResults, and proper OpenAPI metadataWebApplicationFactory + Testcontainers instead of in-memory fakesNo configuration. No setup wizards. Just copy one file and go.
An action layer on top of the knowledge layer — Claude doesn't just know the right patterns, it actively applies and enforces them:
| Capability | What It Does |
|---|---|
| Surgical Code Analysis | 22 Roslyn-powered MCP tools with guaranteed bounded responses. get_symbol_source reads ONE method body instead of the whole file. get_file_outline shows what's in a file before reading it. resolve_stack_trace turns an exception into file:line in your own code. analyze_change_impact answers "what breaks if I change this?" in one call. Every list-returning tool reports Truncated — no tool can blow your context window. |
| Architecture Enforcement | /arch-check verifies the code still matches its declared architecture (VSA, Clean, DDD, Modular Monolith): dependency direction, layer violations, module leaks, cycles — with file:line evidence and fixes. |
| Dependency Health | /outdated reports stale packages, CVEs, and commercial-license traps (MediatR 13+, MassTransit 9+, FluentAssertions 8+, AutoMapper 15+) before an innocent update-all changes your legal position. |
| Security Mapping | get_endpoint_map inventories every route with its auth posture (authorized/anonymous/unmarked) in one token-cheap call — /security-scan starts every auth audit there. |
| DI X-Ray | get_di_registrations maps every service registration with lifetimes, duplicate detection, and captive-dependency risks (singleton holding scoped). |
| Agents That Learn | Specialist agents carry memory: project — the code reviewer, architect, and security auditor learn your conventions across sessions instead of rediscovering them. The reviewer is tool-enforced read-only; the cleanup agent works in an isolated worktree. |
| Scaffolding | One command → complete feature with Result pattern, validation, OpenAPI metadata, pagination, CancellationToken, and tests. 9-point checklist enforced. All 4 architectures. |
| Health Check | Automated codebase analysis using MCP tools: anti-pattern scan, diagnostics, dead code detection, test coverage → graded report card. |
| PR Review | Multi-dimensional code review: anti-patterns, diagnostics, API surface changes, blast radius, architecture compliance, test coverage. |
| Convention Learning | Detects project-specific patterns (naming, structure, modifiers) and enforces them in new code. Adapts to your codebase. |
| Active Hooks | Automated quality scripts — format on edit, destructive-command guard, restore on .csproj change — tested on Windows and Linux in CI. |
| Always Current | Every package recommendation verified against NuGet with licensing-trap warnings, and a .NET 11 preview watch so guidance never rots. |
| Metric | Without Kit | With Kit | Impact |
|---|---|---|---|
| Architecture decisions | Claude picks randomly | Asks questions, recommends with rationale | Correct architecture from day one |
| Code quality | Generic C#, legacy patterns | Modern C# 14 with idiomatic .NET 10 | Zero "fix this pattern" revision cycles |
| Codebase navigation | Reads entire files (500-2000+ tokens each) | Roslyn MCP queries (30-150 tokens each) | ~10x token savings on exploration |
| Anti-patterns generated | DateTime.Now, repository-over-EF, new HttpClient() | TimeProvider, direct DbContext, IHttpClientFactory | Production-ready on first generation |
| Testing approach | In-memory fakes, mocked everything | WebApplicationFactory + Testcontainers | Tests that catch real bugs |
| Production resilience | No retry, no circuit breakers | Polly v8 pipelines with telemetry | Handles transient failures automatically |
The result: Less time reviewing and correcting Claude's output. More time shipping features.
Prefer a narrated walkthrough with screenshots and troubleshooting? Read the complete installation and usage guide.
Install as a Claude Code plugin — all 47 skills (including 16 slash-command workflows), 10 agents, hooks, and MCP config activate globally. The 10 rules ship in this repo for you to copy into your project's .claude/rules/:
# In your terminal — install the Roslyn MCP server
dotnet tool install -g CWM.RoslynNavigator
macOS/Linux: If the server fails with "No .NET SDKs were found", set
DOTNET_ROOTto your .NET installation root (e.g./usr/local/share/dotnet). See the MCP server troubleshooting guide.
Then inside a Claude Code session:
# Add the marketplace and install the plugin
/plugin marketplace add codewithmukesh/dotnet-claude-kit
/plugin install dotnet-claude-kit
For local development/testing (loads directly from disk, no install needed):
claude --plugin-dir /path/to/dotnet-claude-kit
Navigate to your project directory (existing or empty) and run:
/dotnet-init
Existing project? It detects your solution, scans .csproj SDKs, reads your tech stack from config, asks architecture questions, and generates a customized CLAUDE.md.
Greenfield project? It asks what you're building, scaffolds the full solution structure (dotnet new sln, projects, Directory.Build.props, src/ and tests/ folders), then generates CLAUDE.md. Follow up with /scaffold to add your first feature.
No manual template copying needed.
If you prefer manual setup, copy the template matching your project type:
cp templates/web-api/CLAUDE.md ./CLAUDE.md # REST API
cp templates/modular-monolith/CLAUDE.md ./CLAUDE.md # Multi-module system
cp templates/blazor-app/CLAUDE.md ./CLAUDE.md # Blazor app
cp templates/worker-service/CLAUDE.md ./CLAUDE.md # Background workers
cp templates/class-library/CLAUDE.md ./CLAUDE.md # NuGet packages
Replace [ProjectName], update tech stack, choose your architecture.
Start Claude Code — 47 skills, 10 agents, and 22 MCP tools activate automatically. Copy the 10 rules into your project's .claude/rules/ to make them always-loaded.
That's it. Claude now writes .NET code the way a senior .NET engineer would.
If you prefer to clone the repo and wire things up manually:
# 1. Install the MCP server globally
dotnet tool install -g CWM.RoslynNavigator
# 2. Register it in Claude Code at user scope (available in ALL projects)
claude mcp add --scope user cwm-roslyn-navigator -- cwm-roslyn-navigator --solution ${workspaceFolder}
# 3. Clone the kit
git clone https://github.com/codewithmukesh/dotnet-claude-kit.git
# 4. Load as a local plugin (or copy a template manually)
claude --plugin-dir ./dotnet-claude-kit
// Claude generates this
public class OrderService
{
private readonly IOrderRepository _repo; // unnecessary abstraction over EF Core
public async Task<Order> CreateOrder(CreateOrderDto dto)
{
var order = new Order();
order.CreatedAt = DateTime.Now; // wrong — use TimeProvider
order.Items = dto.Items.ToList();
await _repo.AddAsync(order);
return order; // leaks domain entity to API
}
}
// Claude generates this
public static class CreateOrder
{
public record Command(string CustomerId, List<OrderItemDto> Items) : IRequest<Result<Response>>;
public record Response(Guid Id, decimal Total, DateTimeOffset CreatedAt);
internal sealed class Handler(AppDbContext db, TimeProvider clock)
: IRequestHandler<Command, Result<Response>>
{
public async Task<Result<Response>> Handle(Command request, CancellationToken ct)
{
var order = Order.Create(request.CustomerId, request.Items, clock.GetUtcNow());
db.Orders.Add(order);
await db.SaveChangesAsync(ct);
return Result.Success(new Response(order.Id, order.Total, order.CreatedAt));
}
}
}
// Each endpoint group auto-discovered — Program.cs never changes
public sealed class OrderEndpoints : IEndpointGroup
{
public void Map(IEndpointRouteBuilder app)
{
var group = app.MapGroup("/api/orders").WithTags("Orders");
group.MapPost("/", CreateOrderHandler)
.WithName("CreateOrder").Produces<CreateOrder.Response>(201)
.ProducesValidationProblem()
.AddEndpointFilter<ValidationFilter<CreateOrder.Command>>();
}
}
FAQ
dotnet-claude-kit is a Claude Code plugin with 47 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes api-versioning, arch-check, architecture-advisor. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it