Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dotnet/author-component
Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable, CancellationToken, CSS isolation, code-behind. DO NOT USE FOR: creating new projects (use create-blazor-project), JavaScript interop or calling browser APIs from Blazor (use use-js-inter
Passed 22 of 22 test cases with the skill, and 14 of 22 without it.
and 10 more in the full report
8 fixed14 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
I need a Blazor component for a live search box with auto-complete. It should delay triggering the backend query while the user is actively typing to avoid flooding the server, support passing in the list of results, raise an event when an item is selected, and handle background resource cleanup properly when removed from the page.
| Checked | Without skill | With skill |
|---|---|---|
| Component implements IAsyncDisposable rather than IDisposable | Missed | Passed |
| Results collection parameter uses IReadOnlyList<T> instead of IEnumerable<T> | Missed | Passed |
| Repeated rendering elements inside loops use the @key attribute | Missed | Passed |
The instructions your model reads when the skill loads.
[Parameter]. Events flow up via EventCallback<T> (never Action/Func).[Parameter] properties. Copy to a private field in OnParametersSet.[Parameter] public T Prop { get; set; } — never required or init (causes BL0007).[EditorRequired] for required parameters.@if/@else.@key on repeated elements in loops for efficient diffing.IReadOnlyList<T> (not IEnumerable<T>) for collection parameters.[Parameter] public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment<TItem>? RowTemplate { get; set; } // generic template
Use @typeparam TItem for generic components.
.razor with @code block when logic < ~50 lines..razor + .razor.cs with partial class when logic > ~50 lines.Implement IAsyncDisposable (not IDisposable) when the component owns subscriptions, timers, or CTS.
In DisposeAsync: unsubscribe (-=), cancel CTS, dispose resources. Never call StateHasChanged.
await every async operation. Never use .Result, .Wait(), Task.Run, ContinueWith, Thread.Start.Task.Delay + CancellationTokenSource. Cancel old CTS, create new, await delay, do work. Never use System.Threading.Timer or System.Timers.Timer.OnInitializedAsync with await Task.Delay(interval, token) — stays on sync context.Action<T>): Use async void handler + await InvokeAsync(() => { state++; StateHasChanged(); }) + catch → DispatchExceptionAsync. Never _ = InvokeAsync(...).DisposeAsync. Don't catch ObjectDisposedException — use CTS cancellation.test cases passed, vs 14 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.