template-instantiation

Creates .NET projects from dotnet new templates with CPM adaptation and multi-project composition.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Creating new .NET projects that fit an existing workspace is error-prone: templates hardcode stale package versions, ignore Central Package Management, and default to the wrong target framework. This Skill scaffolds projects with validated parameters, workspace-aware defaults, and verified builds. ## Core Features & Use Cases - Workspace-aware scaffolding: Detects Directory.Packages.props (CPM), existing target frameworks, and global.json before running dotnet new, then mirrors those settings. - CPM adaptation: Strips inline PackageReference versions from generated .csproj files and centralizes them into Directory.Packages.props, with optional tooling-driven version refresh via dotnet list package --outdated. - Multi-project composition: Creates solutions combining API, test, and library projects, wires project references, and adds them to the .sln file. - Use Case: You need a new ASP.NET Core Web API with Individual auth and native AOT plus an xUnit test project inside a repo that uses CPM. The Skill previews with --dry-run, creates both projects, centralizes package versions, and confirms everything builds. ## Quick Start Ask the AI to create a new .NET Web API project named MyApi with Individual authentication in the src folder, respecting the repository's Central Package Management setup.

Frequently Asked Questions about template-instantiation

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

FAQPage Schema
How do I create a new .NET project from a template with the CLI?▼

Run dotnet new with the template short name, project name, and parameters, for example dotnet new webapi --name MyApi --framework net10.0 --auth Individual. Use dotnet new <template> --help to list all available parameters and --dry-run to preview the generated files first.

How to make dotnet new projects work with Central Package Management?▼

Templates generate inline Version attributes on PackageReference entries that conflict with CPM. After creation, remove the Version attributes from the .csproj and add matching PackageVersion entries to Directory.Packages.props, then run dotnet build to confirm resolution.

How do I create a solution with multiple .NET projects?▼

Create each project sequentially with dotnet new, wire references with dotnet add reference, and register them with dotnet sln add. A typical layout combines a webapi project in src, an xunit test project in tests, and a solution-level build to verify.

Should I update the package versions that dotnet templates generate?▼

Keep the template's default versions by default since they are tested and reproducible. Only refresh when requested, using dotnet list package --outdated, and constrain upgrades to the same major version unless larger upgrades are explicitly approved.

When should I not use template-based project creation?▼

Do not use it for finding or comparing templates, authoring custom templates, or modifying existing projects. Adding NuGet packages to an existing project should be done directly with dotnet add package instead.