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 is troubleshooting build issues — route to
dotnet-msbuild plugin
Inputs
| 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) |
Workflow
Step 1: Resolve intent to template candidates
Map the user's natural-language description to template short names using these common keyword mappings:
| User Intent |
Template |
Suggested Parameters |
| web API, REST API |
webapi |
--auth Individual --use-controllers if auth requested |
| web app, website |
webapp |
|
| Blazor, interactive web |
blazor |
|
| console app, CLI tool |
console |
|
| class library, shared code |
classlib |
|
| worker service, background job |
worker |
|
| gRPC service |
grpc |
|
| MAUI app, mobile app |
maui |
|
| test project, unit tests |
xunit, mstest, or nunit |
|
Step 2: Search for templates
Use dotnet new search to find templates by keyword across both locally installed templates and NuGet.org:
dotnet new search blazor
Use dotnet new list to show only installed templates, with optional filters:
dotnet new list --language C# --type project
dotnet new list web
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:
dotnet new webapi --help
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:
dotnet new webapi --name MyApi --auth Individual --dry-run
Step 5: Present findings
Summarize the best template match with:
- Template name and short description
- Key parameters and recommended values
- What the user should expect (files created, project structure)
- Any constraints or prerequisites
Validation
Common Pitfalls
| Pitfall |
Solution |
| Not searching NuGet for templates |
If dotnet new list shows no matches, use dotnet new search <keyword> to find installable templates on NuGet.org. |
| Not checking template constraints |
Some templates require specific SDKs or workloads. Use dotnet new <template> --help to surface constraints before recommending. |
| Recommending a template without previewing output |
Always use dotnet new <template> --dry-run to confirm the template produces what the user expects. |
More Info
1---
2name: template-discovery
3description: >
4 Helps find, inspect, and compare .NET project templates.
5 Resolves natural-language project descriptions to ranked template matches
6 with pre-filled parameters.
7 USE FOR: finding the right dotnet new template for a task, comparing templates side by
8 side, inspecting template parameters and constraints, understanding what a template
9 produces before creating a project, resolving intent like "web API with auth" to
10 concrete template + parameters.
11 DO NOT USE FOR: actually creating projects (use template-instantiation), authoring
12 custom templates (use template-authoring), MSBuild or build issues (use dotnet-msbuild
13 plugin), NuGet package management unrelated to template packages.
14license: MIT
15metadata:
16 source: https://skillmd.com/skills/aibot88/template-discovery
17---
18
19# Template Discovery
20
21This 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.
22
23## When to Use
24
25- User asks "What templates are available for X?"
26- User describes a project in natural language ("I need a web API with authentication")
27- User wants to compare templates or understand parameters before creating a project
28- User needs to know what a template produces (files, structure) before committing
29
30## When Not to Use
31
32- User wants to create a project — route to `template-instantiation` skill
33- User wants to author or validate a custom template — route to `template-authoring` skill
34- User is troubleshooting build issues — route to `dotnet-msbuild` plugin
35
36## Inputs
37
38| Input | Required | Description |
39|-------|----------|-------------|
40| User intent or keywords | Yes | Natural-language description or keywords (e.g., "web API", "console app", "MAUI") |
41| Language preference | No | C#, F#, or VB — defaults to C# |
42| Framework preference | No | Target framework (e.g., net10.0, net9.0) |
43
44## Workflow
45
46### Step 1: Resolve intent to template candidates
47
48Map the user's natural-language description to template short names using these common keyword mappings:
49
50| User Intent | Template | Suggested Parameters |
51|-------------|----------|---------------------|
52| web API, REST API | `webapi` | `--auth Individual --use-controllers` if auth requested |
53| web app, website | `webapp` | |
54| Blazor, interactive web | `blazor` | |
55| console app, CLI tool | `console` | |
56| class library, shared code | `classlib` | |
57| worker service, background job | `worker` | |
58| gRPC service | `grpc` | |
59| MAUI app, mobile app | `maui` | |
60| test project, unit tests | `xunit`, `mstest`, or `nunit` | |
61
62### Step 2: Search for templates
63
64Use `dotnet new search` to find templates by keyword across both locally installed templates and NuGet.org:
65
66```bash
67dotnet new search blazor
68```
69
70Use `dotnet new list` to show only installed templates, with optional filters:
71
72```bash
73dotnet new list --language C# --type project
74dotnet new list web
75```
76
77### Step 3: Inspect template details
78
79Use `dotnet new <template> --help` to get full parameter details for a specific template — parameter names, types, defaults, and allowed values:
80
81```bash
82dotnet new webapi --help
83```
84
85### Step 4: Preview output
86
87Use `dotnet new <template> --dry-run` to show what files and directories a template would create without writing anything to disk:
88
89```bash
90dotnet new webapi --name MyApi --auth Individual --dry-run
91```
92
93### Step 5: Present findings
94
95Summarize the best template match with:
96- Template name and short description
97- Key parameters and recommended values
98- What the user should expect (files created, project structure)
99- Any constraints or prerequisites
100
101## Validation
102
103- [ ] At least one template match was found for the user's intent
104- [ ] Template parameters are explained with types and defaults
105- [ ] User understands what the template produces before proceeding to creation
106
107## Common Pitfalls
108
109| Pitfall | Solution |
110|---------|----------|
111| Not searching NuGet for templates | If `dotnet new list` shows no matches, use `dotnet new search <keyword>` to find installable templates on NuGet.org. |
112| Not checking template constraints | Some templates require specific SDKs or workloads. Use `dotnet new <template> --help` to surface constraints before recommending. |
113| Recommending a template without previewing output | Always use `dotnet new <template> --dry-run` to confirm the template produces what the user expects. |
114
115## More Info
116
117- [dotnet new templates](https://learn.microsoft.com/dotnet/core/tools/dotnet-new-sdk-templates) — built-in template reference
118- [Template Engine Wiki](https://github.com/dotnet/templating/wiki) — template engine internals