csharp-scripts
Run file-based C# apps with the .NET CLI when the user explicitly wants C#/.NET code without creating a project. Use for C# language/API experiments, one-file…
Helps find, inspect, and compare (at a high level) .NET project templates. Resolves natural-language project descriptions to ranked template matches with pre-filled parameters. USE FOR: finding the right dotnet new template for a task, inspecting a template's parameters and
$ npx -y skills add dotnet/skills --skill template-discovery --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/template-discoveryContext preview
The summary Claude sees to decide when to auto-load this skill.
Helps find, inspect, and compare (at a high level) .NET project templates. Resolves natural-language project descriptions to ranked template matches with pre-filled parameters. USE FOR: finding the right dotnet new template for a task, inspecting a template's parameters and
name: template-discovery description: > Helps find, inspect, and compare (at a high level) .NET project templates. Resolves natural-language project descriptions to ranked template matches with pre-filled parameters. USE FOR: finding the right dotnet new template for a task, inspecting a template's parameters and constraints, understanding what a template produces before creating a project, resolving intent like "web API with auth" to concrete template + parameters. DO NOT USE FOR: actually creating projects (use template-instantiation), authoring custom templates (use template-authoring), producing a detailed side-by-side comparison (use template-comparison), choosing cross-parameter defaults during creation (use template-smart-defaults), MSBuild or build issues (use dotnet-msbuild plugin), NuGet package management unrelated to template packages. license: MIT
This skill helps an agent find, inspect, and select the right `dotnet new` template for a given task using `dotnet new` CLI commands for search, listing, and parameter inspection.
> **Recommendation requests: answer first, confirm second. Inspection requests: inspect > first.** For a general "which template?" question, start from the Step 1 mappings so a > transient CLI failure cannot leave the user without an answer. When the user explicitly > asks what is installed, requests exact options/defaults, or asks for dry-run output, run > the relevant `dotnet new` command before writing the final answer. Never end a turn on a > `dotnet new` call or a "let me confirm..." teaser.
> **Inspection requests require inspection.** If the user asks for installed choices, > exact parameters/defaults, compatibility constraints, or the exact dry-run file list, > run the corresponding `dotnet new` command. Do not replace observed data with remembered > flags. Report a flag only when the current template's `--help` output contains it.
| Input | Required | Description | |-------|----------|-------------| | User intent or keywords | Yes | Natural-language description or keywords (e.g., "web API", "console app", "MAUI") | | Language preference | No | C#, F#, or VB — defaults to C# | | Framework preference | No | Target framework (e.g., net10.0, net9.0) |
> For recommendations, use Step 1 before Steps 2–4. For explicit inspection requests, > execute the requested inspection first and use Step 1 only as a fallback.
Map the user's natural-language description to template short names and parameters using these mappings.
**Intent → template short name(s):**
| Intent / phrase | Template short name(s) | |---|---| | web api, web service, rest api, restful, api, minimal api | `webapi` | | web app, web application | `webapp`, `blazorserver` | | mvc | `mvc` | | razor, razor pages | `webapp` | | blazor, blazor web app | `blazor` | | blazor server | `blazorserver` | | blazor wasm, blazor webassembly | `blazorwasm` | | grpc | `grpc` | | signalr | `webapi`, `webapp` | | console, console app, command line, cli | `console` | | worker, background service, daemon, windows service | `worker` | | class library, library, lib, nuget package | `classlib` | | maui, mobile, cross-platform app, ios, android | `maui` | | desktop | `maui`, `wpf`, `winforms` | | wpf | `wpf` | | winforms, windows forms | `winforms` | | winui, winui3 | `winui3` | | test, unit test | `xunit`, `nunit`, `mstest` | | xunit / nunit / mstest | `xunit` / `nunit` / `mstest` | | solution | `sln` | | aspire, .net aspire | `aspire-starter`, `aspire` | | azure functions, function app, serverless | `func` | | orleans | `orleans` | | razor component, web component | `razorcomponent` | | razor class library | `razorclasslib` | | gitignore / editorconfig / nuget config / global json | `gitignore` / `editorconfig` / `nugetconfig` / `globaljson` |
**Keyword → parameter:**
| Keyword / phrase | Parameter | Value | |---|---|---| | authentication, auth, individual auth, individual accounts | `--auth` | `Individual` | | windows auth | `--auth` | `Windows` | | azure ad, entra id | `--auth` | `SingleOrg` | | no auth, no authentication | `--auth` | `None` | | controllers, with controllers | `--use-controllers` | (flag) | | minimal api | (default) | — | | aot, native aot | `--aot` | (flag) | | docker, container | the template's Docker/container option | varies by template — confirm with `--help` (not all templates expose one) | | net8 / .net 8 / dotnet 8 | `--framework` | `net8.0` | | net9 / .net 9 / dotnet 9 | `--framework` | `net9.0` | | net10 / .net 10 / dotnet 10 | `--framework` | `net10.0` |
These are starting guesses. Always confirm the real parameter names/choices with `dotnet new <template> --help`, because parameter names vary by template (e.g., `--auth` vs `--Authentication`).
Some mapped short names are not present in a default SDK install — templates like `maui`, `winui3`, `aspire-starter`/`aspire`, `func`, and `orleans` typically require a workload (`dotnet workload install <id>`) and/or an additional template package (`dotnet new install <package>`). If a mapped short name does not appear in `dotnet new
This repository contains the .NET team's curated set of core skills and custom agents for coding agents. For information about the Agent Skills standard, see agentskills.io.
Repo: dotnet/skills
Run file-based C# apps with the .NET CLI when the user explicitly wants C#/.NET code without creating a project. Use for C# language/API experiments, one-file…
Correctly call native (C/C++) libraries from .NET using P/Invoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime,…
Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet…
Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64/128/256/512, or platform hardware…
Guides technology selection and implementation of AI and ML features in .NET 8+ applications using ML.NET, Microsoft.Extensions.AI (MEAI), Microsoft Agent…
Configure OpenTelemetry distributed tracing, metrics, and logging in ASP.NET Core using the .NET OpenTelemetry SDK. Use when adding observability, setting up…