Official agent skill

Template Discovery

by dotnet in dotnet/skills

Helps find, inspect, and compare (at a high level) .NET project templates.

OfficialMITAuto-check passedDevelopment

Install Template Discovery

skills CLI
$ npx skills add dotnet/skills --skill template-discovery -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dotnet/skills template-discovery --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dotnet-template-engine/skills/template-discovery .claude/skills/template-discovery && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
template-discovery
GitHub stars
5.6k
Used in
1 other repo
Token cost
~3.1k tokens
SKILL.md length
1,480 words
Files
1
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Helps find, inspect, and compare (at a high level) .NET project templates.

  • Works in 5 steps: Resolve intent to template candidates → Search for templates → Inspect template details → …
  • : finding the right dotnet new template for a task
  • SKILL.md covers When to Use, When Not to Use, Inputs and Workflow, plus 3 more sections
  • Calls dotnet

What it does

Template Discovery is an agent skill from dotnet/skills, published by the product's own GitHub organization. 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…

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Project scaffolding. It works with .NET and C#. The repository describes itself as: Repository for skills to assist AI coding agents with .NET and C. The licence is MIT.

When your agent uses it

  • : finding the right dotnet new template for a task
  • Inspecting a templates parameters and constraints
  • Understanding what a template produces before creating a project
  • Resolving intent like web API with auth to concrete template + parameters

Example prompts

  • “web API with auth”
  • “Use the template-discovery skill to help find, inspect, and compare (at a high level) .NET project templates”
  • “/template-discovery”

Requirements

  • Docker

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Resolve intent to template candidates
  2. Search for templates
  3. Inspect template details
  4. Preview output
  5. Present findings

What it can do on your machine

Read from SKILL.md and the folder at commit 8d670fa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Template Discovery loads about 3.1k tokens when it runs. Until then it costs about 210 tokens; SKILL.md has 1,480 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~210
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dotnet/skills at commit 8d670fa, republished under its MIT licence (© dotnet). 1,480 words, ~3,055 tokens.

