Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计通过

blazor-expert开拓者专家

Agent Skill

blazor-expert 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

10,114

周安装

430

GitHub Stars

15

下载量

3,543
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:blazor-expert(开拓者专家)
来源仓库:https://github.com/markpitt/claude-skills
仓库路径:skills/blazor-expert
安装命令:
npx skills add https://github.com/markpitt/claude-skills --skill blazor-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/markpitt/claude-skills --skill blazor-expert

简介

blazor-expert 作为 Blazor 开发专家,提供组件、状态与路由管理指导。

  • 适用于复杂应用架构设计与性能优化决策支持场景。
  • 涵盖生命周期事件、数据绑定、懒加载与 Suspense 边界处理。
  • 提供 xUnit + bUnit 测试框架集成建议与 FluentAssertions 用法。
  • 使用前请确认项目采用 React 19+ 与 TypeScript 类型安全实践。

SKILL.md

Blazor Expert - Orchestration Hub

Expert-level guidance for developing applications with Blazor, Microsoft's framework for building interactive web UIs using C# instead of JavaScript.

Quick Reference: When to Load Which Resource

TaskLoad ResourceKey Topics
Build components, handle lifecycle eventscomponents-lifecycle.mdComponent structure, lifecycle methods, parameters, cascading values, RenderFragment composition
Manage component state, handle eventsstate-management-events.mdLocal state, EventCallback, data binding, cascading state, service-based state
Configure routes, navigate between pagesrouting-navigation.mdRoute parameters, constraints, navigation, NavLink, query strings, layouts
Build forms, validate user inputforms-validation.mdEditForm, input components, DataAnnotations validation, custom validators
Setup authentication & authorizationauthentication-authorization.mdAuth setup, AuthorizeView, Authorize attribute, policies, claims
Optimize performance, use JavaScript interopperformance-advanced.mdRendering optimization, virtualization, JS interop, lazy loading, WASM best practices

Orchestration Protocol

Phase 1: Task Analysis

Identify your primary objective:

  • UI Building → Load components-lifecycle.md
  • State Handling → Load state-management-events.md
  • Navigation → Load routing-navigation.md
  • Data Input → Load forms-validation.md
  • User Access → Load authentication-authorization.md
  • Speed/Efficiency → Load performance-advanced.md

Phase 2: Resource Loading

Open the recommended resource file(s) and search for your specific need using Ctrl+F. Each resource is organized by topic with working code examples.

Phase 3: Implementation & Validation

  • Follow code patterns from the resource
  • Adapt to your specific requirements
  • Test in appropriate hosting model (Server/WASM/Hybrid)
  • Review troubleshooting section if issues arise

Blazor Hosting Models Overview

Blazor Server

  • How: Runs on server via SignalR
  • Best For: Line-of-business apps, need full.NET runtime, small download size
  • Trade-offs: High latency, requires connection, server resource intensive

Blazor WebAssembly

  • How: Runs in browser via WebAssembly
  • Best For: PWAs, offline apps, no server dependency, client-heavy applications
  • Trade-offs: Large initial download, limited.NET APIs, slower cold start

Blazor Hybrid

  • How: Runs in MAUI/WPF/WinForms with Blazor UI
  • Best For: Cross-platform desktop/mobile apps
  • Trade-offs: Platform-specific considerations, additional dependencies

Decision: Choose based on deployment environment, offline requirements, and server constraints.

Common Implementation Workflows

Scenario 1: Build a Data-Entry Component

  1. Read components-lifecycle.md - Component structure section
  2. Read state-management-events.md - EventCallback pattern
  3. Read forms-validation.md - EditForm component
  4. Combine: Create component with parameters → capture user input → validate → notify parent

Scenario 2: Implement User Authentication & Protected Pages

  1. Read authentication-authorization.md - Setup section
  2. Read routing-navigation.md - Layouts section
  3. Read authentication-authorization.md - AuthorizeView section
  4. Combine: Configure auth → create login page → protect routes → check auth in components

Scenario 3: Build Interactive List with Search/Filter

  1. Read routing-navigation.md - Query strings section
  2. Read state-management-events.md - Data binding section
  3. Read performance-advanced.md - Virtualization section
  4. Combine: Capture search input → update URL query → fetch filtered data → virtualize if large

Scenario 4: Optimize Performance of Existing App

  1. Read performance-advanced.md - All sections
  2. Identify bottlenecks:

- Unnecessary renders? → ShouldRender override, @key directive - Large lists? → Virtualization - JS latency? → Module isolation pattern

  1. Apply targeted optimizations from resource

Key Blazor Concepts

Component Architecture

  • Components: Self-contained UI units with optional logic
  • Parameters: Inputs to components, enable reusability
  • Cascading Values: Share state with descendants without explicit parameters
  • Events: Child-to-parent communication via EventCallback
  • Layouts: Parent wrapper for consistent page structure

State Management

  • Local State: Component-specific fields and properties
  • Cascading Values: Share state to descendants
  • Services: Application-wide state via dependency injection
  • Event Binding: React to user interactions
  • Data Binding: Two-way synchronization with UI

Routing & Navigation

  • @page Directive: Make component routable
  • Route Parameters: Pass data via URL ({id:int})
  • Navigation: Programmatic navigation via NavigationManager
  • NavLink: UI component that highlights active route
  • Layouts: Wrap pages with common structure

