webforms-migration

A guide for moving ASP.NET Web Forms applications to Blazor Server using the BlazorWebFormsComponents library. Web Forms is Microsoft's older server-rendered web framework; Blazor is its newer .NET web framework.

In plain words
What is it for?
Use it when migrating .aspx pages, .ascx user controls, .master layouts, event code, and data-bound controls to Blazor equivalents.
Why use it?
It explains how to convert pages, shared layouts, reusable controls, code-behind files, and data-binding patterns without redesigning every control from scratch.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fritzandfriends/blazorwebformscomponents/webforms-migration
Any agent
npx skills add FritzAndFriends/BlazorWebFormsComponents --skill webforms-migration
Clone the repo
git clone --depth 1 https://github.com/FritzAndFriends/BlazorWebFormsComponents

Made for: Claude Code, Codex.

Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,217 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00063 $0.07217
Opus 5 $0.00032 $0.03608
Sonnet 5 $0.00013 $0.01443
Haiku 4.5 $0.00006 $0.00722

Measured 2d ago against content hash c4d6eaa7722c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

webforms-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/webforms-migration/SKILL.md · 754 lines

How it starts

The opening of the file, as written. The whole thing — 754 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Web Forms → Blazor Migration Skill

This skill provides complete transformation rules for migrating ASP.NET Web Forms applications to Blazor Server using the BlazorWebFormsComponents (BWFC) NuGet package. The BWFC library provides Blazor components with identical names, attributes, and HTML output to ASP.NET Web Forms controls — enabling migration with minimal markup changes.

Core Principle

Strip asp: and runat="server", keep everything else, and it just works.

BWFC components match Web Forms control names, property names, and rendered HTML. A well-structured Web Forms page can often be migrated by removing the asp: prefix, removing runat="server", and making a small set of structural adjustments.


Migration Recipe (Step-by-Step)

Step 1: Create Blazor Server Project

dotnet new blazor -n MyBlazorApp --interactivity Server
cd MyBlazorApp
dotnet add package Fritz.BlazorWebFormsComponents

Step 2: Configure _Imports.razor

Add these to the project-level _Imports.razor:

@using BlazorWebFormsComponents
@using BlazorWebFormsComponents.Enums

Step 3: Register BWFC Services

In Program.cs:

builder.Services.AddBlazorWebFormsComponents();

Step 3b: Configure Static Asset Middleware

In Program.cs, use MapStaticAssets() (not UseStaticFiles()) to serve both wwwroot/ content AND _framework/blazor.web.js:

app.MapStaticAssets();   // Required for _framework/blazor.web.js in .NET 9+
app.UseAntiforgery();

⚠️ CRITICAL: Using app.UseStaticFiles() alone will NOT serve _framework/blazor.web.js in .NET 9+, which means the Blazor runtime never loads and NO interactivity works on any page.

Step 3c: Add launchSettings.json

Create Properties/launchSettings.json so dotnet run uses Development mode (required for MapStaticAssets() to resolve framework files during development):

{
  "profiles": {
    "MyBlazorApp": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

Read the full file on GitHub · 754 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 754 lines · 63 tokens per session scan A c4d6eaa7722c

Subscribe to this mod's changes

webforms-migration is a skill published in the GitHub repository FritzAndFriends/BlazorWebFormsComponents (449 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 7,217 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

lumeo

Use when building or editing a Blazor UI that uses the Lumeo component library (the Lumeo NuGet package and its satellites Lumeo.Charts / Lumeo.DataGrid / Lumeo.Editor / Lumeo.Scheduler / Lumeo.Gantt / Lumeo.Motion), or when the user mentions Lumeo components (Button, DataGrid, Sheet, Dialog, Tabs, DatePicker, Toast…

Brain2k-0005/Lumeo · 125 tokens

sync-repos

Synchronize external repositories used by PKMDS-Blazor. Use when asked to sync, get latest, refresh related repos, inspect upstream changes, or prepare work that depends on current PKHeX, PokeAPI, Pokemon Showdown, sprites, or plugin sources.

codemonkey85/PKMDS-Blazor · 58 tokens

address-pr-feedback

Address unresolved GitHub pull request review feedback in PKMDS-Blazor. Use when asked to handle PR comments, review threads, requested changes, or reviewer follow-up.

codemonkey85/PKMDS-Blazor · 38 tokens

implement-issue

Implement a PKMDS-Blazor GitHub issue end to end. Use when asked to investigate and implement an issue, bug, feature request, or feature-parity item and prepare it for review.

codemonkey85/PKMDS-Blazor · 44 tokens

blazorbindings-maui-third-party

Integrate third-party .NET MAUI control libraries into BlazorBindings.Maui apps by generating Razor wrappers, registering attached properties, and bridging to native elements for imperative APIs such as popups or bottom sheets. Use when adding, updating, or troubleshooting a MAUI control package in a…

Dreamescaper/BlazorBindings.Maui · 85 tokens

csharp-dotnet

Use when writing, reviewing, testing, or shipping C# / .NET code — ASP.NET Core APIs (minimal APIs vs controllers), EF Core data access, async correctness, solution layout in .cs/.csproj/.sln. NOT a Java/Spring backend (that is spring-boot), NOT a Node/TypeScript backend (that is nestjs), NOT framework-neutral REST…

ericrisco/rsc-harness · 89 tokens