CO

component-development

This tool manages Blazor component creation by guiding developers through base class selection, property conventions, testing, and documentation.

Install

mkdir -p .claude/skills/component-development && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5680" && unzip -o skill.zip -d .claude/skills/component-development && rm skill.zip

Installs to .claude/skills/component-development

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Provides a step-by-step workflow for creating Blazor components that emulate ASP.NET Web Forms controls in the BlazorWebFormsComponents library. Covers base class selection (BaseWebFormsComponent, BaseStyledComponent, DataBoundComponent, BaseValidator), Web Forms property and event naming conventions, Playwright integration testing setup, and the complete checklist from component creation through documentation and navigation updates. Use when implementing a new BWFC component, choosing the correct base class for a control type, adding unit or integration tests, or extending an existing component with new Web Forms property support.
639 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Map Web Forms control properties to Blazor
  • Select base classes (e.g., BaseWebFormsComponent)
  • Automate integration test scaffolding with Playwright
  • Sync component rendering with HTML specifications
  • Bootstrap documentation and navigation entries

How it works

It follows a defined manual checklist workflow to generate component code matching the legacy System.Web.UI.WebControls API.

Inputs & outputs

You give it
Target Web Forms control name
You get back
Scaffolded Blazor component files and test stubs

When to use component-development

  • Create a new Blazor component from a Web Forms control
  • Choose the correct base class for a UI component
  • Setup integration tests using Playwright
  • Sync component HTML output with Web Forms

About this skill

Component Development Skill

This skill covers creating new Blazor components that emulate ASP.NET Web Forms controls.

Related Guides

Quick Reference

Creating a New Component

  1. Identify the Web Forms control from System.Web.UI.WebControls
  2. Research the HTML output using the HTML Output Matching Guide
  3. Create component files:
    • src/BlazorWebFormsComponents/{ComponentName}.razor
    • src/BlazorWebFormsComponents/{ComponentName}.razor.cs
  4. Inherit from appropriate base class:
    • BaseWebFormsComponent - Basic components
    • BaseStyledComponent - Components with styling
    • DataBoundComponent<T> - Data-bound components
  5. Add unit tests in src/BlazorWebFormsComponents.Test/{ComponentName}/
  6. Add sample page in samples/AfterBlazorServerSide/Components/Pages/ControlSamples/{ComponentName}/
  7. Add integration tests using Playwright in samples/AfterBlazorServerSide.Tests/
  8. Create documentation in docs/{Category}/{ComponentName}.md
  9. Update navigation:
    • Add to samples/AfterBlazorServerSide/Components/Layout/NavMenu.razor (TreeView)
    • Add to samples/AfterBlazorServerSide/Components/Pages/ComponentList.razor (home page catalog)
    • Update mkdocs.yml and README.md

Base Class Selection

Base ClassUse When
BaseWebFormsComponentSimple components without styling (Literal, PlaceHolder)
BaseStyledComponentComponents with visual styling (Label, Panel, Button)
ButtonBaseComponentButton-like components (Button, LinkButton, ImageButton)
DataBoundComponent<T>Components binding to collections (Repeater, GridView)
BaseValidatorValidation controls

Property Naming Convention

Match Web Forms property names exactly:

  • Text not Label or Content
  • CssClass not Class or ClassName
  • NavigateUrl not Href or Url
  • ImageUrl not Src or Source

Event Naming Convention

Prefix with On:

  • OnClick for click events
  • OnCommand for command events
  • OnSelectedIndexChanged for selection changes
  • OnDataBinding for data binding events

Integration Testing Requirements

Every component must have integration tests in samples/AfterBlazorServerSide.Tests/ using Playwright:

  1. Page load test in ControlSampleTests.cs:

    • Add route to the appropriate [Theory] test (EditorControl, DataControl, etc.)
    • Verifies page loads without console errors or page errors
  2. Interactive test in InteractiveComponentTests.cs (for interactive components):

    • Test user interactions (clicks, input, selection changes)
    • Verify component responds correctly to user actions
    • Assert no console errors during interaction

Example page load test entry:

[Theory]
[InlineData("/ControlSamples/YourComponent")]
public async Task EditorControl_Loads_WithoutErrors(string path)

Example interactive test:

[Fact]
public async Task YourComponent_Interaction_Works()
{
    var page = await _fixture.NewPageAsync();
    try
    {
        await page.GotoAsync($"{_fixture.BaseUrl}/ControlSamples/YourComponent");
        // Test interactions...
        // Assert expected behavior...
    }
    finally
    {
        await page.CloseAsync();
    }
}

Run integration tests with:

dotnet test samples/AfterBlazorServerSide.Tests

When not to use it

  • Projects not requiring backward compatibility with Web Forms
  • Building greenfield applications with different design systems
  • Developers unfamiliar with Blazor component lifecycle

Prerequisites

Playwright installedBlazor development environment

Limitations

  • Does not automatically convert legacy C# event logic
  • Requires manual adjustments to match complex CSS/HTML outputs
  • Limited by the capability of the base classes provided

How it compares

It standardizes the emulation of legacy.NET UI controls specifically for Blazor migration paths.

Compared to similar skills

component-development side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
component-development (this skill)14moReviewIntermediate
add-feature04moReviewAdvanced
functional-testing02moReviewIntermediate
frontend-mobile-development-component-scaffold14moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

add-feature

adamint

Adds new features to the application including API endpoints, React pages, components, and curriculum content. USE FOR: implementing new features, adding API endpoints, creating React components, adding curriculum content, writing unit/API tests. DO NOT USE FOR: E2E browser tests (use add-e2e-tests

00

functional-testing

MarkMichaelis

Generate and maintain functional / integration / E2E tests that validate user-facing behavior. Explore first, test second. Verify before claiming success. Language-aware: C#/xUnit, PowerShell/Pester, TypeScript/Playwright, and generic support.

00

frontend-mobile-development-component-scaffold

sickn33

You are a React component architecture expert specializing in scaffolding production-ready, accessible, and performant components. Generate complete component implementations with TypeScript, tests, s

12

scaffold-feature

niklasbrandt

Scaffold a complete full-stack feature: FastAPI endpoint, dashboard Web Component, i18n keys, test stubs, and documentation checks.

00

vue

valibali

Use when editing .vue files, creating Vue 3 components, writing composables, or testing Vue code - provides Composition API patterns, props/emits best practices, VueUse integration, and reactive destructuring guidance

00

eslint

managedcode

Use ESLint in .NET repositories that ship JavaScript, TypeScript, React, or other Node-based frontend assets. USE FOR: the repo has package.json, eslint.config.*, .eslintrc*, tsconfig.json, or JS/TS/React frontend files; the user asks for JavaScript or TypeScript linting, React rule. DO NOT USE FOR:

00

Search skills

Search the agent skills registry