UM

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.zip

Installs 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.
158 charsno explicit “when” trigger
Beginner

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

You give it
Feature name, route, and policy
You get back
Updated NavMenu.razor file

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)

  1. Read Web\<AppName>.Web.Client\Layout\Shared\NavMenu.razor in 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.
  2. 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.
  3. 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 href must 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 typeIcon
Industry / sectorfa-industry
People / usersfa-users
Documentsfa-file-alt
Settingsfa-cog
Educationfa-graduation-cap
Messagesfa-envelope
Charts / analyticsfa-chart-bar
Questions / quizfa-question-circle

If unsure, check what icon an analogous existing feature uses.


Verification

  1. The new <div class="nav-item"> is inside a <AuthorizeView> block whose policy matches the [Authorize] attribute on the index and manage pages.
  2. The href on the <NavLink> matches the index page route.
  3. The item is in alphabetical order by label within its section.
  4. The icon has aria-hidden="true".
  5. 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

Existing NavMenu.razor fileDefined feature policy name

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.

SkillInstallsUpdatedSafetyDifficulty
umbrella-blazor-register-nav-item (this skill)016dNo flagsBeginner
component-development14moReviewIntermediate
avalonia-viewmodels-zafiro06moNo flagsIntermediate
syncfusion-blazor-toolkit-calendars01moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry