create-blazor-project
What it does
This skill creates a new Blazor web application and helps you choose its interactivity level. It is for .NET developers starting a new Blazor site or app.
When to use it
- βWhen you want to start a new Blazor web app.
- βWhen you need to pick between static, server and WebAssembly interactivity.
- βWhen you want a new project scaffolded with the right options.
Skill link
https://github.com/dotnet/skills/blob/main/plugins/dotnet-blazor/skills/create-blazor-project/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCreate a new Blazor web app for my product catalog with search and a cart, using the simplest suitable interactivity.β
5 new skills a week. 1 minute to read.
How it works
The agent asks about the app's features and interactivity needs, picks the simplest render mode that fits, and creates the project with the matching options.
Technical content (original SKILL.md)
Original text by the author, straight from 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:
- What does the app do? List the main screens/features (e.g., "product catalog with search and shopping cart").
- What kind of interactivity is needed? Displaying data and forms? Real-time updates? Offline support? Rich drag-and-drop UI?
- Deployment environment? Internet-facing? Intranet? Mobile users on slow connections?
- 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
.Clientproject β 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.csfiles 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
HttpContextaccess, no browser-only APIs withoutRendererInfoguards. - 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
.Clientproject, 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
FAQ
What interactivity options are there?
Static server rendering, interactive server, interactive WebAssembly and auto mode.
Does it start with the simplest option?
Yes. It begins at the simplest level and moves up only when there is a clear reason.
Does it add features to an existing project?
No. It is for creating new projects, and existing ones are handled elsewhere.
Details
Original description by the author
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
Popularity
- GitHub stars
- 5.8k
- Ranking position
- #14565
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
create-custom-agent
5.8kHelps your agent create VS Code custom agent files with their own tools, instructions and handoffs to other agents.
create-skill
5.8kHelps your agent create a new agent skill with a valid name, a clear trigger description and a SKILL.md file that follows the standard.
csharp-scripts
5.8kHelps your agent run a small C# program as a single file with the .NET command line tool, without creating a full project.
dotnet-pinvoke
5.8kHelps your agent call native C or C++ libraries from .NET correctly, covering signatures, string handling, memory and safe handles.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.