Use JS Interop
dotnet/skills
Add, review, or fix JavaScript interop in Blazor components.
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices.
$ npx skills add managedcode/dotnet-skills --skill blazor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install managedcode/dotnet-skills blazor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/managedcode/dotnet-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/catalog/Frameworks/Blazor/skills/blazor .claude/skills/blazor && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "blazor" agent skill from https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/Blazor/skills/blazor into .claude/skills/blazor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blazor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/Blazor/skills/blazorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add managedcode/dotnet-skills --skill blazor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install managedcode/dotnet-skills blazor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/managedcode/dotnet-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/catalog/Frameworks/Blazor/skills/blazor .agents/skills/blazor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "blazor" agent skill from https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/Blazor/skills/blazor into .agents/skills/blazor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blazor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add managedcode/dotnet-skills --skill blazor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install managedcode/dotnet-skills blazor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/managedcode/dotnet-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/catalog/Frameworks/Blazor/skills/blazor .cursor/skills/blazor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "blazor" agent skill from https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/Blazor/skills/blazor into .cursor/skills/blazor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blazor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/managedcode/dotnet-skills.git --path catalog/Frameworks/Blazor/skills/blazor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add managedcode/dotnet-skills --skill blazor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install managedcode/dotnet-skills blazor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/managedcode/dotnet-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/catalog/Frameworks/Blazor/skills/blazor .gemini/skills/blazor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "blazor" agent skill from https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/Blazor/skills/blazor into .gemini/skills/blazor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blazor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install managedcode/dotnet-skills blazorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add managedcode/dotnet-skills --skill blazor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/managedcode/dotnet-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/catalog/Frameworks/Blazor/skills/blazor .github/skills/blazor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "blazor" agent skill from https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/Blazor/skills/blazor into .github/skills/blazor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blazor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add managedcode/dotnet-skills --skill blazor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install managedcode/dotnet-skills blazor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/managedcode/dotnet-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/catalog/Frameworks/Blazor/skills/blazor .opencode/skills/blazor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "blazor" agent skill from https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/Blazor/skills/blazor into .opencode/skills/blazor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blazor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
blazorBuild and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices.
Blazor is an agent skill from managedcode/dotnet-skills. Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices. USE FOR: building interactive web UIs with C instead of JavaScript; choosing between Server, WebAssembly, or Auto render modes; designing component hierarchies and state. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build…
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `manifest.json`, `references/anti-patterns.md` and `references/patterns.md`). Compatibility notes: Requires Blazor project (.NET 6+, preferably .NET 8+ for unified model).
It sits in Agent Workflows, covering Codebase knowledge for agents. It works with Blazor, JavaScript, WebAssembly and C#. The repository describes itself as: Installable .NET skill catalog and CLI for Codex, Claude Code, GitHub Copilot, and Gemini. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 535dd55. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are razor, csharp and javascript).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
learn.microsoft.commanaged-code.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Requires Blazor project (.NET 6+, preferably .NET 8+ for unified model).
From compatibility in the SKILL.md frontmatter.
Blazor loads about 2.1k tokens when it runs, and up to ~9.6k if it reads all its reference files. Until then it costs about 145 tokens; SKILL.md has 457 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from managedcode/dotnet-skills at commit 535dd55, republished under its MIT licence (© managedcode). 457 words, ~2,099 tokens.
.claude/skills/blazor/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.| Mode | Where It Runs | Best For |
|---|---|---|
Static | Server (no interactivity) | SEO pages, marketing content |
InteractiveServer | Server via SignalR | Real-time apps, thin clients |
InteractiveWebAssembly | Browser via WASM | Offline-capable, client-heavy |
InteractiveAuto | Server first, then WASM | Best of both worlds |
@* Per-component *@
@rendermode InteractiveServer
@* Or in App.razor for global *@
<Routes @rendermode="InteractiveAuto" />First Request:
Browser → Server (Interactive Server) → Fast response
Subsequent Requests:
Browser → WASM (downloaded in background) → No server neededChoose render mode based on requirements:
Design components for reusability:
Handle state correctly:
[PersistentState]Validate in both environments (for Auto mode)
dotnet/aspnetcore v10.0.11 as servicing. It fixes restoration of expired client-persisted circuit state; re-run reconnect, persisted-state expiry, render-mode, and interactive-auto client/server split tests when upgrading.@* Counter.razor *@
<button @onclick="IncrementCount">
Clicked @count times
</button>
@code {
private int count = 0;
[Parameter]
public int InitialCount { get; set; } = 0;
protected override void OnInitialized()
{
count = InitialCount;
}
private void IncrementCount() => count++;
}@* Parent.razor *@
<ChildComponent Value="@value" ValueChanged="@OnValueChanged" />
@* ChildComponent.razor *@
@code {
[Parameter] public string Value { get; set; } = "";
[Parameter] public EventCallback<string> ValueChanged { get; set; }
private async Task UpdateValue(string newValue)
{
await ValueChanged.InvokeAsync(newValue);
}
}@* Prevents double-fetch during prerender + hydration *@
@code {
[PersistentState]
public List<Product> Products { get; set; } = [];
protected override async Task OnInitializedAsync()
{
// Only fetches once, persisted across prerender
Products ??= await Http.GetFromJsonAsync<List<Product>>("api/products");
}
}// Shared interface
public interface IProductService
{
Task<List<Product>> GetProductsAsync();
}
// Server implementation (direct DB access)
public class ServerProductService : IProductService
{
private readonly AppDbContext _db;
public async Task<List<Product>> GetProductsAsync()
=> await _db.Products.ToListAsync();
}
// Client implementation (HTTP call)
public class ClientProductService : IProductService
{
private readonly HttpClient _http;
public async Task<List<Product>> GetProductsAsync()
=> await _http.GetFromJsonAsync<List<Product>>("api/products");
}
// Registration
// Server: builder.Services.AddScoped<IProductService, ServerProductService>();
// Client: builder.Services.AddScoped<IProductService, ClientProductService>();| Anti-Pattern | Why It's Bad | Better Approach |
|---|---|---|
| Large components | Hard to maintain, slow renders | Split into smaller components |
| Direct DB access in WASM | No DB in browser | Use HTTP API |
Ignoring ShouldRender | Unnecessary re-renders | Override when needed |
| Sync JS interop in Server | Blocks SignalR circuit | Use IJSRuntime async |
| No error boundaries | One error crashes app | Use <ErrorBoundary> |
| Forgetting prerender state | Double API calls | Use [PersistentState] |
Virtualize large lists:
<Virtualize Items="@products" Context="product">
<ProductCard Product="@product" />
</Virtualize>Use @key for list diffing:
@foreach (var item in items)
{
<ItemComponent @key="item.Id" Item="@item" />
}Debounce rapid events:
private Timer? _debounceTimer;
private void OnInput(ChangeEventArgs e)
{
_debounceTimer?.Dispose();
_debounceTimer = new Timer(_ => InvokeAsync(DoSearch), null, 300, Timeout.Infinite);
}Lazy load assemblies (WASM):
var assemblies = await LazyAssemblyLoader
.LoadAssembliesAsync(["MyHeavyFeature.wasm"]);@inject IJSRuntime JS
await JS.InvokeVoidAsync("alert", "Hello from Blazor!");
var result = await JS.InvokeAsync<string>("prompt", "Enter name:");[JSInvokable]
public static string GetMessage() => "Hello from C#!";DotNet.invokeMethodAsync('MyAssembly', 'GetMessage')
.then(result => console.log(result));© managedcode, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (references) in catalog/Frameworks/Blazor/skills/blazor of managedcode/dotnet-skills.
Open the folder on GitHubat commit 535dd55
Blazor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Blazor this skillmanagedcode/dotnet-skills | 486 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Use JS Interopdotnet/skills | 5.6k | 1 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Use Igniteui Blazordotnet/skills | 5.6k | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Test Firstdeanhume/html-minifier | 142 | — | ~876 | Automated safety check: Pass | MIT | |
| Okojo Node Ink Debugakeit0/okojo | 160 | — | ~798 | Automated safety check: Pass | MIT | |
| Maui Hot Reload Diagnosticsdavidortinau/maui-skills | 174 | — | ~1.3k | Automated safety check: Pass | MIT |
dotnet/skills
Add, review, or fix JavaScript interop in Blazor components.
dotnet/skills
Add, configure, or review Ignite UI for Blazor Lite component support in Blazor applications.
deanhume/html-minifier
Enforces a strict test-driven development (TDD) workflow for the HTML Minifier repo.
akeit0/okojo
Debug Okojo.Node large-app failures through sandbox/OkojoInkProbe and sandbox/OkojoNodeDebugSandbox.
davidortinau/maui-skills
Diagnose and troubleshoot .NET MAUI Hot Reload issues (C Hot Reload, XAML Hot Reload, Blazor Hybrid).
akeit0/okojo
Run and continue Okojo Test262 compliance work. An agent skill from akeit0/okojo.
managedcode/dotnet-skills
Use a repo-root .editorconfig to configure free .NET analyzer and style rules.
managedcode/dotnet-skills
Use the open-source free ArchUnitNET library for architecture rules in .NET tests.
managedcode/dotnet-skills
Build, upgrade, and operate Aspire 13.5.x C or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing, MCP, and deployment patterns for…
managedcode/dotnet-skills
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET.
managedcode/dotnet-skills
Use the open-source free Asynkron.Profiler dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts.
managedcode/dotnet-skills
Build, review, or migrate Azure Functions in .NET with correct execution model, isolated worker setup, bindings, DI, and Durable Functions patterns.
Works with
Categories
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices. Blazor is an agent skill from managedcode/dotnet-skills. Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices.
Blazor fits situations like: : building interactive web UIs with C instead of JavaScript; choosing between Server; auto render modes; designing component hierarchies and state.
Run `npx skills add managedcode/dotnet-skills --skill blazor -a claude-code`. Or copy the skill folder (catalog/Frameworks/Blazor/skills/blazor in managedcode/dotnet-skills) into .claude/skills/blazor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add managedcode/dotnet-skills --skill blazor -a codex`. Or copy the skill folder (catalog/Frameworks/Blazor/skills/blazor in managedcode/dotnet-skills) into .agents/skills/blazor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add managedcode/dotnet-skills --skill blazor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/blazor, .gemini/skills/blazor, .github/skills/blazor and .opencode/skills/blazor in your project.
SKILL.md names no scripts, command-line tools or credentials: Blazor is instructions for the agent only. Compatibility (from SKILL.md): Requires Blazor project (.NET 6+, preferably .NET 8+ for unified model)..
SKILL.md names 2 domains. As links in the text: learn.microsoft.com and managed-code.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Blazor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Blazor: Use JS Interop (dotnet/skills, 5.6k stars), Use Igniteui Blazor (dotnet/skills, 5.6k stars), Test First (deanhume/html-minifier, 142 stars) and Okojo Node Ink Debug (akeit0/okojo, 160 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
managedcode (a GitHub organization) maintains it in managedcode/dotnet-skills, which has 486 GitHub stars. The repository holds 81 skills in this directory. The repository was last updated on October 7, 2026.
Source: managedcode/dotnet-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.