dotnet
The dotnet skill routes broad .NET tasks to narrower specialized skills by first inspecting the repository's target framework, SDK version, app model, and cross-cutting concerns. Use it for general .NET requests, C# implementation and debugging, or tasks that span multiple frameworks; do not use it if a narrower skill like aspnet-core, entity-framework-core, or maui already owns the work. After routing, the skill validates changes against the repository's actual build, test, and quality workflows.
git clone --depth 1 https://github.com/managedcode/dotnet-skills /tmp/dotnet && cp -r /tmp/dotnet/catalog/Platform/DotNet/skills/dotnet ~/.claude/skills/dotnetSKILL.md
# .NET Router Skill ## Trigger On - the user asks for general `.NET` help without naming a narrower framework or tool - implementing, debugging, reviewing, or refactoring C# or `.NET` code in a repo with multiple app models or frameworks - deciding which `.NET` skill should own a task before editing code - tasks that combine platform work with testing, quality, architecture, setup, or migration decisions ## Workflow 1. Detect the real stack first: - target frameworks and SDK version - `LangVersion` - project SDKs and workload hints - hosting model and app entry points - test framework and runner - analyzers, formatters, coverage, and CI quality gates 2. Route to the narrowest platform skill as soon as the stack is known: - Web: `aspnet-core`, `minimal-apis`, `web-api`, `blazor`, `signalr`, `grpc` - Cloud and hosting: `aspire`, `azure-functions`, `worker-services` - Desktop and client: `maui`, `wpf`, `winforms`, `winui` - Data and distributed: `entity-framework-core`, `entity-framework6`, `orleans` - AI and agentic: `semantic-kernel`, `microsoft-extensions-ai`, `microsoft-agent-framework`, `mlnet`, `mixed-reality` - Legacy: `legacy-aspnet`, `wcf`, `workflow-foundation` 3. Route cross-cutting work to the companion skill instead of keeping it inside generic `.NET` advice: - project bootstrap or repo shape: `project-setup`, `architecture` - frontend asset analysis in mixed `.NET` plus Node repos: `eslint`, `stylelint`, `htmlhint`, `webhint`, `biome`, `sonarjs`, `metalint`, `chous` - code review: `code-review` - language features: `modern-csharp` - testing: `tunit`, `xunit`, `mstest` - format, analyzers, coverage, and CI: `format`, `code-analysis`, `quality-ci`, `coverlet`, `reportgenerator` - maintainability and architecture rules: `complexity`, `netarchtest`, `archunitnet` 4. If more than one specialized skill applies, prefer the one closest to the user-visible behavior first, then pull in the quality or tooling skill second. 5. Do not stop at this skill once a narrower match exists. This skill should classify and hand off, not become a generic dumping ground. 6. After code changes, validate with the repository's actual build, test, and quality workflow instead of generic `.NET` commands. ## Routing Heuristics - If the repo contains `Microsoft.NET.Sdk.Web`, start from a web skill, not generic `.NET`. - If the repo contains Blazor, Razor Components, or `.razor` pages, prefer `blazor`. - If the repo contains `package.json`, frontend lint configs, or browser-facing asset pipelines inside the `.NET` solution, prefer the dedicated frontend analysis skills instead of generic `.NET`. - If the repo contains Orleans grains or silo hosting, prefer `orleans`. - If the repo is mostly analyzers, CI, or coverage work, prefer the quality skill directly. - If the user asks about “which skill should I use?”, answer with the narrowest matching skill and explain why in one short sentence. - If no narrower skill matches, keep the work here and stay explicit about the missing specialization. ## Deliver - the correct specialized skill choice for the task - repo-compatible code or documentation changes that stay aligned with the detected stack - validation evidence that matches the real project runner and quality toolchain ## Validate - the chosen downstream skill actually exists in the catalog - platform assumptions match project SDKs, packages, and workloads - generic guidance has been replaced by framework-specific guidance whenever possible - runner-specific commands are not mixed incorrectly - language or runtime features are only used when the repo supports them ## Documentation ### References - [references/routing.md](references/routing.md) - Decision tree for routing tasks to specialized .NET skills, including app model classification and cross-cutting concern handling. - [references/detection.md](references/detection.md) - Project detection patterns for identifying SDK types, target frameworks, workloads, language versions, and app models.
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET. USE FOR: working on ASP.NET Core apps, services, or middleware; changing auth, routing, configuration, hosting, or deployment behavior; deciding between ASP.NET Core sub-stacks. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Build, upgrade, and operate .NET Aspire 13.3.x application hosts with current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing, and Azure deployment patterns for distributed apps. USE FOR: Aspire.AppHost.Sdk, Aspire.Hosting.*, DistributedApplication.CreateBuilder, WithReference, WaitFor, AddProject, AddRedis, AddPostgres, aspire run, aspire init, aspire. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Build, review, or migrate Azure Functions in .NET with correct execution model, isolated worker setup, bindings, DI, and Durable Functions patterns. USE FOR: working on Azure Functions in .NET; migrating from the in-process model to the isolated worker model; adding Durable Functions, bindings, or host configuration. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices. USE FOR: building interactive web UIs with C# instead of JavaScript; choosing between Server, WebAssembly, or Auto render modes; designing component hierarchies and state. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Maintain or migrate EF6-based applications with realistic guidance on what to keep, what to modernize, and when EF Core is or is not the right next step. USE FOR: EF6 codebases; runtime versus ORM migration decisions; EDMX, code-first, ObjectContext, and legacy data-access review. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET applications. USE FOR: DbContext, migrations, model configuration, EF queries, tracking, loading, performance, transactions, and EF6 migration decisions. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Build, review, or migrate .NET MAUI applications across Android, iOS, macOS, and Windows with correct cross-platform UI, platform integration, and native packaging assumptions. USE FOR: working on cross-platform mobile or desktop UI in .NET MAUI; integrating device capabilities, navigation, or platform-specific code; migrating Xamarin.Forms or aligning. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Use ML.NET to train, evaluate, or integrate machine-learning models into .NET applications with realistic data preparation, inference, and deployment expectations. USE FOR: ML.NET integration; local model training or retraining; inference pipelines, model loading, evaluation, and deployment review. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.