template-authoring

Creates and validates custom dotnet new templates from existing .NET projects.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill template-authoring-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: template-authoring
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/template-authoring
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill template-authoring-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing a reusable dotnet new template by hand is error-prone: template.json has strict schema requirements, shortName values can collide with built-in CLI commands, and untested parameter combinations silently produce broken projects. This Skill guides the full authoring workflow from an existing .csproj through validation and local testing. ## Core Features & Use Cases - Template Bootstrapping: Generates .template.config/template.json from an existing project with correct identity, shortName, sourceName, classifications, and tags. - Schema Validation: Reviews template.json for missing required fields, invalid parameter datatypes, shortName conflicts with CLI commands, and incomplete post-actions. - NuGet Packaging Guidance: Structures templates for packaging and distribution as NuGet packages. - Use Case: You have an internal library project your team clones and renames repeatedly. Use this Skill to convert it into a parameterized template with conditional content, then verify it installs and builds cleanly via dotnet new install and a dry run. ## Quick Start Create a dotnet new template from my project at ./src/MyLib and validate the generated template.json for authoring issues.

Frequently Asked Questions about template-authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a dotnet new template from an existing project?

Create a .template.config directory next to your .csproj and add a template.json with identity, name, shortName, sourceName, classifications, and tags. Then install it locally with dotnet new install and test it with a dry run before distributing.

How to validate a template.json file for dotnet new?

Check that identity, name, and shortName are present, identity uses reverse-DNS format, parameters use valid datatypes like string, bool, choice, int, or float, and every parameter has a description. Also verify post-actions are fully configured and tags support discoverability.

Why does my dotnet new template shortName conflict with CLI commands?

Short names like build, run, test, or publish collide with built-in dotnet CLI commands and cause resolution problems. Run dotnet new list to check whether a name is already taken, and pick a unique, meaningful shortName.

Can I add conditional content to a dotnet new template?

Yes, use #if preprocessor directives tied to bool or choice parameters to include or exclude files and code sections. Test every parameter combination with dotnet new <template> --dry-run to confirm the conditional output is correct.

When should I not use template authoring guidance?

Do not use it to find or instantiate existing templates; that belongs to template discovery and instantiation workflows. It also does not cover general MSBuild project issues or NuGet package publishing beyond the template packaging structure.