
Anyone with a Blazor Server app from .NET 6 or 7 who wants to move to .NET 8+ without guessing at the new hosting model will get the most out of this one. It walks through the actual swap: AddServerSideBlazor and MapBlazorHub become AddRazorComponents and MapRazorComponents, _Host.cshtml turns into an App.razor root, blazor.server.js becomes blazor.web.js, and CascadingAuthenticationState gets replaced by a service. It keeps InteractiveServer render mode so existing interactive behavior survives the move. The skill is explicit about what it won't touch, such as Blazor WebAssembly apps or anything already on the Blazor Web App model, which saves you from running it on the wrong project. My take: the Environment tag helper and prerendering details are where manual conversions usually go wrong, and the step-by-step coverage of those is the real value.
$ npx -y skills add dotnet/skills --skill convert-blazor-server-to-webapp --agent claude-codeInstalls into .claude/skills of the current project.
This skill helps an agent convert a pre-.NET 8 Blazor Server app into a .NET 8+ Blazor Web App. The old hosting model uses AddServerSideBlazor/MapBlazorHub with a _Host.cshtml Razor Page as the entry point. The new Blazor Web App model uses AddRazorComponents/MapRazorComponents with an App.razor root component, enabling per-component render modes, enhanced navigation, streaming rendering, and other .NET 8+ features. The converted app uses InteractiveServer render mode to preserve existing interactive behavior.
AddServerSideBlazor() and MapBlazorHub() in Program.cs (or Startup.cs)Pages/_Host.cshtml (or _Host.razor) as the host page with Component Tag HelpersSponsors