Official agent skill

Create Blazor Project

by dotnet in dotnet/skills

Create a new ASP.NET Core web application or web site using Blazor.

OfficialMITAuto-check passedDevelopment

Install Create Blazor Project

skills CLI
$ npx skills add dotnet/skills --skill create-blazor-project -a claude-code

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

GitHub CLI
$ gh skill install dotnet/skills create-blazor-project --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-blazor/skills/create-blazor-project .claude/skills/create-blazor-project && 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
create-blazor-project
GitHub stars
5.6k
Used in
1 other repo
Token cost
~3k tokens
SKILL.md length
1,067 words
Files
8 (incl. assets)
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Create a new ASP.NET Core web application or web site using Blazor.

  • Works in 4 steps: What does the app do? List the main… → What kind of interactivity is needed?… → Deployment environment? Internet-facing?… → …
  • : creating a new Blazor web app
  • SKILL.md covers Before You Start — Gather…, Pick the Right Interactivity…, Scaffold the Project and What the Template Creates, plus 5 more sections
  • Calls dotnet

What it does

Create Blazor Project is an agent skill from dotnet/skills, published by the product's own GitHub organization. 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).

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including assets (for example `assets/agents-md/auto-global.md`, `assets/agents-md/auto-per-page.md` and `assets/agents-md/server-global.md`).

It sits in Development, covering Project scaffolding. It works with Blazor, .NET, WebAssembly and ASP.NET Core. 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

  • : creating a new Blazor web app
  • Scaffolding a new web project
  • Starting a new web site
  • Choosing render modes (Static SSR

Example prompts

  • “/create-blazor-project”

Workflow steps

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

  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)?

What it can do on your machine

Read from SKILL.md and the folder at commit 8d670fa. 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

    No URLs in SKILL.md.

    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

Create Blazor Project loads about 3k tokens when it runs. Until then it costs about 125 tokens; SKILL.md has 1,067 words of instructions outside code blocks.

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

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 8d670fa, republished under its MIT licence (© dotnet). 1,067 words, ~2,989 tokens.

Download SKILL.mdSave it as .claude/skills/create-blazor-project/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
create-blazor-project
description
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).
license
MIT

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...UseWhy
Display data, simple forms, links between pagesStatic 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 offlineInteractive 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)
shell
dotnet new blazor -o {AppName} -int None

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

shell
dotnet new blazor -o {AppName} -int Server

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

Interactive Server, Global
shell
dotnet new blazor -o {AppName} -int Server -ai

All pages interactive via <Routes @rendermode="InteractiveServer" /> in App.razor.

Interactive WebAssembly, Per-Page
shell
dotnet new blazor -o {AppName} -int WebAssembly

Creates {AppName} (server) and {AppName}.Client (WebAssembly) projects. Interactive components must live in .Client.

Interactive WebAssembly, Global
shell
dotnet new blazor -o {AppName} -int WebAssembly -ai
Interactive Auto, Per-Page
shell
dotnet new blazor -o {AppName} -int Auto
Interactive Auto, Global
shell
dotnet new blazor -o {AppName} -int Auto -ai
Show full SKILL.md (450 more words)Show less
With Authentication

Append -au Individual to any command above:

shell
dotnet new blazor -o {AppName} -int Server -au Individual

-au Individual scaffolds ASP.NET Core Identity with SQLite (CLI) or SQL Server (Visual Studio). Identity pages are always static SSR — they do not use interactive render modes.

The blazor template only supports -au Individual. For organizational auth (Microsoft Entra ID, Azure AD B2C), scaffold with -au Individual first, then replace the Identity provider with Microsoft.Identity.Web / OIDC middleware and configure the tenant in appsettings.json.

What the Template Creates

Single project (Static SSR, Server)
{AppName}/
├── Components/
│   ├── App.razor              # Root component — sets <HeadOutlet> and <Routes>
│   ├── Routes.razor           # Wraps <Router> with route discovery
│   ├── Layout/
│   │   ├── MainLayout.razor   # App shell with nav, header, footer
│   │   └── MainLayout.razor.css
│   └── Pages/
│       └── Home.razor         # @page "/" — first page
├── Program.cs                 # Service registration and middleware
├── wwwroot/                   # Static files (CSS, images)
└── {AppName}.csproj
Two projects (WebAssembly, Auto)
{AppName}/                     # Server project — hosts the app
├── Components/                # Server-only components (static SSR pages, layouts)
│   ├── App.razor
│   ├── Routes.razor
│   └── Layout/
├── Program.cs                 # Server Program.cs
└── {AppName}.Client/          # Client project — WebAssembly components
    ├── Pages/                 # Interactive components go HERE
    ├── Program.cs             # Client Program.cs
    └── _Imports.razor

