template-validation

Solid

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).

Data & Documents 3,357 stars 247 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Template Validation 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`. ## When to Use - User asks to check or validate a template.json file - User reports "my template doesn't show up after installing" - User wants to review a template before packaging and publishing to NuGet - User encounters unexpected behavior from a custom template ## When Not to Use - User wants to find or use existing templates — route to `template-discovery` - User wants to create a project — route to `template-instantiation` - User wants to create a template from an existing project — route to `template-authoring` ## Inputs | Input | Required | Description | |-------|----------|-------------| | template.json path | Yes | Path to the template.json file or the template directory containing `.template.config/template.json` | ## Validation Rules When reviewing a template.json, check ALL of the following categories systematically. Report every finding as an error, warning, or suggestion. ### 1. Required Fields | 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 cu...

Details

Author
dotnet
Repository
dotnet/skills
Created
4 months ago
Last Updated
today
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Solid

template-authoring

Guides creation and validation of custom dotnet new templates. Generates templates from existing projects and validates template.json for authoring issues. USE FOR: creating a reusable dotnet new template from an existing project, validating template.json files for schema compliance and parameter issues, bootstrapping .template.config/template.json with correct identity, shortName, parameters, and post-actions, packaging templates as NuGet packages for distribution. DO NOT USE FOR: finding or using existing templates (use template-discovery and template-instantiation), MSBuild project file issues unrelated to template authoring, NuGet package publishing (only template packaging structure).

3,357 Updated today
dotnet
Data & Documents Solid

template-discovery

Helps find, inspect, and compare .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, comparing templates side by side, inspecting template 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), MSBuild or build issues (use dotnet-msbuild plugin), NuGet package management unrelated to template packages.

3,357 Updated today
dotnet
Data & Documents Solid

template-instantiation

Creates .NET projects from templates with validated parameters, smart defaults, Central Package Management adaptation, and latest NuGet version resolution. USE FOR: creating new dotnet projects, scaffolding solutions with multiple projects, installing or uninstalling template packages, creating projects that respect Directory.Packages.props (CPM), composing multi-project solutions (API + tests + library), getting latest NuGet package versions in newly created projects. DO NOT USE FOR: finding or comparing templates (use template-discovery), authoring custom templates (use template-authoring), modifying existing projects or adding NuGet packages to existing projects.

3,357 Updated today
dotnet