Download SKILL.mdSave it as .claude/skills/template-discovery/SKILL.md (or your agent's skills folder).
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

Template Discovery

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.

When to Use

  • User asks "What templates are available for X?"
  • User describes a project in natural language ("I need a web API with authentication")
  • User wants to compare templates or understand parameters before creating a project
  • User needs to know what a template produces (files, structure) before committing

When Not to Use

  • User wants to create a project — route to template-instantiation skill
  • User wants to author or validate a custom template — route to template-authoring skill
  • User wants a detailed side-by-side comparison of templates — route to template-comparison skill
  • User wants smart cross-parameter defaults during creation — route to template-smart-defaults skill
  • User is troubleshooting build issues — route to dotnet-msbuild plugin

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.

Inputs

InputRequiredDescription
User intent or keywordsYesNatural-language description or keywords (e.g., "web API", "console app", "MAUI")
Language preferenceNoC#, F#, or VB — defaults to C#
Framework preferenceNoTarget framework (e.g., net10.0, net9.0)

Workflow

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.

Step 1: Resolve intent to template candidates

Map the user's natural-language description to template short names and parameters using these mappings.

Intent → template short name(s):

Intent / phraseTemplate short name(s)
web api, web service, rest api, restful, api, minimal apiwebapi
web app, web applicationwebapp, blazorserver
mvcmvc
razor, razor pageswebapp
blazor, blazor web appblazor
blazor serverblazorserver
blazor wasm, blazor webassemblyblazorwasm
grpcgrpc
signalrwebapi, webapp
console, console app, command line, cliconsole
worker, background service, daemon, windows serviceworker
class library, library, lib, nuget packageclasslib
maui, mobile, cross-platform app, ios, androidmaui
desktopmaui, wpf, winforms
wpfwpf
winforms, windows formswinforms
winui, winui3winui3
test, unit testxunit, nunit, mstest
xunit / nunit / mstestxunit / nunit / mstest
solutionsln
aspire, .net aspireaspire-starter, aspire
azure functions, function app, serverlessfunc
orleansorleans
razor component, web componentrazorcomponent
razor class libraryrazorclasslib
gitignore / editorconfig / nuget config / global jsongitignore / editorconfig / nugetconfig / globaljson

Keyword → parameter:

Keyword / phraseParameterValue
authentication, auth, individual auth, individual accounts--authIndividual
windows auth--authWindows
azure ad, entra id--authSingleOrg
no auth, no authentication--authNone
controllers, with controllers--use-controllers(flag)
minimal api(default)—
aot, native aot--aot(flag)
docker, containerthe template's Docker/container optionvaries by template — confirm with --help (not all templates expose one)
net8 / .net 8 / dotnet 8--frameworknet8.0
net9 / .net 9 / dotnet 9--frameworknet9.0
net10 / .net 10 / dotnet 10--frameworknet10.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 list, fall back to dotnet new list/dotnet new search to find the right template and the package/workload that provides it before recommending it.

Resilience — always answer, even if the CLI fails. The intent mapping above is a usable answer on its own. Run dotnet new commands sequentially, one at a time — the template engine uses a global mutex, so firing several dotnet new <template> --help/--dry-run calls concurrently can produce a transient "mutex"/"persistence" error and empty output. If a command fails, retry it once; if it still fails, fall back to this intent/parameter mapping and give the user a concrete recommendation, noting that the exact parameter names/choices could not be CLI-confirmed. Never end the turn with no answer because a CLI call errored.

Step 2: Search for templates

Use dotnet new search to find templates by keyword across both locally installed templates and NuGet.org:

bash
dotnet new search blazor

Use dotnet new list to show only installed templates, with optional filters:

bash
dotnet new list --language C# --type project
dotnet new list web

If the user explicitly asks you to check both installed templates and NuGet.org, run and report both searches even when the SDK already includes a suitable template. Distinguish the built-in choice from installable alternatives:

  • For an SDK-shipped template, say "no install needed — ships with the SDK" and do not invent a package requirement.
  • For each relevant NuGet result you recommend, copy the package ID from the actual search output and give dotnet new install <package-id>.
  • If the NuGet search returns no credible alternative, say so explicitly; the local match still answers the request.
Show full SKILL.md (595 more words)Show less
Step 3: Inspect template details

Use dotnet new <template> --help to get full parameter details for a specific template — parameter names, types, defaults, and allowed values:

bash
dotnet new webapi --help

Copy the observed option names, choices, defaults, and compatibility notes into the answer. For example, Windows Service support is not universally a worker-template flag. If the installed worker --help does not expose one, say so and distinguish template creation from post-creation hosting configuration; never invent --windows or --use-windows-service.

Step 4: Preview output

Use dotnet new <template> --dry-run to show what files and directories a template would create without writing anything to disk:

bash
dotnet new webapi --name MyApi --auth Individual --dry-run

If the dry-run fails (transient "mutex"/"persistence" error), retry once; if it still fails, give a representative structure (template family and typical file kinds) and note it isn't CLI-confirmed. Do not invent specific values, choices, or file paths. When the dry-run succeeds, preserve every actual path from its output. For a long list, render those paths as a directory tree rather than a flat wall of full paths; do not omit or invent entries. Follow the tree with a one-line purpose for each key entry point (for example Program.cs, App.razor, and the project file). A file list without those explanations is incomplete.

If command execution is unavailable, do not stop at "run this yourself." Give the representative tree and key-file explanations from the known template family, clearly labeled as unconfirmed, so the user still receives a useful preview.

If the user says not to create files, every copy-pasteable creation command must include --dry-run. A plain dotnet new ... command contradicts that request even when you did not execute it yourself.

Step 5: Present findings

Lead with the answer as a ready-to-run command, then justify it. Required shape:

Use <template> — one-line why.

bash
dotnet new <template> --name <Name> [--key params]

Then add supporting detail:

  • Key parameters and recommended values (with the choices, e.g. --auth: None | Individual | SingleOrg | Windows)
  • What to expect (files created, project structure)
  • Any prerequisites — name the exact package to install (dotnet new install <id>), or say "no install needed — ships with the SDK" for a built-in template

An answer without a concrete, copy-pasteable command is what makes this skill tie with a plain reply — always give the command to run next.

Validation

  • At least one template match was found for the user's intent
  • Template parameters are explained with types and defaults
  • User understands what the template produces before proceeding to creation
  • Exact-option claims came from this template's observed --help output
  • Advice-only commands that must not create files include --dry-run

Common Pitfalls

PitfallSolution
Skipping an explicitly requested NuGet search because a local template existsRun both dotnet new list <keyword> and dotnet new search <keyword>, then distinguish the built-in template from real installable alternatives.
Not searching NuGet when no local template matchesUse dotnet new search <keyword> to find installable templates on NuGet.org.
Not checking template constraintsSome templates require specific SDKs or workloads. Use dotnet new <template> --help to surface constraints before recommending.
Recommending a template without previewing outputAlways use dotnet new <template> --dry-run to confirm the template produces what the user expects.
A dotnet new call fails with a "mutex"/"persistence" error and you return nothingThese are transient (often from concurrent invocations). Run dotnet new calls sequentially, retry once, then fall back to the Step 1 intent mapping and still give the user a concrete answer.
Guessing a Windows Service or AOT flag from another SDK/templateQuote only options observed in dotnet new <template> --help; otherwise explain the post-creation path.

More Info

© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/dotnet-template-engine/skills/template-discovery of dotnet/skills.

Open the folder on GitHubat commit 8d670fa

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dotnet/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Template Discovery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Template Discovery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Template Discovery this skilldotnet/skills5.6k1 repos~3.1kAutomated safety check: PassMIT
Corvus Typescript Evaluatorcorvus-dotnet/Corvus.JsonSchema199—~1.3kAutomated safety check: PassApache-2.0
Scaffoldingdotnet/efcore15k—~165Automated safety check: PassMIT
Speckit ConstitutionWeihanLi/WeihanLi.Common24211 repos~2.1kAutomated safety check: PassApache-2.0
Add Analyzerdotnet/roslynator3.5k—~1.3kAutomated safety check: PassCustom licence
GitVersion .NET DevelopmentGitTools/GitVersion3.1k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Corvus Typescript Evaluator

    corvus-dotnet/Corvus.JsonSchema

    Work on the TypeScript port of the V5 standalone schema evaluator (src-ts/corvus-json-schema, npm package @corvus-dotnet/json-schema): loader, compiler, JavaScript code generator, results collector…

    199 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Scaffolding

    dotnet/efcore

    Official

    Implementation details for EF Core scaffolding (reverse engineering).

    15k GitHub stars~165 tokensUpdated today
    SecurityAuto-check passed
  • Speckit Constitution

    WeihanLi/WeihanLi.Common

    Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

    242 GitHub starsUsed in 11 repos~2.1k tokens
    DevelopmentAuto-check passed
  • Add Analyzer

    dotnet/roslynator

    Official

    A skill your agent uses when adding a new RCS diagnostic in roslynator (RCS0 formatting, RCS1 general, RCS9 code-analysis), wiring roslynator EditorConfig options, or when docs say CHANGELOG.md…

    3.5k GitHub stars~1.3k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • GitVersion .NET Development

    GitTools/GitVersion

    Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

    3.1k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Review

    dotnet/macios

    Official

    Review dotnet/macios PRs against established rules. An agent skill from dotnet/macios.

    2.9k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed

More from dotnet/skills

All 91 skills in this repo
  • Official

    Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Official

    Resolves native crash frames from .NET Android tombstones to function names, source files and line numbers using BuildIds, Microsoft's symbol server and llvm-symbolizer.

    5.6k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    Auto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Microbenchmarking

    dotnet/skills

    Official

    Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks.

    5.6k GitHub starsUsed in 3 repos~3.3k tokens
    Auto-check passed
  • Official

    Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.

    5.6k GitHub starsUsed in 2 repos~4.2k tokens
    Auto-check passed

Works with

Categories

Questions about Template Discovery

What does Template Discovery do?

Helps find, inspect, and compare (at a high level) .NET project templates. Template Discovery is an agent skill from dotnet/skills, published by the product's own GitHub organization.NET project templates.

When should I use Template Discovery?

Template Discovery fits situations like: : finding the right dotnet new template for a task; inspecting a templates parameters and constraints; understanding what a template produces before creating a project; resolving intent like web API with auth to concrete template + parameters.

How do I install Template Discovery in Claude Code?

Run `npx skills add dotnet/skills --skill template-discovery -a claude-code`. Or copy the skill folder (plugins/dotnet-template-engine/skills/template-discovery in dotnet/skills) into .claude/skills/template-discovery in your project. Claude Code loads it when a task matches its description.

How do I install Template Discovery in Codex?

Run `npx skills add dotnet/skills --skill template-discovery -a codex`. Or copy the skill folder (plugins/dotnet-template-engine/skills/template-discovery in dotnet/skills) into .agents/skills/template-discovery in your project. Codex loads it when a task matches its description.

Can I use Template Discovery in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/skills --skill template-discovery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/template-discovery, .gemini/skills/template-discovery, .github/skills/template-discovery and .opencode/skills/template-discovery in your project.

What does Template Discovery need to run?

Going by SKILL.md and its folder, Template Discovery needs the command-line tools its instructions call (dotnet). Our summary lists: Docker.

Does Template Discovery access the network?

SKILL.md names 2 domains. As links in the text: learn.microsoft.com and github.com. This is read from the text; nothing was executed.

Is Template Discovery safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Template Discovery use?

Template Discovery is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Template Discovery use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Template Discovery?

Skills that share tags, products or a category with Template Discovery: Corvus Typescript Evaluator (corvus-dotnet/Corvus.JsonSchema, 199 stars), Scaffolding (dotnet/efcore, 15k stars), Speckit Constitution (WeihanLi/WeihanLi.Common, 242 stars) and Add Analyzer (dotnet/roslynator, 3.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Template Discovery?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,568 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 7, 2026.

Source: dotnet/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.