infrahub-menu-creator
Original:🇺🇸 English
Translated
Create and manage Infrahub custom menus. Use when designing navigation menus, organizing node types in the UI, or customizing the Infrahub web interface sidebar.
2installs
Sourceopsmill/infrahub-skills
Added on
NPX Install
npx skill4agent add opsmill/infrahub-skills infrahub-menu-creatorTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Infrahub Menu Creator
Overview
Expert guidance for creating Infrahub custom menus.
Menus control the left-side navigation in the web
interface, organizing schema node types into a custom
hierarchy.
When to Use
- Designing navigation menus for the Infrahub web UI
- Organizing node types into logical groups and hierarchies
- Adding icons and labels to menu items
- Setting up group headers (non-clickable) with nested children
- Configuring schema nodes to use custom menus instead of auto-generated ones
Rule Categories
| Priority | Category | Prefix | Description |
|---|---|---|---|
| CRITICAL | Format | | apiVersion, kind, spec |
| CRITICAL | Properties | | name, namespace, label, kind |
| HIGH | Hierarchy | | Nesting, group headers, data |
| HIGH | Icons | | MDI icon reference, choices |
| MEDIUM | Schema | | include_in_menu, kind links |
| LOW | Patterns | | Flat menu, comments, links |
Menu File Basics
yaml
---
apiVersion: infrahub.app/v1
kind: Menu
spec:
data:
- namespace: Dcim
name: DeviceMenu
label: "Devices"
icon: "mdi:server"
kind: DcimDevice # Links to schema node list viewapiVersionkind: Menuspec.datanamenamespaceWorkflow
Follow these steps when creating a menu:
-
Gather requirements — Ask what schema nodes exist, how they should be grouped, and whether the user wants flat or hierarchical navigation.
-
Read relevant rules — Readfor the required YAML structure,
rules/format-structure.mdfor item fields, andrules/item-properties.mdif nesting is needed. Readrules/hierarchy-nesting.mdto pick appropriate MDI icons.rules/icons-reference.md -
Generate the menu YAML — Start with thecomment and
$schema/apiVersion/kindstructure. Apply rules from step 2.spec -
Add registration and schema guidance — Every menu file output must include:
- A YAML comment block showing how to register
the file in under the
.infrahub.ymlkey (seemenus:)rules/format-structure.md - A YAML comment block advising to set
on every schema node that appears in the custom menu, to prevent duplicate sidebar entries (see
include_in_menu: false)rules/schema-integration.md
Include these as comments at the top of the file, before thedocument separator. This ensures the user sees the guidance alongside the menu definition.--- - A YAML comment block showing how to register
the file in
Supporting References
- infrahub-yml-reference.md -- .infrahub.yml project configuration
- common/rules/ -- Shared rules (git integration, caching gotchas) that apply across all skills
- schema-creator -- Schema node kinds that menus link to
- rules/ -- Individual rules organized by category prefix