template-instantiation
Skill for creating .NET projects from templates with correct parameters, smart defaults, and constraint validation. Use when a user wants to scaffold a new project, solution, or item from a dotnet new template. Covers parameter selection, dry-run preview, multi-template orchestration, and post-creation verification. DO NOT use for template authoring, build failures, or NuGet package management.
What this skill does
# Template Instantiation
## When to Use
Invoke this skill when:
- User explicitly asks to create a project/solution/item from a template
- User describes a project they want and the right template has been identified (via `template-discovery` skill)
- User wants to add an item template (e.g., class, interface, razor page) to an existing project
## Step 1: Verify Parameters
Before calling `template_instantiate`, ensure you have:
1. **Template short name** — from search/list results
2. **Project name** — usually provided by user
3. **Output path** — where to create the project
4. **Parameters** — framework, auth, feature flags, etc.
Use `template_inspect` if you need to verify available parameters and their valid values.
## Step 2: Preview with Dry Run
Always offer a dry run before creation:
```
template_dry_run with:
shortName: "webapi"
name: "MyService"
output: "./src/MyService"
parameters: { "framework": "net10.0", "use-controllers": "true" }
```
Review the output file list with the user before proceeding.
## Step 3: Instantiate
```
template_instantiate with:
shortName: "webapi"
name: "MyService"
output: "./src/MyService"
parameters: { "framework": "net10.0", "use-controllers": "true" }
```
The tool handles:
- **Auto-resolve**: If template isn't installed, auto-searches NuGet → installs → creates
- **Parameter validation**: Reports invalid values with suggestions
- **Constraint checks**: Validates OS, SDK version, workload requirements
- **Post-actions**: Runs restore, opens files, executes scripts as defined by the template
## Step 4: Post-Creation Verification
After instantiation:
1. Verify the project builds: `dotnet build ./src/MyService`
2. Check for expected files (Program.cs, .csproj, etc.)
3. If adding to a solution, run: `dotnet sln add ./src/MyService`
## Smart Defaults
The MCP server suggests parameter relationships:
- `EnableAot=true` → suggests `net9.0` or later
- `--auth Individual` → appropriate identity packages
- `--use-controllers false` → minimal API pattern
Use `template_suggest_parameters` for parameter suggestions with human-readable rationale.
## Post-Creation Intelligence
The `template_instantiate` tool automatically adapts output to the target environment:
### CPM (Central Package Management)
If `Directory.Packages.props` exists in any parent directory:
- Strips `Version` attributes from generated `.csproj` PackageReferences
- Adds `<PackageVersion>` entries to `Directory.Packages.props` (skips existing entries)
### Latest NuGet Versions
By default (`resolveLatestVersions: true`), queries the NuGet V3 API for every PackageReference and replaces template-hardcoded versions with the latest stable release. In CPM mode, latest versions go into `Directory.Packages.props`.
## Multi-Template Workflows
For complex project structures, use `template_compose` for orchestrated multi-step creation, or chain template operations:
### 1. Solution + Web API + Test Project
```
1. template_instantiate: "sln" → MySolution
2. template_instantiate: "webapi" → src/MyApi
3. template_instantiate: "xunit" → test/MyApi.Tests
4. dotnet sln add src/MyApi test/MyApi.Tests
5. Add ProjectReference from test → src
```
### 2. MAUI App + Class Library + Tests
```
1. template_instantiate: "maui" → src/MyApp
2. template_instantiate: "classlib" → src/MyApp.Core
3. template_instantiate: "mstest" → test/MyApp.Tests
```
## Error Recovery
| Error | Resolution |
|-------|-----------|
| Template not found | Use `template_search` to find alternatives; auto-resolve will install from NuGet |
| Invalid parameter value | Tool returns valid options with "did you mean...?" suggestions |
| SDK constraint failed | Install required SDK version or use `--framework` to target available SDK |
| Workload missing | Install workload: `dotnet workload install <workload>` |
| Output directory exists | Choose a different `--output` path or confirm overwrite |
## Cross-Reference
- **Finding the right template** → `template-discovery` skill
- **Creating templates from existing projects** → `template-authoring` skill
- **Build failures after creation** → MSBuild skills (`common-build-errors`, `nuget-restore-failures`)
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.