Loading...
Loading...
Validates custom dotnet new templates for correctness before publishing. Catches missing fields, parameter bugs, shortName conflicts, constraint issues, and common authoring mistakes that cause templates to fail silently. USE FOR: checking template.json files for errors before publishing or testing, diagnosing why a template doesn't appear after installation, reviewing template parameter definitions for type mismatches and missing defaults, finding shortName conflicts with dotnet CLI commands, validating post-action and constraint configuration. DO NOT USE FOR: finding or using existing templates (use template-discovery), creating projects from templates (use template-instantiation), creating templates from existing projects (use template-authoring).
npx skill4agent add dotnet/skills template-validationdotnet newdotnet new listtemplate-discoverytemplate-instantiationtemplate-authoring| Input | Required | Description |
|---|---|---|
| template.json path | Yes | Path to the template.json file or the template directory containing |
| Field | Severity | Rule |
|---|---|---|
| ERROR | Must be present and non-empty |
| ERROR | Must be present and non-empty |
| ERROR | Must be present and non-empty |
| WARNING | Without it, |
| WARNING | Improves template discoverability |
| SUGGESTION | Helps users understand what the template creates |
| SUGGESTION | Improves search and categorization (e.g., |
| SUGGESTION | Provides a fallback project name when |
MyCompany.WebApi.CSharp.-newbuildruntestpublishrestorecleanpackaddremovelistnugettoolslnhelpsymbolstypetype: "parameter"datatypestringdescription--helpdatatype: "choice"choiceschoicesdefaultValueisRequireddefaultValuedatatype: "bool"defaultValuedatatype: "int"defaultValuestringboolchoiceintfloathextexttype: "computed"valuetype: "generated"generatorcasingcoalesceconstantportguidnowrandomregexregexMatchswitchjoinAuthAuthMode(symbolName)symbolNameactionIddescriptionmanualInstructionstypeargslanguagetags.language"C#"dotnet new list --languagetypetags.type"project""item"path/to/template.jsonpath/to/.template.config/template.json.template.configpath/.template.config/template.json| Pitfall | Impact |
|---|---|
| ShortName = "test" or "build" | Template can never be created — conflicts with CLI |
Missing | |
Choice parameter without | Confusing user experience on optional choice params |
Invalid | Template engine ignores the symbol, causing silent failures |
Computed symbol without | Template engine throws at instantiation time |
Parameter prefix collision ( | Ambiguous expression evaluation |
| Source condition without parentheses | Condition may not evaluate correctly |