본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)5.8k · #14565

create-blazor-project

하는 일

이 스킬은 새 Blazor 웹 애플리케이션을 만들고 상호 작용 수준을 고르도록 돕습니다. 새 Blazor 사이트나 앱을 시작하는 .NET 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓새 Blazor 웹 앱을 시작하고 싶을 때.
  • ✓정적, 서버, WebAssembly 상호 작용 중 하나를 골라야 할 때.
  • ✓적절한 옵션으로 새 프로젝트의 뼈대를 만들고 싶을 때.

스킬 링크

https://github.com/dotnet/skills/blob/main/plugins/dotnet-blazor/skills/create-blazor-project/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“제 상품 카탈로그를 위한 새 Blazor 웹 앱을 만들어 주세요. 검색과 장바구니가 있어야 하며, 가장 단순한 상호 작용 방식으로 만들어 주세요.”

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

작동 방식

에이전트가 앱의 기능과 상호 작용 요구를 묻고, 맞는 가장 단순한 렌더 모드를 고른 뒤, 그에 맞는 옵션으로 프로젝트를 만듭니다.

기술 내용 (원본 SKILL.md)

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

Create a Blazor Web App

Before You Start — Gather Requirements

If the user's request doesn't make the following clear, ask before scaffolding:

  1. What does the app do? List the main screens/features (e.g., "product catalog with search and shopping cart").
  2. What kind of interactivity is needed? Displaying data and forms? Real-time updates? Offline support? Rich drag-and-drop UI?
  3. Deployment environment? Internet-facing? Intranet? Mobile users on slow connections?
  4. Authentication needed? Anonymous? Individual accounts? Organizational (Azure AD)?

Pick the Right Interactivity Level

Blazor render modes are a progression scale. Start at the simplest level that satisfies the requirements and only move up when there's a concrete reason.

Static SSR ──→ SSR + Enhanced Nav ──→ Interactive Server ──→ Interactive WebAssembly
 simplest                                                           most complex

Decision Rules

If the app needs... Use Why
Display data, simple forms, links between pages Static SSR (-int None) No JS runtime, no circuit, no WebAssembly download. Forms work via HTML POST. Enhanced navigation makes it feel snappy.
Everything above + a few components with client-side behavior (live search, real-time updates, complex form wizards) Interactive Server, per-page (-int Server) Only the components that need interactivity opt in with @rendermode. The rest stays static. Server-side execution, full .NET access, no API layer needed.
Most pages need rich interactivity (dashboards, drag-and-drop, chat) Interactive Server, global (-int Server -ai) Every component is interactive by default. Consistent UX, simpler mental model. Trade-off: every user holds a SignalR circuit on the server.
Network latency is a problem, users are on mobile/poor connections, or the app must work offline Interactive WebAssembly (-int WebAssembly) Code runs in the browser. Eliminates round-trip latency but requires a .Client project, API layer for data access, and downloads the .NET runtime to the browser on first visit. For offline support, enable PWA: add a service worker and manifest after scaffolding (not included in the template by default).
Fast initial load (Server) + low latency after (WebAssembly) Interactive Auto (-int Auto) First visit uses Server; subsequent visits use cached WebAssembly runtime. Most complex setup — see Auto constraints below. Only choose when both Server and WebAssembly constraints apply.

Default recommendation: Start with -int Server (per-page). It covers the vast majority of apps. Upgrade to global or WebAssembly only when a specific requirement demands it.

Auto Mode Constraints

Auto mode means your component code runs on the server first, then in the browser on subsequent visits. This creates real constraints:

  • All interactive components must live in the .Client project — same as WebAssembly.
  • No direct server access from interactive components — no EF DbContext, no file system, no server-only services. All data access must go through HTTP APIs.
  • Both Program.cs files must register matching services — the server and client DI containers must both provide implementations for any service an interactive component injects.
  • Code must not assume its execution environment — no HttpContext access, no browser-only APIs without RendererInfo guards.
  • Test in both modes — a component that works on Server during development may break on WebAssembly in production (second visit). Test both paths.

Don'ts

  • Don't pick WebAssembly "because it's cool" — it adds a .Client project, forces API-mediated data access, and downloads ~10MB to the browser on first visit.
  • Don't pick Auto unless you can articulate why Server alone and WebAssembly alone are both insufficient.
  • Don't pick global interactivity for apps where most pages are read-only content — per-page keeps the static pages fast and reduces server memory.

Scaffold the Project

Static SSR Only (display data + simple forms)

dotnet new blazor -o {AppName} -int None

No interactive runtime. Enhanced navigation enabled by default via blazor.web.js.

Interactive Server, Per-Page (recommended default)

dotnet new blazor -o {AppName} -int Server

Pages are static by default. Add @rendermode InteractiveServer to components that need interactivi

자주 묻는 질문

어떤 상호 작용 옵션이 있나요?

정적 서버 렌더링, 대화형 서버, 대화형 WebAssembly, 자동 모드가 있습니다.

가장 단순한 옵션부터 시작하나요?

네. 가장 단순한 수준에서 시작하고, 분명한 이유가 있을 때만 단계를 올립니다.

기존 프로젝트에 기능을 추가하나요?

아니요. 새 프로젝트를 만드는 용도이며, 기존 프로젝트는 다른 곳에서 다룹니다.

상세 정보

작성자의 원본 설명

Create a new ASP.NET Core web application or web site using Blazor. USE FOR: creating a new Blazor web app, scaffolding a new web project, starting a new web site, choosing render modes (Static SSR, Interactive Server, Interactive WebAssembly, Auto), running dotnet new blazor with the right options, setting up initial project structure. DO NOT USE FOR: adding features to existing projects, changing how an existing app renders, or component authoring (use author-component).

repo: dotnet/skills

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