author-component

author-component is a skill for Claude Code, Codex from managedcode/dotnet-skills. It costs 148 tokens per session (831 once invoked), scanned A, a copy of author-component, MIT.

A guide to creating and reviewing Blazor components, which are reusable pieces of a web interface written in C#. It covers inputs, events, templates, lifecycle methods, and cleanup.

In plain words
What is it for?
Use it to build reusable .razor components, pass values and events, add templates or generics, manage lifecycle work, and clean up timers or subscriptions.
Why use it?
It helps keep data flowing predictably between components and prevents common mistakes with parameters, repeated content, subscriptions, and asynchronous work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build reusable .razor components, pass values and events, add templates or generics, manage lifecycle work, and clean up timers or subscriptions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/managedcode/dotnet-skills/author-component
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add managedcode/dotnet-skills --skill author-component
Clone the repo
git clone --depth 1 https://github.com/managedcode/dotnet-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for author-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/managedcode/dotnet-skills/author-component/github.svg)](https://agentmods.dev/skills/managedcode/dotnet-skills/author-component)
Your own site
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/author-component"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/author-component/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for author-component

Your own site · 80×15
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/author-component"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/author-component.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 148 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 831 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00148 $0.00831
Opus 5.5 $0.00059 $0.00332
Sonnet 5.5 $0.00030 $0.00166
Haiku 4.5 $0.00015 $0.00083

Measured 2mo ago against content hash dd019cae755a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

author-component scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to author-component — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

catalog/Frameworks/Official-DotNet-Blazor/skills/author-component/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Author Blazor Component

Core Rules

  • Data flows down via [Parameter]. Events flow up via EventCallback<T> (never Action/Func).
  • Never mutate [Parameter] properties. Copy to a private field in OnParametersSet.
  • Use [Parameter] public T Prop { get; set; } — never required or init (causes BL0007).
  • Use [EditorRequired] for required parameters.
  • Handle all states: loading, empty, loaded, error — each with @if/@else.
  • Use @key on repeated elements in loops for efficient diffing.
  • Use IReadOnlyList<T> (not IEnumerable<T>) for collection parameters.

RenderFragment & Generics

[Parameter] public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment<TItem>? RowTemplate { get; set; }  // generic template

Use @typeparam TItem for generic components.

File Patterns

  • Single-file: .razor with @code block when logic < ~50 lines.
  • Code-behind: .razor + .razor.cs with partial class when logic > ~50 lines.

Disposal

Implement IAsyncDisposable (not IDisposable) when the component owns subscriptions, timers, or CTS. In DisposeAsync: unsubscribe (-=), cancel CTS, dispose resources. Never call StateHasChanged.

Async Patterns

  • await every async operation. Never use .Result, .Wait(), Task.Run, ContinueWith, Thread.Start.
  • Debounce: Task.Delay + CancellationTokenSource. Cancel old CTS, create new, await delay, do work. Never use System.Threading.Timer or System.Timers.Timer.
  • Polling: Loop in OnInitializedAsync with await Task.Delay(interval, token) — stays on sync context.
  • External events (Action<T>): Use async void handler + await InvokeAsync(() => { state++; StateHasChanged(); }) + catch → DispatchExceptionAsync. Never _ = InvokeAsync(...).
  • Cancel CTS in DisposeAsync. Don't catch ObjectDisposedException — use CTS cancellation.

Don'ts

  • required/init on [Parameter] — runtime failure
  • Mutate [Parameter] — copy to private field in OnParametersSet
  • Action/Func for events — use EventCallback<T>
  • Task.Run/.Result/.Wait()/Timer for debounce — deadlock or thread-pool escape
  • Inline style attributes — use CSS classes or data-* attributes
  • catch { throw; } — use when guard or let exceptions propagate
  • Gold-plating: ARIA, wrapper divs, accessibility features not requested
  • _ = InvokeAsync(...) — swallows exceptions; use async void + DispatchExceptionAsync

Read the full file on GitHub · 66 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 66 lines · 148 tokens per session scan A dd019cae755a

Subscribe to this mod's changes

author-component is a skill published in the GitHub repository managedcode/dotnet-skills (527 stars, last pushed 16d ago), licensed MIT. It adds 148 tokens to every session and 831 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to author-component, differing in 0 lines, and is treated as a copy.

Related

author-component compared with skills from other repositories

author-component next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
author-componentmanagedcode/dotnet-skillsSkill52716d agoMITA148Claude Code, Codex
windbg-kernel-lock-deadlock-triagemicrosoft/win-dev-skillsSkill52113d agoMITA56Claude Code
fuzzy-selectingSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A25Claude Code, Codex
rust-developmentnavikt/copilotSkill65yesterdayMITA27Claude Code, Codex
spring-boot-scaffoldnavikt/copilotSkill65yesterdayMITA32Claude Code, Codex
tlc-discovertech-leads-club/agent-skillsSkill7.2k2d agononeA76Claude Code, Codex
repo-baseline-auditnavikt/copilotSkill65yesterdayMITA122Claude Code, Codex