aspnet-core
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on…
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
$ npx -y skills add managedcode/dotnet-skills --skill template-validation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/template-validationContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: template-validation description: > 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). license: MIT
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`.
| 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.
> **Parse gate — stop on syntax errors.** Parse JSON before applying any semantic rule. If > parsing fails, report the parser's line and column, show only the smallest concrete syntax > correction, and stop. Do not invent required-field, symbol, post-action, or discoverability > findings from a document that did not parse. Re-parse after the correction before making any > semantic claim. > > The malformed-JSON final response has exactly two parts: the one-line parse verdict and a > corrected snippet showing the exact edit. Do not append semantic recommendations, optional > metadata, or a full replacement manifest.
| 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 |
A shortName that matches a `dotnet new` subcommand conflicts, because `dotnet new <name>` is then parsed as that subcommand instead of instantiating the template. Read the reserved set for the installed SDK from the `Commands:` section of `dotnet new --help` — that is the authoritative source and avoids this rule going stale.
As of current SDKs the subcommands include (illustrative only — version-dependent, do not hardcode this list; the live `dotnet new --help` output is canonical): `install`, `uninstall`, `update`, `list`, `search`, `details`, `create`. Note that top-level `dotnet` verbs like `build`, `run`, `test`, and `publish` do NOT conflict — `dotnet new test` does not collide with `dotnet test`.
For each symbol in the `symbols` object:
Custom parameter help is template-specific: it appears under `dotnet new <shortName> --help`, not the global `dotnet new --help`. Correct that premise when necessary, then explain which invalid symbol definitions prevent the parameters from appearing reliably.
A valid choice parameter uses a non-empty choices object, for example:
"Color": {
"type": "parameter",
"datatype": "choice",Stop explaining .NET to your AI. Start building. We've all been there: asking Claude to use Entity Framework, only to get EF6 patterns in a .NET 8 project. Explaining to Copilot that Blazor Server and Blazor WebAssembly aren't the same thing.
Repo: managedcode/dotnet-skills
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on…
Build, upgrade, and operate Aspire 13.5.x C# or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing,…
Build, review, or migrate Azure Functions in .NET with correct execution model, isolated worker setup, bindings, DI, and Durable Functions patterns. USE FOR:…
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and…
Maintain or migrate EF6-based applications with realistic guidance on what to keep, what to modernize, and when EF Core is or is not the right next step. USE…
Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET…