/dotnet-blazor:blazor-performancefrom dotnet-blazor
Optimizes Blazor applications with rendering optimizations, Virtualize component, lazy loading, caching strategies (output, Redis distributed, memory), and WASM size reduction via trimming or AOT.
Ships in dotnet-blazor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
@foreach (var item in Items)
{
<ItemCard @key="item.Id" Item="@item" />
}
private bool _shouldRender = true;
protected override bool ShouldRender() => _shouldRender;
<Virtualize Items="@_allItems" Context="item" ItemSize="50">
<ItemRow Item="@item" />
</Virtualize>
@* With item provider for server-side paging *@
<Virtualize ItemsProvider="LoadItems" Context="item">
<ItemRow Item="@item" />
</Virtualize>
@code {
private async ValueTask<ItemsProviderResult<ItemDto>> LoadItems(
ItemsProviderRequest request)
{
var result = await Service.GetPagedAsync(request.StartIndex, request.Count);
return new ItemsProviderResult<ItemDto>(result.Items, result.TotalCount);
}
}
@attribute [StreamRendering]
@if (_data is null)
{
<LoadingSpinner />
}
else
{
<DataDisplay Data="@_data" />
}
app.MapGet("/api/products", async (AppDbContext db) =>
await db.Products.AsNoTracking().ToListAsync())
.CacheOutput(policy => policy.Expire(TimeSpan.FromMinutes(5)).Tag("products"));
public sealed class CachedProductService(
IProductRepository repo,
IDistributedCache cache) : IProductService
{
public async Task<ProductDto?> GetByIdAsync(int id, CancellationToken ct)
{
var cacheKey = $"product:{id}";
var cached = await cache.GetStringAsync(cacheKey, ct);
if (cached is not null)
return JsonSerializer.Deserialize<ProductDto>(cached);
var product = await repo.GetByIdAsync(id, ct);
if (product is not null)
{
await cache.SetStringAsync(cacheKey,
JsonSerializer.Serialize(product),
new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(10) },
ct);
}
return product;
}
}
@inject IMemoryCache Cache
@code {
protected override async Task OnInitializedAsync()
{
_categories = await Cache.GetOrCreateAsync("categories", async entry =>
{
entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1);
return await CategoryService.GetAllAsync();
});
}
}
<PublishTrimmed>true</PublishTrimmed><RunAOTCompilation>true</RunAOTCompilation>CircuitOptions.DisconnectedCircuitRetentionPeriod@rendermode InteractiveAuto for high-traffic pages to offload to WASMWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub thelobbi/claude --plugin dotnet-blazor19 skills in this plugin
/aspnet-core-apisASP.NET Core API development with minimal APIs, controllers, middleware, OpenAPI, and best practices/blazor-auth-securityAuthentication and authorization in Blazor with ASP.NET Core Identity, Entra ID, JWT, and policy-based auth/blazor-componentsBlazor component model including render modes, lifecycle, parameters, event handling, and component communicationOther plugins' skills for the same job