template-authoring

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

Updated Sep 22, 2026
One-click install
npx skills add https://github.com/bytecakelake/Nurse-Scheduler --skill template-authoring-bytecakelake
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: template-authoring
Source: https://github.com/bytecakelake/Nurse-Scheduler/tree/main/.agents/plugins/dotnet-template-engine/skills/template-authoring
Command: npx skills add https://github.com/bytecakelake/Nurse-Scheduler --skill template-authoring-bytecakelake

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Hand-written dotnet new templates often lose the source project's conventions—SDK type, analyzer metadata, CPM settings, and build properties—forcing teams to manually fix every generated project. This Skill bootstraps a complete .template.config/template.json from an existing .csproj while preserving those conventions, then validates it before publishing. ## Core Features & Use Cases - Template Bootstrapping: Analyzes a source .csproj and generates a complete template.json with identity, shortName, sourceName, classifications, and tags while carrying over SDK type, PackageReference metadata, and CPM conventions. - Authoring Validation: Checks required fields, identity format, shortName conflicts with dotnet new subcommands, parameter datatypes, and post-actions before publishing. - Refinement & Packaging: Adds parameters, conditional content via #if directives, post-actions, constraints, and NuGet packaging structure for distribution. - Use Case: You have a well-configured internal Web API project and want every team to scaffold new services from it. Use this Skill to generate the template.json, verify no conventions were dropped, test with dotnet new install and --dry-run, and package it for NuGet. ## Quick Start Create a reusable dotnet new template from my existing project at ./src/MyApi and validate the generated template.json before I publish it.

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. This Skill generates that file while preserving your project's SDK type, analyzer metadata, and CPM settings.

How to validate a template.json before publishing?▼

Validation checks required fields (identity, name, shortName), identity reverse-DNS format, shortName conflicts with dotnet new subcommands, parameter datatypes, post-actions, and tags. Then test locally with dotnet new install, --dry-run, and dotnet build on the output.

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

A shortName matching a dotnet new subcommand like install, list, or search gets parsed as that subcommand instead of your template. Read the live command set from dotnet new --help and run dotnet new list to confirm the name is not taken.

Does template authoring preserve Central Package Management settings?▼

Yes. When a Directory.Packages.props is present, the generated template content keeps CPM participation by omitting inline Version attributes on PackageReference entries. Analyzer metadata like PrivateAssets and IncludeAssets is also carried over.

When should I not use template authoring?▼

Do not use it for validating an existing template.json as a standalone task, finding or instantiating existing templates, or MSBuild project issues unrelated to templates. It also covers only template packaging structure, not NuGet package publishing itself.