Official agent skill

Template Smart Defaults

by dotnet in dotnet/skills

Applies cross-parameter default rules when creating .NET projects with dotnet new, filling gaps consistently without overriding values the user set explicitly.

OfficialMITAuto-check passed

Install Template Smart Defaults

skills CLI
$ npx skills add dotnet/skills --skill template-smart-defaults -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dotnet/skills template-smart-defaults --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dotnet-template-engine/skills/template-smart-defaults .claude/skills/template-smart-defaults && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
template-smart-defaults
GitHub stars
5.6k
Used in
1 other repo
Token cost
~2k tokens
SKILL.md length
962 words
Files
1
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Applies cross-parameter default rules when creating .NET projects with dotnet new, filling gaps consistently without overriding values the user set explicitly.

  • Works in 4 steps: Gather the parameters the user has… → Apply each rule below only where the… → Confirm the chosen parameter names and… → …
  • : choosing which target framework to pair with native AOT
  • SKILL.md covers When to Use, When Not to Use, Inputs and Workflow, plus 3 more sections
  • Calls dotnet

What it does

Template Smart Defaults is an agent skill from dotnet/skills, published by the product's own GitHub organization. Applies cross-parameter default rules when creating .NET projects with dotnet new, filling gaps consistently without overriding values the user set explicitly. USE FOR: choosing which target framework to pair with native AOT, deciding whether to keep HTTPS when authentication is enabled, recognizing that controllers and minimal-API flags are mutually exclusive, filling unset related parameters during project creation, explaining why a default was applied and ensuring an explicit user value is never overridden. DO…

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with .NET. The repository describes itself as: Repository for skills to assist AI coding agents with .NET and C. The licence is MIT.

When your agent uses it

  • : choosing which target framework to pair with native AOT
  • Deciding whether to keep HTTPS when authentication is enabled
  • Recognizing that controllers and minimal-API flags are mutually exclusive
  • Filling unset related parameters during project creation

Example prompts

  • “Use the template-smart-defaults skill to apply cross-parameter default rules when creating .NET projects with dotnet new, filling gaps consistently…”
  • “/template-smart-defaults”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Gather the parameters the user has explicitly set.
  2. Apply each rule below only where the corresponding parameter is unset — never override a value the user set explicitly.
  3. Confirm the chosen parameter names and choices against dotnet new --help
  4. Emit the two required outputs (see below) — this is what makes the skill decisive rather than inert.

What it can do on your machine

Read from SKILL.md and the folder at commit a660de8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Template Smart Defaults loads about 2k tokens when it runs. Until then it costs about 196 tokens; SKILL.md has 962 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~196
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dotnet/skills at commit a660de8, republished under its MIT licence (© dotnet). 962 words, ~1,960 tokens.

