一键导入
blazor-ui-conventions
Apply Blazor and MudBlazor v9 conventions for render modes, dialogs, HAL-driven actions, theming, and component communication.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Apply Blazor and MudBlazor v9 conventions for render modes, dialogs, HAL-driven actions, theming, and component communication.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run the canonical build plus all nine per-project test commands from docs/TESTING.md. Never uses solution-level dotnet test.
Create or re-baseline lean, repository-grounded implementation plans and persistent dev docs when users ask for an implementation plan, technical plan, feature plan, refactor plan, or dev-docs workstream.
Senior CTO review workflow for repository-grounded implementation-plan workstreams used before coding.
Apply project EF Core conventions for repositories, DbContext setup, query filters, migrations, and seeded lookup data.
Create a self-contained HTML artifact focused on a high-quality SVG architecture or system diagram with minimal supporting prose.
Create a pragmatic self-contained HTML plan that organizes the user's plan content visually without expanding the scope unnecessarily.
| name | blazor-ui-conventions |
| description | Apply Blazor and MudBlazor v9 conventions for render modes, dialogs, HAL-driven actions, theming, and component communication. |
| type | pattern |
| enforcement | suggest |
| priority | high |
Use this skill when editing Razor components, Blazor client code, dialogs, render-mode interactions, or shared UI wrappers. It keeps the client aligned with MudBlazor v9, HAL affordances, and the design-token system.
**/*.razor, **/*.razor.cs, Explore.Blazor.Client/**/*.cs, Explore.Blazor/**/*.cs.blazor-component-affordance, add-hal-link.InteractiveAuto, so HttpContext must not be used in InteractiveAuto or WASM execution paths.ShowAsync<T>(), ShowMessageBoxAsync, CloseAsync, <CustomContent> for MudFileUpload, unified Palette, and IConverter<TInput,TOutput>._links is the single source of truth for action affordances, so edit or delete buttons are gated by link presence rather than role or claim inspection.[Parameter] and EventCallback, and immutable Range<T> or DateRange values are replaced rather than mutated.Explore.Blazor.Client/Components/Common/ instead of ad hoc component styling.HttpContext in InteractiveAuto or WASM code paths causes runtime failures when the component executes outside the server request pipeline._links drifts from the API authorization contract.Show<T>(), ShowMessageBox, or <ActivatorContent> in file uploads causes v9 migration breakage.Elevation > 2 for ordinary content cards fights the project visual system and makes wrappers inconsistent.@if (EventDto.HasHalLink("edit"))
{
<AppButton Variant="Variant.Filled" OnClick="OpenEditDialogAsync">
Edit
</AppButton>
}
@code {
[Parameter] public EventListItemDto EventDto { get; set; } = default!;
private Task OpenEditDialogAsync() => Task.CompletedTask;
}
public sealed class EventActions(IDialogService dialogService)
{
public async Task OpenAsync(Guid eventId)
{
var parameters = new DialogParameters<EditEventDialog>
{
{ x => x.EventId, eventId }
};
IDialogReference dialog = await dialogService.ShowAsync<EditEventDialog>(
"Edit event",
parameters);
await dialog.Result;
}
}
dotnet test --project Event.Architecture.Tests/Event.Architecture.Tests.csproj --configuration Release --verbosity quiet --filter FullyQualifiedName~Event.Architecture.Tests.BlazorClientArchitectureTestsdotnet test --project Explore.Blazor.Client.Tests/Explore.Blazor.Client.Tests.csproj --configuration Release --verbosity quietdotnet test --project Explore.Blazor.IntegrationTests/Explore.Blazor.IntegrationTests.csproj --configuration Release --verbosity quiet