umbrella-blazor-register-nav-item
Automatically adds navigation items to the Blazor NavMenu, correctly scoped within policy blocks.
Install
mkdir -p .claude/skills/umbrella-blazor-register-nav-item && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19329" && unzip -o skill.zip -d .claude/skills/umbrella-blazor-register-nav-item && rm skill.zipInstalls to .claude/skills/umbrella-blazor-register-nav-item
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Add a nav item to the Blazor NavMenu.razor for a new feature, inside the correct AuthorizeView policy block and section, following the existing nav structure.Key capabilities
- →Identify correct AuthorizeView policy blocks
- →Insert navigation items into NavMenu.razor
- →Apply FontAwesome icons to nav links
- →Maintain alphabetical order for nav items
- →Ensure accessibility with aria-hidden attributes
How it works
The skill reads the existing NavMenu.razor structure to locate the appropriate AuthorizeView policy block and inserts a new nav-item div in alphabetical order.
Inputs & outputs
When to use umbrella-blazor-register-nav-item
- →Add a link for a new admin dashboard page
- →Register a new feature module in the UI
- →Maintain consistent navigation structure
About this skill
Register Blazor Nav Item
Purpose
Add a navigation link for a new feature to NavMenu.razor, placed inside the correct <AuthorizeView> policy block and logical section group. Nav items are always controlled by <AuthorizeView> — they are only rendered for users who satisfy the policy, matching the [Authorize] policy applied to the index and manage pages.
Discovery (read these before writing anything)
- Read
Web\<AppName>.Web.Client\Layout\Shared\NavMenu.razorin full to understand the existing structure — how sections are grouped with<div class="nav-header">, how<AuthorizeView>blocks are arranged by policy, and the naming/icon conventions. - Identify which
<AuthorizeView>block matches the policy used by the new feature's index page. If no matching block exists, a new one must be added. - Note the icon library in use (typically FontAwesome) and choose an appropriate icon for the feature.
Step 1 -- Locate the correct AuthorizeView block
Find the <AuthorizeView Policy="@<AppName>PolicyNames.<Policy>"> block that matches the policy on the new feature's pages. The nav item goes inside this block.
<AuthorizeView Policy="@SharedPolicyNames.<Policy>" Context="<contextVarName>">
<div class="nav-header">Section Name</div>
<!-- existing items -->
<!-- ADD HERE, in alphabetical order by label -->
<div class="nav-item">
<NavLink class="nav-link" href="/admin/<route-plural>">
<i class="fas fa-<icon-name>" aria-hidden="true"></i>
<span><Label></span>
</NavLink>
</div>
</AuthorizeView>
Rules:
- Place the new
<div class="nav-item">in alphabetical order by label within its section. - The
hrefmust match the index page route exactly (e.g./admin/industries). - The
<span>label is the human-readable plural name of the feature (e.g.Industries,Career Quiz Questions). aria-hidden="true"on the icon element is required for accessibility.- Do not add a
<div class="nav-header">unless creating an entirely new section — use the existing section header.
If no matching AuthorizeView block exists
Add a new block at the appropriate position in the nav hierarchy:
<AuthorizeView Policy="@SharedPolicyNames.<Policy>" Context="<policy>Context">
<div class="nav-header"><Section Name></div>
<div class="nav-item">
<NavLink class="nav-link" href="/admin/<route-plural>">
<i class="fas fa-<icon-name>" aria-hidden="true"></i>
<span><Label></span>
</NavLink>
</div>
</AuthorizeView>
The Context attribute value must be unique within the file — use a descriptive name (e.g. siteSettingsContext, adminContext).
Step 2 -- Choose an icon
Use a FontAwesome Free icon that relates to the feature's subject matter. Browse at fontawesome.com/icons (free filter). Common examples from the codebase:
| Feature type | Icon |
|---|---|
| Industry / sector | fa-industry |
| People / users | fa-users |
| Documents | fa-file-alt |
| Settings | fa-cog |
| Education | fa-graduation-cap |
| Messages | fa-envelope |
| Charts / analytics | fa-chart-bar |
| Questions / quiz | fa-question-circle |
If unsure, check what icon an analogous existing feature uses.
Verification
- The new
<div class="nav-item">is inside a<AuthorizeView>block whose policy matches the[Authorize]attribute on the index and manage pages. - The
hrefon the<NavLink>matches the index page route. - The item is in alphabetical order by label within its section.
- The icon has
aria-hidden="true". - No new
<div class="nav-header">was added unless the feature genuinely belongs to a new section that didn't previously exist.
When not to use it
- →When the feature does not require a navigation link
- →When the feature lacks an associated AuthorizeView policy
Prerequisites
Limitations
- →Requires existing FontAwesome icon library
- →Limited to Blazor NavMenu.razor structure
How it compares
It automates the placement and formatting of navigation items based on established naming and icon conventions rather than manual editing.
Compared to similar skills
umbrella-blazor-register-nav-item side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| umbrella-blazor-register-nav-item (this skill) | 0 | 16d | No flags | Beginner |
| component-development | 1 | 4mo | Review | Intermediate |
| avalonia-viewmodels-zafiro | 0 | 6mo | No flags | Intermediate |
| syncfusion-blazor-toolkit-calendars | 0 | 1mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
component-development
FritzAndFriends
Guidance for creating Blazor components that emulate ASP.NET Web Forms controls. Use this when implementing new components or extending existing ones in the BlazorWebFormsComponents library.
avalonia-viewmodels-zafiro
davila7
Optimal ViewModel and Wizard creation patterns for Avalonia using Zafiro and ReactiveUI.
syncfusion-blazor-toolkit-calendars
syncfusion
Build and customize calendar-based components in Syncfusion Blazor Toolkit. Covers Calendar, DatePicker, DateTimePicker, and TimePicker. Use when implementing date/time selection features, handling date range restriction, formatting dates, managing calendar events, validating dates, or customizing c
syncfusion-blazor-toolkit-buttons
syncfusion
Implement interactive Blazor button components with Syncfusion Toolkit. Covers SfButton, SfButtonGroup with styling and accessibility.
dotnet-blazor
managedcode
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices.
dotnet-spectre-console
rudironsoni
>-