Validates dotnet new template.json files for missing fields, shortName conflicts, parameter bugs, constraints, and authoring errors before publishing or diagnosing installation issues.
npx claudepluginhub dotnet/skills --plugin dotnet-template-engineThis skill uses the workspace's default tool permissions.
This skill helps validate custom `dotnet new` templates for correctness before publishing. It encodes the validation rules that catch common authoring mistakes — issues that cause templates to silently fail, produce broken projects, or not appear in `dotnet new list`.
Enforces C++ Core Guidelines for writing, reviewing, and refactoring modern C++ code (C++17+), promoting RAII, immutability, type safety, and idiomatic practices.
Provides patterns for shared UI in Compose Multiplatform across Android, iOS, Desktop, and Web: state management with ViewModels/StateFlow, navigation, theming, and performance.
Implements Playwright E2E testing patterns: Page Object Model, test organization, configuration, reporters, artifacts, and CI/CD integration for stable suites.
This skill helps validate custom dotnet new templates for correctness before publishing. It encodes the validation rules that catch common authoring mistakes — issues that cause templates to silently fail, produce broken projects, or not appear in dotnet new list.
template-discoverytemplate-instantiationtemplate-authoring| Input | Required | Description |
|---|---|---|
| template.json path | Yes | Path to the template.json file or the template directory containing .template.config/template.json |
When reviewing a template.json, check ALL of the following categories systematically. Report every finding as an error, warning, or suggestion.
| Field | Severity | Rule |
|---|---|---|
identity | ERROR | Must be present and non-empty |
name | ERROR | Must be present and non-empty |
shortName | ERROR | Must be present and non-empty |
sourceName | WARNING | Without it, --name won't customize the generated project name |
author | WARNING | Improves template discoverability |
description | SUGGESTION | Helps users understand what the template creates |
classifications | SUGGESTION | Improves search and categorization (e.g., ["Web", "API"]) |
defaultName | SUGGESTION | Provides a fallback project name when --name is not specified |
MyCompany.WebApi.CSharp). or -) — use reverse-DNS formatThe following short names conflict with dotnet CLI commands and will cause problems:
new, build, run, test, publish, restore, clean, pack, add, remove, list, nuget, tool, sln, help
For each symbol in the symbols object:
type fieldtype: "parameter":
datatype specified (defaults to string)description (improves --help output)datatype: "choice":
choices definedchoices is emptydefaultValue is not in the choices listisRequired) and no defaultValue — users get unexpected behaviordatatype: "bool":
defaultValue is not a valid booleandatatype: "int":
defaultValue is not a valid integerstring, bool, choice, int, float, hex, texttype: "computed":
value expressiontype: "generated":
generator fieldcasing, coalesce, constant, port, guid, now, random, regex, regexMatch, switch, joinParameter prefix collisions: WARNING if any parameter name is a prefix of another parameter name (e.g., Auth and AuthMode) — this creates ambiguous parsing in expression contexts.
For source modifier conditions:
(symbolName), not bare symbolNameFor each post-action:
actionIddescription — this text is shown to users when the action requires manual stepsmanualInstructions — these are shown when the action can't run automatically (e.g., in an IDE)For each constraint:
type fieldargs — most constraint types require argumentslanguage tag — adding tags.language (e.g., "C#") improves filtering in dotnet new list --languagetype tag — adding tags.type (e.g., "project" or "item") improves categorizationThe file can be at:
path/to/template.jsonpath/to/.template.config/template.json.template.config directory: path/.template.config/template.jsonRead the JSON. If it's malformed, report the JSON parse error with line number.
Run all 8 validation categories above. Collect errors, warnings, and suggestions separately.
Present findings organized by severity:
Include the total: "X error(s), Y warning(s), Z suggestion(s)"
| Pitfall | Impact |
|---|---|
| ShortName = "test" or "build" | Template can never be created — conflicts with CLI |
Missing sourceName | --name MyProject doesn't rename anything in the generated files |
Choice parameter without defaultValue | Confusing user experience on optional choice params |
Invalid datatype value | Template engine ignores the symbol, causing silent failures |
Computed symbol without value | Template engine throws at instantiation time |
Parameter prefix collision (Auth vs AuthMode) | Ambiguous expression evaluation |
| Source condition without parentheses | Condition may not evaluate correctly |