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.zipInstalls 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.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
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
- HTML Output Matching Guide - How to ensure Blazor components render identical HTML to Web Forms controls
Quick Reference
Creating a New Component
- Identify the Web Forms control from
System.Web.UI.WebControls - Research the HTML output using the HTML Output Matching Guide
- Create component files:
src/BlazorWebFormsComponents/{ComponentName}.razorsrc/BlazorWebFormsComponents/{ComponentName}.razor.cs
- Inherit from appropriate base class:
BaseWebFormsComponent- Basic componentsBaseStyledComponent- Components with stylingDataBoundComponent<T>- Data-bound components
- Add unit tests in
src/BlazorWebFormsComponents.Test/{ComponentName}/ - Add sample page in
samples/AfterBlazorServerSide/Components/Pages/ControlSamples/{ComponentName}/ - Add integration tests using Playwright in
samples/AfterBlazorServerSide.Tests/ - Create documentation in
docs/{Category}/{ComponentName}.md - Update navigation:
- Add to
samples/AfterBlazorServerSide/Components/Layout/NavMenu.razor(TreeView) - Add to
samples/AfterBlazorServerSide/Components/Pages/ComponentList.razor(home page catalog) - Update
mkdocs.ymlandREADME.md
- Add to
Base Class Selection
| Base Class | Use When |
|---|---|
BaseWebFormsComponent | Simple components without styling (Literal, PlaceHolder) |
BaseStyledComponent | Components with visual styling (Label, Panel, Button) |
ButtonBaseComponent | Button-like components (Button, LinkButton, ImageButton) |
DataBoundComponent<T> | Components binding to collections (Repeater, GridView) |
BaseValidator | Validation controls |
Property Naming Convention
Match Web Forms property names exactly:
TextnotLabelorContentCssClassnotClassorClassNameNavigateUrlnotHreforUrlImageUrlnotSrcorSource
Event Naming Convention
Prefix with On:
OnClickfor click eventsOnCommandfor command eventsOnSelectedIndexChangedfor selection changesOnDataBindingfor data binding events
Integration Testing Requirements
Every component must have integration tests in samples/AfterBlazorServerSide.Tests/ using Playwright:
-
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
- Add route to the appropriate
-
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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| component-development (this skill) | 1 | 4mo | Review | Intermediate |
| add-feature | 0 | 4mo | Review | Advanced |
| functional-testing | 0 | 2mo | Review | Intermediate |
| frontend-mobile-development-component-scaffold | 1 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by FritzAndFriends
View all by FritzAndFriends →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
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.
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
scaffold-feature
niklasbrandt
Scaffold a complete full-stack feature: FastAPI endpoint, dashboard Web Component, i18n keys, test stubs, and documentation checks.
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
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: