
Reach for author-component when you're writing or reviewing a Blazor .razor component that doesn't touch JavaScript interop, forms, or HTTP fetching. The skill is opinionated in useful ways: data flows down through [Parameter] and events flow up through EventCallback<T> rather than Action or Func, and it tells you to copy parameters into a private field in OnParametersSet instead of mutating them. It also pushes IAsyncDisposable for anything holding subscriptions or CancellationTokenSources, and bans Task.Run, .Result, and System.Timers timers for debouncing in favor of Task.Delay with a cancelled CTS. The explicit list of don'ts (no required or init on parameters, no inline style attributes, no gold-plated ARIA wrappers) is the part I'd actually keep handy during reviews. The one caveat is that it deliberately defers to sibling skills for forms, prerendering, and cross-component state, so you'll be chaining it with others rather than relying on it alone.
$ npx -y skills add dotnet/skills --skill author-component --agent claude-codeInstalls into .claude/skills of the current project.
[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.Sponsors