From dotnet-artisan
Detects .NET intent from prompts and repo signals (.sln, .csproj, global.json), loads version-specific standards, and routes to domain-specific .NET skills via dotnet-advisor.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dotnet-artisan:using-dotnetThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Establishing .NET/C# routing discipline before clarifying questions, planning, command execution, or edits.
.sln, .slnx, .csproj, global.json, .cs).Write the simplest code that solves the problem. Agents consistently over-engineer — more abstractions, more layers, more indirection than the task warrants.
if/else over a chain of ternaries. A foreach over a hard-to-read LINQ expression. A flat method over nested callbacks. Clear beats compact. This does NOT mean avoiding modern C# — use latest language features ([..4], list patterns, primary constructors, raw string literals, collection expressions). Modern syntax is concise AND readable. The target is convoluted logic, not concise syntax.IOrderService for one OrderService. Don't extract a helper for something that happens once. Three similar lines of code are fine — extract only when a real pattern emerges across 3+ call sites.DbContext is your Unit of Work. DbSet<T> is your repository. .NET has TimeProvider, ILogger<T>, IHttpClientFactory, System.Text.Json. Use them directly — don't wrap, don't abstract, don't add a NuGet package for something the framework already does.The right amount of complexity is the minimum needed to solve the current problem correctly.
.NET skills contain version-specific guidance (net8.0 vs net9.0 vs net10.0), coding standards, and framework-specific patterns that the model doesn't have in its training data. Skipping routing means the model confidently produces code using deprecated APIs, misses framework-specific patterns, or gives generic advice that ignores project context.
Routing before action ensures:
The cost of routing is a few skill invocations. The cost of skipping is rework, stale advice, or subtle bugs.
When a request likely involves .NET or C#, follow this sequence before any other action:
.sln, .slnx, .csproj, global.json, .cs files). If either is present, continue.dotnet --version fails and no DOTNET_ROOT is set, install the SDK before proceeding. This takes under a minute with no privileges required. See [skill:dotnet-tooling] references/dotnet-sdk-install.md for the full install script reference, or use this one-liner: curl -sSL https://dot.net/v1/dotnet-install.sh | bash && export DOTNET_ROOT="$HOME/.dotnet" && export PATH="$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools". Do not treat a missing SDK as a blocker — install it and continue.For quick scripts, utilities, prototypes, and single-file tools, prefer .NET 10 file-based apps (dotnet run script.cs) over creating a full project with .csproj. File-based apps:
.cs file — no project file, no solution, no boilerplate#:package directives#:sdk Microsoft.NET.Sdk.Web#!/usr/bin/env dotnet)When the user asks to "write a script", "make a quick tool", "create a utility", or any small single-purpose program, default to a file-based app unless the task clearly needs multiple source files or test projects. See [skill:dotnet-api] references/file-based-apps.md for the full directive and CLI reference.
// Example: a file-based ASP.NET Core API
#:sdk Microsoft.NET.Sdk.Web
var app = WebApplication.Create(args);
app.MapGet("/", () => "Hello from a single .cs file!");
app.Run();
// Example: a file-based CLI tool with a NuGet package
#:package Spectre.Console
using Spectre.Console;
AnsiConsole.MarkupLine("[green]Hello[/] from a file-based app!");
Routing applies even for "simple" questions and clarification requests. The skill loading is lightweight and ensures consistent quality.
When multiple skills could apply, use this order:
Rigid (must follow exactly): this skill, [skill:dotnet-advisor], and baseline-first ordering.
Flexible (adapt to context): Domain skills and their companion references.
User instructions define WHAT to do. This process defines HOW to route and load skills before execution.
npx claudepluginhub p/novotnyllc-dotnet-artisan-plugins-dotnet-artisanRoutes .NET/C# requests to the correct domain skill (API, UI, testing, devops, tooling, debugging) and loads coding standards as baseline.
Working with .NET, C#, ASP.NET Core, or related frameworks. Routes to specialist skills.
Provides .NET ecosystem guidance: C#/F# language features, project structure, NuGet package selection, and architecture decisions across ASP.NET Core, Blazor, EF Core, and cloud/desktop/mobile targets.