본문으로 건너뛰기
Skillpedia
일반 코딩5.8k · #14615

template-smart-defaults

하는 일

이 스킬은 템플릿으로 .NET 프로젝트를 만들 때 관련 옵션을 채워서, 선택들이 서로 맞도록 합니다. 일부 옵션을 비워 두고 나머지도 일관되게 맞춰지기를 원하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓인증을 켰는데 HTTPS 같은 관련 옵션을 설정하지 않았을 때.
  • ✓네이티브 AOT처럼 고른 옵션이 맞는 프레임워크나 설정을 시사할 때.
  • ✓컨트롤러와 최소 API처럼 두 템플릿 옵션이 충돌하고 하나만 고를 수 있을 때.

스킬 링크

https://github.com/dotnet/skills/blob/main/plugins/dotnet-template-engine/skills/template-smart-defaults/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/dotnet/skills/blob/main/plugins/dotnet-template-engine/skills/template-smart-defaults/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“로그인과 네이티브 AOT가 있는 새 .NET 웹 API를 만들어 주세요. 함께 동작하도록 나머지 설정을 채워 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 기본 규칙을 사용자가 설정하지 않은 옵션에만 적용하고, 사용자가 명시적으로 고른 값은 모두 그대로 유지합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

Input Required Description
Template short name Yes The template the project will be created from (e.g., webapi)
Parameters already chosen Yes The parameter values the user has explicitly set
Available choices Recommended Parameter 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:

Parameter Value Source Why
--framework net10.0 rule Native AOT (from --aot) needs the latest AOT-capable TFM
--auth Individual user Explicitly requested — left unchanged
--name AotWorker rule Added 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.

Rules

Rule Default applied Rationale
--aot is set (on any template whose --help exposes it) and --framework is unset Set --framework to the latest AOT-compatible framework the template offers Native AOT requires a recent, AOT-capable target framework; using the latest avoids build failures. (A framework
자주 묻는 질문

제 선택을 덮어쓰나요?

아니요. 규칙은 빈칸만 채우며, 명시적으로 설정한 값은 그대로 남습니다.

선택을 설명할 수 있나요?

네. 관련 옵션마다 왜 그 기본값이 선택되었는지 설명할 수 있습니다.

프로젝트를 만드나요?

아니요. 프로젝트 생성은 템플릿 인스턴스화 스킬이 다룹니다.

상세 정보

작성자의 원본 설명

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

repo: dotnet/skills

인기도

GitHub 스타
5.8k
순위
#14615
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