Claude Marketplaces
SkillsMCP serversMarketplacesPluginsDigestToolsAdvertise
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Plugins
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index
  • Plugin index

Site

  • About
  • Tools
  • Submit
  • Advertise
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
by Mert Düzgün
Skills/Frontend Development
dotnet avatar

Use Js Interop

dotnet/skillsOfficial

If you're wiring up JavaScript in a Blazor app and keep tripping over timing bugs or leaked module references, this one covers the parts that usually go wrong. It focuses on collocated .razor.js modules, initializing JS only in OnAfterRenderAsync so server prerendering doesn't break, merging consecutive .NET-to-JS calls into one round-trip, and wrapping IJSObjectReference lifecycle in a small IAsyncDisposable class. It also covers DotNetObjectReference callbacks, including the easy-to-miss rule that JSInvokable methods must be public. The batching advice is the part I'd pay closest attention to, since chatty interop is a common performance drag in Blazor Server. It's clearly scoped to JS interop, so pair it with author-component for general component work.

skills.sh installs
3.6K
GitHub stars
5.8K
last updated
Aug 1, 2026
View on GitHubSave

Install

$ npx -y skills add dotnet/skills --skill use-js-interop --agent claude-code

Installs into .claude/skills of the current project.

Files

JS Interop in Blazor

1. Collocated JS Modules

Always use collocated .razor.js files with export — never global window.* functions or <script> tags.

// ChartPanel.razor.js — placed next to ChartPanel.razor
export function initialize(canvas, dotNetRef) { /* ... */ }
export function updateData(points) { /* ... */ }
export function dispose() { /* ... */ }

Import paths: same project = "./Components/ChartPanel.razor.js", RCL = "./_content/{AssemblyName}/...".

2. Lifecycle Timing

All JS interop must happen in OnAfterRenderAsync or event handlers — never in OnInitialized, OnParametersSet, or constructors. JS is not available during server prerendering.

Use a typed interop wrapper (see Section 4) — never call InvokeAsync/InvokeVoidAsync with raw string literals:

private ChartInterop? _chart;

protected override async Task OnAfterRenderAsync(bool firstRender)
{
    if (firstRender)
    {
        _chart = new ChartInterop(JS);
        await _chart.InitializeAsync(_canvasRef);
    }
}

Parameter changes: set a flag in OnParametersSet, apply in OnAfterRenderAsync:

private bool _dataChanged;
SKILL.md on GitHub

Sponsors

This spot is openSlot 1$1,200/mo Advertise hereThis spot is openSlot 2$1,000/mo Advertise hereSnugSponsoredThe clipboard manager you and your agent can use, safelyknobsSponsoredSee your site on any phone, any day, in any languageAgent CaffeineSponsoredClose your lid, come back to finished workThis spot is openSlot 6$500/mo Advertise hereThis spot is openSlot 7$500/mo Advertise hereWaxSponsoredBlock anything with supervision, without erasing your iPhone

Details

Repository
github.com/dotnet/skills
Categories
Frontend Development, Backend & APIs, Git & Pull Requests, Code Review & Quality, Debugging, .NET & C#
License
MIT
First seen
Aug 2, 2026

More from dotnet/skills

All 102
  • Support Prerendering3.6K
  • Target Authoring3.5K
  • Setup Local Sdk3.5K
  • Migrate Xunit To Mstest3.5K
  • Configuring Opentelemetry Dotnet3.4K
  • Template Comparison3.4K
  • Create Datadriven Aspnetcore3.4K
  • Copy To Output Directory3.3K
  • Minimal Api File Upload2.3K
  • Msbuild Server1.5K
  • Mcp Csharp Create722
  • Mcp Csharp Test706
  • Mcp Csharp Publish650
  • Mcp Csharp Debug626
  • Dotnet Test Frameworks460
  • Exp Mock Usage Analysis
  • Exp Simd Vectorization
  • Exp Test Maintainability
  • Optimizing Ef Core Queries6.5K
  • Run Tests6.4K
  • Analyzing Dotnet Performance5.6K
  • Test Anti Patterns5.1K
  • Filter Syntax5.1K
  • Dotnet Webapi5K

Recommended

More Frontend Development
1dotnet avatarsupport-prerenderingdotnet/skillsMake interactive Blazor components work correctly with prerendering. USE FOR fixing duplicate data loads, UI flicker during prerender-to-interactive handoff, nu3.6Kskills.sh installs
2nexu-io avatardesign-briefnexu-io/open-designParse a structured design brief written in I-Lang protocol format into a concrete design spec. Eliminates ambiguity from vague requests like "make it profession3.5Kskills.sh installs
3google-deepmind avatarliterature-search-arxivgoogle-deepmind/science-skillsSearch for scientific papers, preprints, and publications on arXiv. Extract metadata, abstracts, and download full-text PDFs or HTML versions of papers. Use whe3.5Kskills.sh installs
4avdlee avatarxcode-compilation-analyzeravdlee/xcode-build-optimization-agent-skillAnalyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optim3.5Kskills.sh installs
5actionbook avatarm14-mental-modelactionbook/rust-skillsUse when learning Rust concepts. Keywords: mental model, how to think about ownership, understanding borrow checker, visualizing memory layout, analogy, misconc3.5Kskills.sh installs
6bencium avatarhuman-architect-mindsetbencium/bencium-marketplaceSystematic architectural thinking for irreplaceable human capabilities - domain modeling, systems thinking, constraint navigation, and AI-aware problem decompos3.4Kskills.sh installs