add-blazor-module

Scaffold Blazor WebAssembly presentation modules with MVVM structure and DI registration.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/geobarteam/github-copilot-configs --skill add-blazor-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-blazor-module
Source: https://github.com/geobarteam/github-copilot-configs/tree/main/skills/add-blazor-module
Command: npx skills add https://github.com/geobarteam/github-copilot-configs --skill add-blazor-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a repeatable, opinionated scaffold and checklist for adding a new self-contained UI feature to a Blazor WebAssembly Presentation app so teams avoid inconsistent structure, missing DI registration, and scattered business logic.

Core Features & Use Cases

  • Module scaffolding: Creates a feature folder with Models, Pages, Services, and ViewModels following MVVM and colocated file organization.
  • ViewModel-first pattern: Enforces ViewModel interfaces, state change events, centralized error handling, and minimal code-behind.
  • Deployment-ready conventions: Guides DI registration, MudBlazor UI patterns, authorization attributes, form validation, and compile verification.
  • Use Case: Add a new CRUD-backed admin feature (e.g., Customer module) in a BackOffice Presentation app with consistent testing and DI wiring.

Quick Start

Scaffold a new Customer module under src/Host/MyApp/Presentation with Model, Pages, Services, and ViewModels following MVVM, add DI registrations for services and viewmodels, and run dotnet build to verify.

Frequently Asked Questions about add-blazor-module

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new Blazor WebAssembly module with MVVM structure?

To scaffold a Blazor WebAssembly module, create a feature folder containing Models, Pages, Services, and ViewModels. This enforces an MVVM structure with colocated files, ensuring consistent presentation layer organization for your new CRUD features.

What's the best way to add a CRUD feature folder in a Blazor Presentation app?

The best way to add a CRUD feature folder is applying an opinionated scaffold under src/Host/<App>/Presentation. This generates the required Models, Pages, Services, and ViewModels while enforcing DI registration and MudBlazor UI patterns for deployment-ready backoffice sections.

Why do I need to register ViewModels and Services in Dependency Injection for Blazor?

You need Dependency Injection registration to wire up ViewModel interfaces and Services correctly in Blazor. This deployment-ready convention ensures state change events and centralized error handling function properly, preventing scattered business logic across your presentation modules.

Does scaffolding a Blazor module include compile verification?

Yes, scaffolding a Blazor module includes compile verification by running dotnet build. This step validates that the newly created Models, Pages, Services, ViewModels, and DI registrations are correctly wired and free of compilation errors.

When do I need a self-contained Blazor presentation module?

You need a self-contained Blazor presentation module when adding isolated feature areas like a Customer admin section. This approach packages all Models, Pages, Services, and ViewModels together to prevent inconsistent structure and scattered business logic in large applications.