Rule: Components using InteractiveWebAssembly or InteractiveAuto must live in the .Client project. They can reference shared code but cannot reference server-only types (EF DbContext, server-side services).

Program.cs Wiring

The template generates the correct Program.cs for the chosen mode. Verify these registrations match your intent:

Static SSR Only
csharp
// Program.cs
builder.Services.AddRazorComponents();

// ...

app.MapRazorComponents<App>();
Server (per-page or global)
csharp
builder.Services.AddRazorComponents()
    .AddInteractiveServerComponents();

// ...

app.MapRazorComponents<App>()
    .AddInteractiveServerRenderMode();
WebAssembly (per-page or global)
csharp
// Server Program.cs
builder.Services.AddRazorComponents()
    .AddInteractiveWebAssemblyComponents();

// ...

app.MapRazorComponents<App>()
    .AddInteractiveWebAssemblyRenderMode()
    .AddAdditionalAssemblies(typeof({AppName}.Client._Imports).Assembly);
csharp
// Client Program.cs
builder.Services.AddAuthorizationCore();
// Register HttpClient, other client-side services

Create Project AGENTS.md

After scaffolding, create an AGENTS.md file in the project root (next to the .csproj). For two-project setups, put it in the server project root.

Pick the matching template from assets/agents-md/ based on the chosen mode:

ModeTemplate file
Static SSR (-int None)assets/agents-md/ssr-none.md
Server, per-page (-int Server)assets/agents-md/server-per-page.md
Server, global (-int Server -ai)assets/agents-md/server-global.md
WebAssembly, per-page (-int WebAssembly)assets/agents-md/webassembly-per-page.md
WebAssembly, global (-int WebAssembly -ai)assets/agents-md/webassembly-global.md
Auto, per-page (-int Auto)assets/agents-md/auto-per-page.md
Auto, global (-int Auto -ai)assets/agents-md/auto-global.md

Copy the template contents into the project's AGENTS.md and replace every {AppName} with the actual project name. If auth was scaffolded (-au Individual), add an ## Authentication section noting that ASP.NET Core Identity is configured and that Identity pages under Components/Account/ are always static SSR — do not add @rendermode to them.

After scaffolding the project and creating AGENTS.md, continue implementing the features the user requested. Remove default template pages (Counter, Weather) and replace them with the actual application pages.

Auto (per-page or global)
csharp
// Server Program.cs
builder.Services.AddRazorComponents()
    .AddInteractiveServerComponents()
    .AddInteractiveWebAssemblyComponents();

// ...

app.MapRazorComponents<App>()
    .AddInteractiveServerRenderMode()
    .AddInteractiveWebAssemblyRenderMode()
    .AddAdditionalAssemblies(typeof({AppName}.Client._Imports).Assembly);

App.razor — Global vs Per-Page

The difference between global and per-page interactivity is entirely in App.razor:

Per-page (default)
razor
<!DOCTYPE html>
<html>
<head>
    <HeadOutlet />
</head>
<body>
    <Routes />
    <script src="_framework/blazor.web.js"></script>
</body>
</html>

No @rendermode on <Routes> or <HeadOutlet>. Individual pages opt in.

Global
razor
<!DOCTYPE html>
<html>
<head>
    <HeadOutlet @rendermode="InteractiveServer" />
</head>
<body>
    <Routes @rendermode="InteractiveServer" />
    <script src="_framework/blazor.web.js"></script>
</body>
</html>

Replace InteractiveServer with InteractiveWebAssembly or InteractiveAuto as appropriate.

After Scaffolding

  1. Verify it builds: dotnet build
  2. Run it: dotnet run (in the server project if two-project setup)
  3. Add your first page: Create a .razor file in Components/Pages/ (server project) or Pages/ (.Client project for WebAssembly components)

