BeClaude

dotnet-claude-kit

New
412Community RegistryGeneralby Mukesh Murugan · MIT

47 skills, 10 agents, 16 commands, 10 rules, 5 templates, Roslyn MCP server for .NET 10 / C# 14

Community PluginView Source

Overview

<p align="center"> <h1 align="center">dotnet-claude-kit</h1> <p align="center"> <strong>Make Claude Code an expert .NET developer.</strong> <br /> 47 skills &bull; 10 specialist agents &bull; 15 slash commands &bull; 10 rules &bull; 5 project templates &bull; 15 MCP tools &bull; 7 hooks <br /> Built for .NET 10 / C# 14. Architecture-aware. Token-efficient. </p> </p>

<p align="center"> <a href="#installation">Installation</a> &bull; <a href="#quick-start">Quick Start</a> &bull; <a href="#what-makes-this-10x">10x Features</a> &bull; <a href="#slash-commands-16">Commands</a> &bull; <a href="#skills-47">Skills</a> &bull; <a href="#agents-10">Agents</a> &bull; <a href="#rules-10">Rules</a> &bull; <a href="#templates-5">Templates</a> &bull; <a href="#roslyn-mcp-server">MCP Server</a> &bull; <a href="#contributing">Contributing</a> </p>


The Problem

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.

What This Is

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:

  • Which architecture fits your project (VSA, Clean Architecture, DDD, Modular Monolith)
  • How to write modern C# 14 with primary constructors, collection expressions, and records
  • How to build minimal APIs with IEndpointGroup auto-discovery, TypedResults, and proper OpenAPI metadata
  • How to use EF Core without repository wrappers, with compiled queries and interceptors
  • How to test with WebApplicationFactory + Testcontainers instead of in-memory fakes
  • How to navigate your codebase via Roslyn semantic analysis instead of expensive file reads
  • How to scaffold complete features, run health checks, review PRs, and enforce conventions

No configuration. No setup wizards. Just copy one file and go.

What Makes This 10x

v0.4.0 adds an action layer on top of the knowledge layer — Claude doesn't just know the right patterns, it actively applies them:

CapabilityWhat It Does
ScaffoldingOne command → complete feature with Result pattern, validation (FluentValidation + filter wiring), OpenAPI metadata, pagination, CancellationToken, and tests. 9-point checklist enforced. All 4 architectures.
Interactive SetupGuided project initialization: architecture questionnaire → tech stack selection → customized CLAUDE.md generation.
Health CheckAutomated codebase analysis using MCP tools: anti-pattern scan, diagnostics, dead code detection, test coverage → graded report card.
PR ReviewMulti-dimensional code review: anti-patterns, diagnostics, API surface changes, blast radius, architecture compliance, test coverage.
Convention LearningDetects project-specific patterns (naming, structure, modifiers) and enforces them in new code. Adapts to your codebase.
Smart Tools15 Roslyn-powered MCP tools including dependency graphs, circular dependency detection, dead code finder, and test coverage mapping.
Active Hooks6 hooks for automated quality: format on edit, anti-pattern checks on commit, test result analysis, structure validation.

Why dotnet-claude-kit?

MetricWithout KitWith KitImpact
Architecture decisionsClaude picks randomlyAsks questions, recommends with rationaleCorrect architecture from day one
Code qualityGeneric C#, legacy patternsModern C# 14 with idiomatic .NET 10Zero "fix this pattern" revision cycles
Codebase navigationReads entire files (500-2000+ tokens each)Roslyn MCP queries (30-150 tokens each)~10x token savings on exploration
Anti-patterns generatedDateTime.Now, repository-over-EF, new HttpClient()TimeProvider, direct DbContext, IHttpClientFactoryProduction-ready on first generation
Testing approachIn-memory fakes, mocked everythingWebApplicationFactory + TestcontainersTests that catch real bugs
Production resilienceNo retry, no circuit breakersPolly v8 pipelines with telemetryHandles transient failures automatically

The result: Less time reviewing and correcting Claude's output. More time shipping features.

Installation

Plugin Install (Recommended)

Install as a Claude Code plugin — all 47 skills, 10 agents, 16 commands, 10 rules, hooks, and MCP config activate globally:

bash
# In your terminal — install the Roslyn MCP server
dotnet tool install -g CWM.RoslynNavigator

Then inside a Claude Code session:

code
# 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):

bash
claude --plugin-dir /path/to/dotnet-claude-kit

Per-Project Setup

Navigate to your project directory (existing or empty) and run:

bash
/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.

<details> <summary><strong>Manual Template Copy (Alternative)</strong></summary>

If you prefer manual setup, copy the template matching your project type:

bash
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.

</details>