Download SKILL.mdSave it as .claude/skills/template-smart-defaults/SKILL.md (or your agent's skills folder).
name
template-smart-defaults
description
Applies cross-parameter default rules when creating .NET projects with dotnet new, filling gaps consistently without overriding values the user set explicitly. USE FOR: choosing which target framework to pair with native AOT, deciding whether to keep HTTPS when authentication is enabled, recognizing that controllers and minimal-API flags are mutually exclusive, filling unset related parameters during project creation, explaining why a default was applied and ensuring an explicit user value is never overridden. DO NOT USE FOR: creating the project itself (use template-instantiation), finding or comparing templates (use template-discovery and template-comparison), authoring or validating custom templates (use template-authoring and template-validation).
license
MIT

Template Smart Defaults

This skill helps an agent fill in cross-parameter defaults when creating a dotnet new project. The rules below are guidance heuristics that keep related parameters consistent — they only fill gaps and never override a value the user set explicitly.

When to Use

  • The user asks to create a project but leaves related parameters unspecified
  • A parameter the user chose implies a sensible value for another parameter
  • You need to explain why a particular default was selected

When Not to Use

  • User wants to actually create the project — route to template-instantiation
  • User wants to find or compare templates — route to template-discovery or template-comparison
  • User wants to author or validate a custom template — route to template-authoring or template-validation

Inputs

InputRequiredDescription
Template short nameYesThe template the project will be created from (e.g., webapi)
Parameters already chosenYesThe parameter values the user has explicitly set
Available choicesRecommendedParameter names/choices from dotnet new <template> --help

Workflow

  1. Gather the parameters the user has explicitly set.
  2. Apply each rule below only where the corresponding parameter is unset — never override a value the user set explicitly.
  3. Confirm the chosen parameter names and choices against dotnet new <template> --help whenever the user asks for an exact command. This inspection does not create files and is worthwhile even for advice-only requests. Skip it only for a conceptual explanation that does not claim exact option names.
  4. Emit the two required outputs (see below) — this is what makes the skill decisive rather than inert.

For advice-only prompts that say "don't create files", make the displayed command safe to run by appending --dry-run. If a scenario needs a named example and the user omitted the name, choose a short descriptive sample name and mark it Source = rule. Do not add a name when the user asked for a command containing only explicitly requested choices or when the template can demonstrate those choices safely without one.

Required output

Always produce both, in this order:

A. A "Defaults applied" log — one row per parameter, covering both the explicit values you preserved (Source = user) and the gaps you filled by rule (Source = rule), so the user can see and override every choice:

ParameterValueSourceWhy
--frameworknet10.0ruleNative AOT (from --aot) needs the latest AOT-capable TFM
--authIndividualuserExplicitly requested — left unchanged
--nameAotWorkerruleAdded a descriptive sample name for this named example

Use Source = user for explicit values (never overridden) and Source = rule for gap-fills.

B. The exact single dotnet new command line you would run — include only the flags you are actually passing. Do not list flags you decided not to pass (e.g. don't mention --no-https when you are keeping HTTPS; don't mention a minimal-API flag when using controllers). Silence on an omitted flag is the correct, decisive signal.

Always emit a flag the user explicitly requested when the observed template help exposes it, even when its value matches the template default; this keeps intent visible and reproducible (for example, --auth None). Omit only inferred defaults that you are not actually passing. Boolean switches such as --no-https are passed without true.

AOT at create time vs publish time. --aot is a dotnet new flag only on the templates that expose it — always confirm with dotnet new <template> --help rather than assuming a given template does or doesn't offer it. There is no --publish-aot template flag — publish-time native AOT is enabled with the MSBuild property PublishAot=true (via dotnet publish or in the .csproj), not through dotnet new. Apply the framework rule only when the template actually offers --aot.

Show full SKILL.md (362 more words)Show less
Rules
RuleDefault appliedRationale
--aot is set (on any template whose --help exposes it) and --framework is unsetSet --framework to the latest AOT-compatible framework the template offersNative AOT requires a recent, AOT-capable target framework; using the latest avoids build failures. (A framework already pinned by the workspace or global.json counts as set — keep it unless it's incompatible with AOT.)
--auth is anything other than NoneDo NOT pass --no-httpsAuthentication flows (cookies, tokens, redirects) require HTTPS; disabling it breaks auth.
--use-controllers is setDo NOT also pass a minimal-API flagControllers and minimal APIs are mutually exclusive program models; passing both is contradictory.
User set a value explicitlyLeave it unchangedSmart defaults only fill gaps; explicit user intent always wins.
Advice-only command must not create filesAdd --dry-runThe command itself must honor the no-write constraint, not only the agent's behavior.

When controllers are explicitly requested, the command must contain the controller option shown by --help; explaining controllers without passing the option is incomplete.

Validation

  • A "Defaults applied" log was produced with a Source (user/rule) and rationale per row
  • The exact single dotnet new command line was emitted, listing only flags actually passed
  • No parameter the user set explicitly was overridden
  • Only unset parameters were filled
  • Exact parameter names/choices were confirmed against dotnet new <template> --help, including for advice-only exact commands
  • A no-file advice command includes --dry-run
  • Boolean switches are emitted without a trailing true

Common Pitfalls

PitfallSolution
Treating heuristics as enforcementThese are guidance rules, not validation. Always confirm against dotnet new <template> --help choices, since parameter names vary by template.
Overriding an explicit user valueApply a rule only when the target parameter is unset.
Assuming a flag nameThe exact flag differs per template — always verify with --help (e.g. --aot is present only where --help lists it; controllers use --use-controllers).
Picking a framework the template doesn't supportUse the latest framework that appears in the template's --framework choices, not an arbitrary newest version.
Showing a plain creation command after "don't create files"Append --dry-run so the displayed command is safe to execute.

More Info

© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/dotnet-template-engine/skills/template-smart-defaults of dotnet/skills.

Open the folder on GitHubat commit a660de8

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dotnet/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Template Smart Defaults next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Template Smart Defaults compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Template Smart Defaults this skilldotnet/skills5.6k1 repos~2kAutomated safety check: PassMIT
Minimax DOCXpoco-ai/poco-claw1.4k7 repos~3.9kAutomated safety check: PassMIT
Microsoft Skill CreatorMicrosoftDocs/mcp1.9k3 repos~2.1kAutomated safety check: PassCC-BY-4.0
Speckit ConstitutionWeihanLi/WeihanLi.Common24211 repos~2.1kAutomated safety check: PassApache-2.0
Copilot Session Failure Analysisdotnet/maui23k—~3.4kAutomated safety check: PassMIT
Microsoft Code ReferenceMicrosoftDocs/mcp1.9k4 repos~1.1kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Minimax DOCX

    poco-ai/poco-claw

    Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET).

    1.4k GitHub starsUsed in 7 repos~3.9k tokens
    Documents & OfficeAuto-check passed
  • Microsoft Skill Creator

    MicrosoftDocs/mcp

    Official

    Create agent skills for Microsoft technologies using official documentation.

    1.9k GitHub starsUsed in 3 repos~2.1k tokens
    Agent WorkflowsAuto-check passed
  • Speckit Constitution

    WeihanLi/WeihanLi.Common

    Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

    242 GitHub starsUsed in 11 repos~2.1k tokens
    DevelopmentAuto-check passed
  • Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.

    23k GitHub stars~3.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Microsoft Code Reference

    MicrosoftDocs/mcp

    Official

    Find working code samples, verify API signatures, and fix Microsoft SDK errors using official docs.

    1.9k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.

    22k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed

More from dotnet/skills

All 91 skills in this repo
  • Official

    Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Official

    Resolves native crash frames from .NET Android tombstones to function names, source files and line numbers using BuildIds, Microsoft's symbol server and llvm-symbolizer.

    5.6k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    Auto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Microbenchmarking

    dotnet/skills

    Official

    Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks.

    5.6k GitHub starsUsed in 3 repos~3.3k tokens
    Auto-check passed
  • Official

    Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.

    5.6k GitHub starsUsed in 2 repos~4.2k tokens
    Auto-check passed

Works with

Questions about Template Smart Defaults

What does Template Smart Defaults do?

Applies cross-parameter default rules when creating .NET projects with dotnet new, filling gaps consistently without overriding values the user set explicitly. Template Smart Defaults is an agent skill from dotnet/skills, published by the product's own GitHub organization.NET projects with dotnet new, filling gaps consistently without overriding values the user set explicitly.

When should I use Template Smart Defaults?

Template Smart Defaults fits situations like: : choosing which target framework to pair with native AOT; deciding whether to keep HTTPS when authentication is enabled; recognizing that controllers and minimal-API flags are mutually exclusive; filling unset related parameters during project creation.

How do I install Template Smart Defaults in Claude Code?

Run `npx skills add dotnet/skills --skill template-smart-defaults -a claude-code`. Or copy the skill folder (plugins/dotnet-template-engine/skills/template-smart-defaults in dotnet/skills) into .claude/skills/template-smart-defaults in your project. Claude Code loads it when a task matches its description.

How do I install Template Smart Defaults in Codex?

Run `npx skills add dotnet/skills --skill template-smart-defaults -a codex`. Or copy the skill folder (plugins/dotnet-template-engine/skills/template-smart-defaults in dotnet/skills) into .agents/skills/template-smart-defaults in your project. Codex loads it when a task matches its description.

Can I use Template Smart Defaults in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/skills --skill template-smart-defaults -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/template-smart-defaults, .gemini/skills/template-smart-defaults, .github/skills/template-smart-defaults and .opencode/skills/template-smart-defaults in your project.

What does Template Smart Defaults need to run?

Going by SKILL.md and its folder, Template Smart Defaults needs the command-line tools its instructions call (dotnet).

Does Template Smart Defaults access the network?

SKILL.md names 1 domain. As links in the text: learn.microsoft.com. This is read from the text; nothing was executed.

Is Template Smart Defaults safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Template Smart Defaults use?

Template Smart Defaults is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Template Smart Defaults use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Template Smart Defaults?

Skills that share tags, products or a category with Template Smart Defaults: Minimax DOCX (poco-ai/poco-claw, 1.4k stars), Microsoft Skill Creator (MicrosoftDocs/mcp, 1.9k stars), Speckit Constitution (WeihanLi/WeihanLi.Common, 242 stars) and Copilot Session Failure Analysis (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Template Smart Defaults?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,576 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 8, 2026.

Source: dotnet/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.