Don'ts

  • Don't use dotnet new blazorwasm — that creates a standalone WebAssembly SPA without server-side rendering. Use the blazor template with -int WebAssembly instead.
  • Don't manually add AddInteractiveServerComponents() to a project created with -int None and expect it to work — you also need the @rendermode directives and potentially App.razor changes. Re-scaffold if the mode needs to change fundamentally.
  • Don't put WebAssembly-targeted components in the server project — they'll work during prerender but fail after handoff.

© 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

SKILL.md and 7 other files (assets) in plugins/dotnet-blazor/skills/create-blazor-project of dotnet/skills.

  • SKILL.md
  • assets/agents-md/auto-global.md
  • assets/agents-md/auto-per-page.md
  • assets/agents-md/server-global.md
  • assets/agents-md/server-per-page.md
  • assets/agents-md/ssr-none.md
  • assets/agents-md/webassembly-global.md
  • assets/agents-md/webassembly-per-page.md

Open the folder on GitHubat commit 8d670fa

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

Create Blazor Project 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.

Create Blazor Project compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create Blazor Project this skilldotnet/skills5.6k1 repos~3kAutomated safety check: PassMIT
Chrome Devtools MCPmanagedcode/dotnet-skills486—~2.2kAutomated safety check: PassMIT
Dotnet Csharpnovotnyllc/dotnet-artisan233—~1.7kAutomated safety check: PassMIT
Using Dotnetnovotnyllc/dotnet-artisan233—~2.3kAutomated safety check: WarnMIT
Aspnet Coremanagedcode/dotnet-skills486—~2.1kAutomated safety check: PassMIT
C# and .NET DeveloperJeffallan/claude-skills12k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Chrome Devtools MCP

    managedcode/dotnet-skills

    Use Chrome DevTools MCP from .NET agents and .NET-focused repos to inspect, debug, and automate Chrome through an MCP client.

    486 GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Dotnet Csharp

    novotnyllc/dotnet-artisan

    Baseline C skill loaded for every .NET code path. An agent skill from novotnyllc/dotnet-artisan.

    233 GitHub stars~1.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Using Dotnet

    novotnyllc/dotnet-artisan

    Detects .NET intent for any C, ASP.NET Core, EF Core, Blazor, MAUI, Uno Platform, WPF, WinUI, SignalR, gRPC, xUnit, NuGet, or MSBuild request from prompt keywords and repository signals (.sln…

    233 GitHub stars~2.3k tokensUpdated 1 mo ago
    Backend & APIsAuto-check: warnings
  • Aspnet Core

    managedcode/dotnet-skills

    Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET.

    486 GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • C# and .NET Developer

    Jeffallan/claude-skills

    Guides C# work on .NET 8+: ASP.NET Core APIs, Entity Framework Core data access, Blazor apps and CQRS with MediatR, following a five-step build workflow.

    12k GitHub stars~1.3k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Aspnet Core

    fanslead/ReverseProxy.Store

    Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development.

    163 GitHub starsUsed in 2 repos~1.4k tokens
    Backend & APIsAuto-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

Categories

Questions about Create Blazor Project

What does Create Blazor Project do?

Create a new ASP.NET Core web application or web site using Blazor. Create Blazor Project is an agent skill from dotnet/skills, published by the product's own GitHub organization.NET Core web application or web site using Blazor.

When should I use Create Blazor Project?

Create Blazor Project fits situations like: : creating a new Blazor web app; scaffolding a new web project; starting a new web site; choosing render modes (Static SSR.

How do I install Create Blazor Project in Claude Code?

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

How do I install Create Blazor Project in Codex?

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

Can I use Create Blazor Project 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 create-blazor-project -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-blazor-project, .gemini/skills/create-blazor-project, .github/skills/create-blazor-project and .opencode/skills/create-blazor-project in your project.

What does Create Blazor Project need to run?

Going by SKILL.md and its folder, Create Blazor Project needs the command-line tools its instructions call (dotnet).

Does Create Blazor Project access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Create Blazor Project 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 Create Blazor Project use?

Create Blazor Project 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 Create Blazor Project use?

About 3k tokens (SKILL.md is roughly 12k 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 Create Blazor Project?

Skills that share tags, products or a category with Create Blazor Project: Chrome Devtools MCP (managedcode/dotnet-skills, 486 stars), Dotnet Csharp (novotnyllc/dotnet-artisan, 233 stars), Using Dotnet (novotnyllc/dotnet-artisan, 233 stars) and Aspnet Core (managedcode/dotnet-skills, 486 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create Blazor Project?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,568 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 7, 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.