Start Claude Code — 47 skills, 10 agents, 16 commands, 10 rules, and 15 MCP tools activate automatically.

That's it. Claude now writes .NET code the way a senior .NET engineer would.

<details> <summary><strong>Manual Install (Alternative)</strong></summary>

If you prefer to clone the repo and wire things up manually:

bash
# 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

</details>

What You Get

Before dotnet-claude-kit

csharp
// 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
    }
}

After dotnet-claude-kit

csharp
// 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));
        }
    }
}
csharp
// 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>>();
    }
}

Result pattern. FluentValidation with endpoint filters. IEndpointGroup auto-discovery. TypedResults with OpenAPI metadata. CancellationToken everywhere. Sealed handlers. TimeProvider injection. DbContext directly. Every pattern comes from the skills in this kit.


Slash Commands (16)

Shortcut workflows that orchestrate skills and agents. Type the command and Claude handles the rest.

CommandPurposeInvokes
/dotnet-initProject setup (existing or greenfield) — detects or scaffolds, then generates CLAUDE.mdproject-setup skill, dotnet-architect agent
/planArchitecture-aware planning for non-trivial tasksarchitecture-advisor skill, dotnet-architect agent
/verify7-phase verification: build → analyzers → antipatterns → tests → security → format → diffverification-loop skill
/tddRed-green-refactor with xUnit + Testcontainerstesting skill, test-engineer agent
/scaffoldArchitecture-aware feature scaffolding (all 4 architectures)scaffolding skill, dotnet-architect agent
/code-reviewMCP-powered multi-dimensional code reviewcode-review-workflow skill, code-reviewer agent
/build-fixAutonomous build error fixing (iterative loop)autonomous-loops skill, build-error-resolver agent
/checkpointSave progress: commit + handoff notewrap-up-ritual skill
/security-scanOWASP + secrets + vulnerable dependency auditsecurity-scan skill, security-auditor agent
/migrateSafe EF Core migration workflowmigration-workflow skill, ef-core-specialist agent
/health-checkProject health assessment with letter grades (A-F)health-check skill, code-reviewer agent
/de-sloppifySystematic cleanup: format → dead code → analyzers → sealedde-sloppify skill, refactor-cleaner agent
/wrap-upSession ending ritual with handoff notewrap-up-ritual skill
/instinct-statusShow learned instincts with confidence scoresinstinct-system skill
/instinct-exportExport instincts to shareable formatinstinct-system skill
/instinct-importImport instincts from another projectinstinct-system skill

Rules (10)

Always-loaded conventions that apply to every interaction. Zero configuration — they're active as soon as the plugin is installed.

RuleEnforces
coding-styleC# 14 conventions, file-scoped namespaces, primary constructors, sealed, records
architectureAsk before recommending, no repo over EF, feature folders, dependency direction
securityNo hardcoded secrets, parameterized queries, explicit auth, HTTPS
testingIntegration-first, WebApplicationFactory + Testcontainers, AAA pattern
performanceCancellationToken propagation, TimeProvider, IHttpClientFactory, HybridCache
error-handlingResult pattern, ProblemDetails, no broad catch, boundary validation
git-workflowConventional commits, atomic commits, never force-push main
agentsMCP-first, subagent routing, skill loading order
hooksAuto-accept formatting, never skip pre-commit hooks
packagesAlways use latest stable NuGet versions, never rely on training data versions

Skills (47)

Code-heavy reference files that teach Claude .NET best practices. Each skill is under 400 lines with concrete code examples, anti-patterns (BAD/GOOD comparisons), and decision guides.

CategorySkillsWhat Claude Learns
Architecturearchitecture-advisor, vertical-slice, clean-architecture, ddd, project-structureAsk before recommending. VSA for CRUD, CA for medium complexity, DDD for rich domains, Modular Monolith for bounded contexts.
Core Languagemodern-csharpPrimary constructors, collection expressions, field keyword, records, pattern matching, spans
Web / APIminimal-api, api-versioning, authenticationMapGroup, TypedResults, endpoint filters, JWT/OIDC, Asp.Versioning
Dataef-coreNo repository wrappers. Compiled queries, interceptors, ExecuteUpdateAsync, value converters
Resilienceerror-handling, resilience, caching, messagingResult pattern, Polly v8 pipelines, HybridCache, Wolverine/MassTransit, outbox, sagas
ObservabilityloggingSerilog structured logging, OpenTelemetry, correlation IDs
TestingtestingxUnit v3, WebApplicationFactory, Testcontainers, Verify snapshots
DevOpsdocker, ci-cd, aspireMulti-stage builds, GitHub Actions, .NET Aspire orchestration
Cross-cuttingdependency-injection, configurationKeyed services, Options pattern, secrets management
Workflowworkflow-masteryParallel worktrees, plan mode strategy, verification loops, auto-format hooks, permission setup, subagent patterns
Workflows & Automationscaffolding, project-setup, code-review-workflow, migration-workflow, convention-learnerFeature scaffolding for all architectures, interactive project init, MCP-driven PR reviews, safe migration workflows, convention detection and enforcement
Verification & Qualityverification-loop, de-sloppify, health-check, security-scan7-phase verification pipeline, systematic cleanup, graded health assessment, deep security scanning
Intelligence & Learninginstinct-system, session-management, autonomous-loopsConfidence-scored pattern learning, session continuity, bounded iterative fix loops
Meta & Productivityself-correction-loop, wrap-up-ritual, context-discipline, model-selection, 80-20-review, split-memory, learning-logSelf-improving correction capture, structured session handoffs, token budget management, strategic model selection, focused code review, modular CLAUDE.md, insight documentation

