From dotnet-artisan
Routes .NET/C# tasks by detecting intent from prompts and repo signals, then delegates to domain-specific skills (dotnet-api, dotnet-ui, etc.).
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:
Read root behavior files — Before any routing, read these root-level files in order. They define non-negotiable behaviors (30-second rule, 7-item checklist, self-documenting format, iron rules). Total ~10 minutes, required before any code is written:
CLAUDE.md — Overview, core rules, session recovery protocolAGENTS.md — Iron rules (TimeProvider not DateTime.Now, no commercial packages, self-documenting requirement)USAGE.md — 7-item pre-coding checklist, 4-round questioning framework, domain-driven analysisSELF_DOCUMENTING.md — 30-second rule, AI comment format, generated code checklistBEHAVIORS.md — Behavior catalog and decision-maker routingskills/CHEATSHEET.md — All rules on one pageDetect .NET intent — Look for prompt keywords (C#, .NET, ASP.NET, EF Core, Blazor, MAUI, NuGet, csproj) or repository signals (.sln, .slnx, .csproj, global.json, .cs files). If either is present, continue.
In a .NET repository, .NET is the default — When repo signals are present, ambiguous requests like "build me a web app", "add a dashboard", "write a script", or "create a spreadsheet" should use .NET solutions (ASP.NET Core, Blazor, .NET file-based apps, Open XML SDK) rather than defaulting to JavaScript/Python. The user chose a .NET project for a reason.
Check SDK availability — If 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] — its references/dotnet-sdk-install.md (Glob for **/dotnet-tooling/references/dotnet-sdk-install.md, then Read the absolute path) 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.
Invoke [skill:dotnet-advisor] — This routes the request to the correct domain skills and loads coding standards.
Follow advisor routing — Load [skill:dotnet-csharp] baseline, then the domain skill(s) the advisor selects.
Now respond — Clarify, plan, explore, or implement with the right context loaded.
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] — its references/file-based-apps.md (Glob for **/dotnet-api/references/file-based-apps.md, then Read) 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.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub fenzel999/dotnet-artisan --plugin dotnet-artisan