Forms & Validation

  • EditForm: Form component with validation support
  • Input Components: Typed controls (InputText, InputNumber, etc.)
  • Validators: DataAnnotations attributes or custom logic
  • EventCallback: Notify parent of form changes
  • Messages: Display validation errors to user

Authentication & Authorization

  • Claims & Roles: Identify users and define access levels
  • Policies: Fine-grained authorization rules
  • Authorize Attribute: Protect pages from unauthorized access
  • AuthorizeView: Conditional rendering based on permissions
  • AuthenticationStateProvider: Get current user information

Performance Optimization

  • ShouldRender(): Prevent unnecessary re-renders
  • @key Directive: Help diffing algorithm match list items
  • Virtualization: Render only visible items in large lists
  • JS Interop: Call JavaScript from C# and vice versa
  • AOT/Trimming: Reduce WASM download size (production)

Best Practices Highlights

Component Design

Single Responsibility - Each component has one clear purpose ✅ Composition - Use RenderFragments for flexible layouts ✅ Parameter Clarity - Use descriptive names, mark required with [EditorRequired]Proper Disposal - Implement IDisposable to clean up resources ✅ Event-Based Communication - Use EventCallback for child-to-parent updates

State Management

EventCallback Over Action - Proper async handling ✅ Immutable Updates - Create new objects/collections, don't mutate ✅ Service-Based State - Use scoped services for shared state ✅ Unsubscribe from Events - Prevent memory leaks in Dispose ✅ InvokeAsync for Background Threads - Thread-safe state updates

Routing & Navigation

Route Constraints - Use :int, :guid, etc. to validate formats ✅ NavLink Component - Automatic active state highlighting ✅ forceLoad After Logout - Clear client-side state ✅ ReturnUrl Pattern - Redirect back after login ✅ Query Strings - Preserve filters/pagination across navigation

Forms & Validation

EditForm + DataAnnotationsValidator - Built-in validation ✅ ValidationMessage - Show field-level errors ✅ Custom Validators - Extend for complex rules ✅ Async Validation - Check server availability before submit ✅ Loading State - Disable submit button while processing

Authentication & Authorization

Server Validation - Never trust client-side checks alone ✅ Policies Over Roles - More flexible authorization rules ✅ Claims for Details - Store user attributes in claims ✅ Cascading AuthenticationState - Available in all components ✅ Error Boundaries - Graceful error handling

Performance

@key on Lists - Optimize item matching ✅ ShouldRender Override - Prevent unnecessary renders ✅ Virtualization for Large Lists - Only render visible items ✅ JS Module Isolation - Load and cache JS modules efficiently ✅ AOT for WASM - Production deployments

Common Troubleshooting

Component Not Re-rendering

  • Cause: Mutation instead of reassignment
  • Fix: Create new object/collection: items = items.Append(item).ToList()
  • Or: Call StateHasChanged() manually

Parameter Not Updating

  • Cause: Parent not re-rendering or same object reference
  • Fix: Parent must re-render, ensure new reference for objects
  • Debug: Check OnParametersSet is firing

JS Interop Errors

  • Cause: Called before script loaded or wrong function name
  • Fix: Use firstRender check, verify JS file path
  • Pattern: Use module isolation: await JS.InvokeAsync("import", "./script.js")

Authentication State Not Available

  • Cause: Cascading parameter not provided or timing issue
  • Fix: Ensure AuthenticationStateProvider configured
  • Pattern: Always null-check and use await AuthStateTask! in code block

Large List Performance Issues

  • Cause: Rendering all items in DOM
  • Fix: Use Virtualize component for 1000+ items
  • Alternative: Paginate with buttons/infinite scroll

Blazor Server Connection Issues

  • Cause: SignalR connection dropped or configuration issue
  • Fix: Implement reconnection UI, increase timeout
  • Config: Adjust CircuitOptions.DisconnectedCircuitRetentionPeriod

Resource Files Summary

components-lifecycle.md

Complete guide to component structure, lifecycle methods, parameters, cascading values, and composition patterns. Essential for understanding Blazor component fundamentals.

state-management-events.md

Comprehensive coverage of local and service-based state, event handling with EventCallback, data binding patterns, and component communication. Core for interactive UI building.

routing-navigation.md

Complete routing reference including route parameters, constraints, programmatic navigation, query strings, and layout management. Essential for multi-page apps.

forms-validation.md

Full forms API with EditForm component, input controls, DataAnnotations validation, custom validators, and form patterns. Required for data entry scenarios.

authentication-authorization.md

Complete auth setup for Server and WASM, AuthorizeView, policies, claims-based access control, and login/logout patterns. Necessary for secured applications.

performance-advanced.md

Performance optimization techniques including ShouldRender, virtualization, JavaScript interop patterns, lazy loading, and WASM best practices. Vital for production apps.


Implementation Approach

When implementing Blazor features:

  1. Identify Your Task - Match against the decision table above
  2. Load Relevant Resource - Read the appropriate.md file
  3. Find Code Example - Search resource for similar implementation
  4. Adapt to Your Context - Modify for your specific requirements
  5. Test Thoroughly - Verify in your hosting model
  6. Reference Troubleshooting - Consult resource if issues arise

Next Steps


Version: 2.0 - Modular Orchestration Pattern Last Updated: December 4, 2025 Status: Production Ready ✅

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.02%
按下载量换算993

OpenCode

23.9%
按下载量换算847

Gemini CLI

18.13%
按下载量换算642

Antigravity

12.55%
按下载量换算445

windsurf

7.55%
按下载量换算267

Codex

3.19%
按下载量换算113

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills