Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
managedcode avatar

Template Validation

  • 17 installs
  • 466 repo stars
  • Updated July 25, 2026
  • managedcode/dotnet-skills

Helps with ai & agent building tasks.

About

template-validation is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • template-validation
  • AI & Agent Building
  • AI-coding skill

Template Validation by the numbers

  • 17 all-time installs (skills.sh)
  • +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #10,886 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/managedcode/dotnet-skills --skill template-validation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs17
repo stars466
Last updatedJuly 25, 2026
Repositorymanagedcode/dotnet-skills

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

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

InputRequiredDescription
template.json pathYesPath 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

FieldSeverityRule
identityERRORMust be present and non-empty
nameERRORMust be present and non-empty
shortNameERRORMust be present and non-empty
sourceNameWARNINGWithout it, --name won't customize the generated project name
authorWARNINGImproves template discoverability
descriptionSUGGESTIONHelps users understand what the template creates
classificationsSUGGESTIONImproves search and categorization (e.g., ["Web", "API"])
defaultNameSUGGESTIONProvides a fallback project name when --name is not specified

2. Identity Format

  • ERROR if identity contains spaces — use dots or dashes (e.g., MyCompany.WebApi.CSharp)
  • WARNING if identity has no namespace separator (. or -) — use reverse-DNS format

3. ShortName Conflicts

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.

  • ERROR if shortName matches any subcommand reported by dotnet new --help (case-insensitive)
  • WARNING if shortName is only 1 character — too short for discoverability
  • Note: shortName can be a string or an array of strings; check all values

4. Symbol Validation

For each symbol in the symbols object:

  • ERROR if a symbol is missing the type field
  • For type: "parameter":
  • WARNING if no datatype specified (defaults to string)
  • SUGGESTION if no description (improves --help output)
  • If datatype: "choice":
  • ERROR if no choices defined
  • ERROR if choices is empty
  • ERROR if defaultValue is not in the choices list
  • WARNING if optional (not isRequired) and no defaultValue — users get unexpected behavior
  • If datatype: "bool":
  • ERROR if defaultValue is not a valid boolean
  • If datatype: "int":
  • ERROR if defaultValue is not a valid integer
  • Valid datatypes: string, bool, choice, int, float, hex, text
  • ERROR if datatype is not in the valid list
  • For type: "computed":
  • ERROR if missing value expression
  • For type: "generated":
  • ERROR if missing generator field
  • Valid generators: casing, coalesce, constant, port, guid, now, random, regex, regexMatch, switch, join

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

5. Sources Validation

For source modifier conditions:

  • WARNING if a condition string doesn't contain parentheses around symbol names — expected format is (symbolName), not bare symbolName

6. Post-Action Validation

For each post-action:

  • ERROR if missing actionId
  • WARNING if missing description — this text is shown to users when the action requires manual steps
  • SUGGESTION if missing manualInstructions — these are shown when the action can't run automatically (e.g., in an IDE)

7. Constraint Validation

For each constraint:

  • ERROR if missing type field
  • WARNING if missing args — most constraint types require arguments

8. Tags Validation

  • SUGGESTION if no language tag — adding tags.language (e.g., "C#") improves filtering in dotnet new list --language
  • SUGGESTION if no type tag — adding tags.type (e.g., "project" or "item") improves categorization

Workflow

Step 1: Locate the template.json

The file can be at:

  • Direct path: path/to/template.json
  • In a template directory: path/to/.template.config/template.json
  • In a .template.config directory: path/.template.config/template.json

Step 2: Parse and validate

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

Step 3: Report results

Present findings organized by severity: 1. Errors (must fix) — template will not work correctly 2. Warnings (should fix) — template may cause confusion or limited functionality 3. Suggestions (nice to have) — improvements for discoverability and user experience

Include the total: "X error(s), Y warning(s), Z suggestion(s)"

Common Pitfalls

PitfallImpact
ShortName = "list" or "search"Template can never be created — conflicts with a dotnet new subcommand
Missing sourceName--name MyProject doesn't rename anything in the generated files
Choice parameter without defaultValueConfusing user experience on optional choice params
Invalid datatype valueTemplate engine ignores the symbol, causing silent failures
Computed symbol without valueTemplate engine throws at instantiation time
Parameter prefix collision (Auth vs AuthMode)Ambiguous expression evaluation
Source condition without parenthesesCondition may not evaluate correctly

More Info

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.