blazor-conventions

Installation
SKILL.md

Blazor Development Conventions

Apply these practices when writing, reviewing, or refactoring Blazor applications.

Code Style and Structure

  • Write idiomatic Blazor and C# code that follows established .NET conventions
  • Use Razor Components (.razor files) for all component-based UI
  • For complex components with injected services or significant logic, use the code-behind with @inherits pattern: define a base class (e.g., DeviceDetailsBase : NexusPageComponentBase) and reference it with @inherits DeviceDetailsBase in the .razor file
  • Keep small, presentational components inline with @code { } blocks
  • Create custom base components for shared concerns across pages — e.g., a PageComponentBase that provides common injections (NavigationManager, AuthenticationState, ISnackbar) and helper methods (IsAuthenticatedAsync(), RedirectToLogin())
  • Use async/await for all non-blocking UI operations — never block on Task.Result or .Wait() inside components, as this deadlocks the synchronization context

Naming Conventions

Installs
2
GitHub Stars
3
First Seen
Mar 26, 2026
blazor-conventions — atc-net/atc-agentic-toolkit