Agents (10)

Specialist agents that Claude routes queries to automatically. Each agent loads the right skills, uses MCP tools for context, and knows its boundaries.

AgentWhen It ActivatesWhat It Does
dotnet-architect"set up project", "architecture", "scaffold feature", "init project"Runs the architecture questionnaire, scaffolds features, initializes projects
api-designer"create endpoint", "OpenAPI", "versioning"Designs minimal API endpoints with proper metadata, versioning, and auth
ef-core-specialist"database", "migration", "query", "DbContext"Optimizes queries, configures entities, manages migrations safely
test-engineer"write tests", "test strategy", "coverage"Integration-first testing with real databases via Testcontainers
security-auditor"security", "authentication", "JWT"OWASP top 10, auth configuration, secrets management
performance-analyst"performance", "benchmark", "caching"Identifies hot paths, configures HybridCache, async optimization
devops-engineer"Docker", "CI/CD", "Aspire", "deploy"Multi-stage Dockerfiles, GitHub Actions pipelines, Aspire orchestration
code-reviewer"review this code", "PR review", "health check", "conventions"MCP-driven multi-dimensional review, convention detection and enforcement
build-error-resolver"fix build", "build errors", "won't compile"Autonomous build-fix loop: parse errors → categorize → fix → rebuild
refactor-cleaner"clean up", "dead code", "de-sloppify"Systematic cleanup: dead code removal, formatting, sealing, CancellationToken

Templates (5)

Drop-in CLAUDE.md files that configure Claude for specific project types. Copy one file, replace the placeholders, done.

TemplateForIncludes
web-apiREST APIs, microservicesArchitecture options (VSA/CA/DDD), minimal APIs, EF Core, testing
modular-monolithMulti-module systemsModule boundaries, per-module DbContext, Wolverine/MassTransit integration events
blazor-appBlazor Server / WASM / AutoComponent organization, render mode strategy, bUnit testing
worker-serviceBackground processingBackgroundService patterns, Wolverine/MassTransit consumers, proper cancellation
class-libraryNuGet packages, shared librariesPublic API design, XML docs, semantic versioning, SourceLink

Roslyn MCP Server

Token-efficient codebase navigation via Roslyn semantic analysis. Instead of Claude reading entire source files (500-2000+ tokens each), it queries the MCP server for exactly what it needs (30-150 tokens).

ToolWhat It DoesReplaces
find_symbolLocate type/method definitionsGrep/Glob across all .cs files
find_referencesFind all usages of a symbolGrep for the type name
find_implementationsFind interface implementorsSearching for : IInterface
find_callersFind all methods calling a methodManual grep for method name
find_overridesFind overrides of virtual/abstract methodsSearching for override keyword
get_type_hierarchyInheritance chain + interfacesReading multiple files
get_project_graphSolution dependency treeParsing .csproj files manually
get_public_apiPublic API without full fileReading entire source files
get_symbol_detailFull signature, params, XML docsReading entire source files
get_diagnosticsCompiler warnings/errorsRunning dotnet build and parsing
detect_antipatterns10 .NET anti-pattern rulesManual code review
find_dead_codeUnused types, methods, propertiesManual inspection of all files
detect_circular_dependenciesProject and type-level cyclesManually tracing references
get_dependency_graphMethod call chain visualizationReading multiple files and tracing
get_test_coverage_mapHeuristic test coverage mappingSearching for test files manually

The MCP server starts automatically via .mcp.json. No manual setup required.

See mcp/CWM.RoslynNavigator/README.md for details.

Knowledge Base

Living reference documents updated per .NET release:

DocumentPurpose
dotnet-whats-new.NET 10 / C# 14 features and how to use them
common-antipatternsPatterns Claude should never generate
package-recommendationsVetted NuGet packages with rationale and "when NOT to use"
breaking-changes.NET migration gotchas
decisions/Architecture Decision Records explaining every default

Hooks (7)

Automated workflow integration:

HookEventWhat It Does
pre-bash-guard.shPreToolUse (Bash)Blocks destructive git ops (force push, reset --hard), warns on risky commands
pre-commit-format.shPre-commitdotnet format --verify-no-changes ensures consistent formatting
pre-commit-antipattern.shPre-commitDetects DateTime.Now, async void, new HttpClient() in staged files
post-scaffold-restore.shPost-file-edit (*.csproj)dotnet restore after project file changes
post-edit-format.shPost-file-edit (*.cs)Auto-formats C# files after edits
post-test-analyze.shPost-testParses test results and outputs actionable summary
pre-build-validate.shPre-buildValidates project structure (solution file, Directory.Build.props, test projects)

Defaults & Decisions

Every default is documented with an ADR explaining why:

DecisionDefaultWhy
ArchitectureAdvisor-drivenAsks questions first, then recommends VSA, CA, DDD, or Modular Monolith (ADR-005)
Error handlingResult patternExceptions are for exceptional cases (ADR-002)
ORMEF CoreBest developer experience for most scenarios (ADR-003)
CachingHybridCacheBuilt-in stampede protection, L1+L2 (ADR-004)
APIsMinimal APIsLighter, composable, architecture-agnostic
TestingIntegration-firstWebApplicationFactory + Testcontainers over in-memory fakes
TimeTimeProviderTestable, injectable, no more DateTime.Now
HTTP clientsIHttpClientFactoryNo more new HttpClient() socket exhaustion

Repository Structure

code
dotnet-claude-kit/
├── CLAUDE.md                    # Instructions for developing THIS repo
├── AGENTS.md                    # Agent routing & orchestration
├── agents/                      # 10 specialist agents
├── skills/                      # 47 skills
├── commands/                    # 15 slash commands
├── .claude/rules/               # 10 always-loaded rules
├── templates/                   # 5 drop-in CLAUDE.md templates
├── knowledge/                   # Living reference documents + ADRs
├── mcp/CWM.RoslynNavigator/     # Roslyn MCP server (15 tools)
├── mcp-configs/                 # MCP server config templates
├── hooks/                       # 7 Claude Code hooks
├── docs/                        # Shorthand + longform guides
├── .mcp.json                    # MCP server registration
├── .claude-plugin/              # Plugin marketplace manifests
├── .cursor/rules/               # Cursor IDE compatibility
├── .codex/                      # Codex CLI compatibility
└── .github/workflows/           # CI validation

Multi-Platform Support

dotnet-claude-kit works with multiple AI coding tools:

PlatformConfig FileWhat It Provides
Claude Code.claude-plugin/plugin.jsonFull integration: skills, agents, commands, rules, hooks, MCP
Cursor.cursor/rules/dotnet-rules.mdConsolidated .NET rules for Cursor IDE
Codex CLI.codex/AGENTS.mdAgent configuration pointing to skills and agents

Documentation

GuideForContent
Shorthand GuideQuick referenceAll commands, skills, agents, hooks, MCP tools with cross-reference matrix
Longform GuideDeep diveWorkflows, token optimization, autonomous patterns, troubleshooting

Contributing

See CONTRIBUTING.md for how to add skills, agents, commands, rules, knowledge, templates, and MCP tools.

License

MIT


<p align="center"> Built by <a href="https://codewithmukesh.com">Mukesh Murugan</a> &bull; Powered by Claude Code </p>

Install & Usage

1
Create the skills directory
mkdir -p .claude/skills
2
Download the skill file
mkdir -p .claude/skills && curl -o .claude/skills/dotnet-claude-kit.md https://raw.githubusercontent.com/codewithmukesh/dotnet-claude-kit/main/SKILL.md
3
Invoke in Claude Code
/dotnet-claude-kit
View source on GitHub
mcpagentdotnetcsharpaspnetefcoreslash-commandsrules

Frequently Asked Questions

What is dotnet-claude-kit?

47 skills, 10 agents, 16 commands, 10 rules, 5 templates, Roslyn MCP server for .NET 10 / C# 14

How to install dotnet-claude-kit?

To install dotnet-claude-kit, create the .claude/skills directory in your project, then run the curl command to download the skill file. Once installed, invoke it in Claude Code with /dotnet-claude-kit.

What is dotnet-claude-kit best for?

dotnet-claude-kit is a community categorized under General. It is designed for: mcp, agent, dotnet, csharp, aspnet, efcore, slash-commands, rules. Created by Mukesh Murugan.