workspace/skills/infrahub-sot/SKILL.md
OpsMill Infrahub — infrastructure source of truth with versioned branches, schema-driven nodes, GraphQL queries, relationship traversal. Use when querying Infrahub for device inventory, browsing infrastructure schemas, creating a branch for a change proposal, running GraphQL queries against Infrahub, or reconciling Infrahub data with live device state.
npx skillsauth add automateyournetwork/netclaw infrahub-sotInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
INFRAHUB_ADDRESS, INFRAHUB_API_TOKENfastmcp, infrahub_sdkInfrahub is not just another IPAM/DCIM tool. Key differentiators:
| Tool | Parameters | What It Does |
|------|-----------|--------------|
| get_nodes | kind, branch?, filters?, partial_match? | Retrieve all objects of a specific kind with optional filtering and partial matching |
| get_node_filters | kind, branch? | List available filters for a kind — attribute filters (attr__value), relationship filters (rel__attr__value) |
| get_related_nodes | kind, relation, filters?, branch? | Traverse a relationship from a node kind — get connected objects (peers, members, interfaces, etc.) |
| Tool | Parameters | What It Does |
|------|-----------|--------------|
| get_schema_mapping | branch? | List all schema node kinds and generics available in Infrahub (discover what data types exist) |
| get_schema | kind, branch? | Full schema for a specific kind — attributes, relationships, their types (understand the data model) |
| get_schemas | branch?, exclude_profiles?, exclude_templates? | Retrieve all schemas, optionally excluding profiles and templates |
| Tool | Parameters | What It Does |
|------|-----------|--------------|
| get_graphql_schema | none | Retrieve the full GraphQL schema from Infrahub (SDL format) |
| query_graphql | query, branch? | Execute an arbitrary GraphQL query against Infrahub — full flexibility for complex queries |
| Tool | Parameters | What It Does |
|------|-----------|--------------|
| get_branches | none | List all branches in Infrahub with their details |
| branch_create | name, sync_with_git? | Create a new branch for isolated infrastructure changes |
When first connecting to Infrahub:
get_schema_mapping — what infrastructure types are modeled?get_schema(kind="InfraDevice") — what attributes and relationships does a device have?get_node_filters(kind="InfraDevice") — how can I query devices?get_nodes(kind="InfraDevice") — list all devicesWhen auditing infrastructure state in Infrahub:
get_schema_mapping — discover all kindsget_nodes(kind="InfraDevice") — all devicesget_nodes(kind="InfraIPAddress") — all IPs (if IPAM is modeled)get_nodes(kind="InfraPrefix") — all subnetsget_related_nodes(kind="InfraDevice", relation="interfaces") — device interfacesWhen proposing an infrastructure change:
get_branches — see existing branchesbranch_create(name="change-123-add-vlan") — isolate changesget_nodes(kind="InfraVLAN", branch="change-123-add-vlan") — view on branchquery_graphql(query="mutation { ... }", branch="change-123-add-vlan")get_nodes on branch — confirm changes look correctWhen building custom queries:
get_graphql_schema — full SDL schema, understand query structurequery_graphql(query="{ InfraDevice { edges { node { name { value } } } } }")query_graphql(query="{ InfraDevice(name__value: \"core-rtr\") { ... } }")| Skill | How They Work Together |
|-------|----------------------|
| netbox-reconcile | Infrahub as primary SoT, NetBox as legacy — compare and migrate |
| nautobot-sot | Infrahub as primary SoT, Nautobot as legacy — compare IPAM data |
| pyats-topology | Infrahub provides intended state; pyATS discovers actual device state for reconciliation |
| pyats-network | Cross-reference Infrahub infrastructure model with live device configs |
| pyats-routing | Validate routing table entries against Infrahub prefix/IP allocations |
| aci-fabric-audit | Infrahub fabric model vs ACI actual state |
| meraki-network-ops | Infrahub planned state vs Meraki actual DHCP/VLAN assignments |
| aws-network-ops | Infrahub cloud model vs AWS VPC actual state |
| radkit-remote-access | Use Infrahub to identify device IPs, then RADKit for remote CLI access |
| servicenow-change-workflow | Infrahub branches map to ServiceNow CRs — create branch per change |
| gait-session-tracking | Record all Infrahub queries, branch operations, and infrastructure changes |
NetClaw supports all three source-of-truth platforms:
| Feature | NetBox | Nautobot | Infrahub | |---------|--------|----------|----------| | Origin | DigitalOcean / NetBox Labs | Network to Code | OpsMill | | Data model | Fixed DCIM/IPAM + custom fields | Fixed DCIM/IPAM + Jobs + custom fields | Fully schema-driven (define any model) | | Versioning | No branching | No branching | Git-like branches for data | | API | REST + GraphQL | REST + GraphQL | GraphQL-native | | MCP tools | Read-write via FastMCP | Read-only IPAM (5 tools) | Read + GraphQL mutations + branches (10 tools) | | Use when | Standard IPAM/DCIM | Standard IPAM/DCIM (NTC ecosystem) | Custom infrastructure models, versioned changes |
get_schema_mapping first to learn what kinds exist. Don't guess kind names.get_node_filters to learn valid filter syntax before using get_nodes with filters.query_graphql. Never mutate main directly.partial_match=True in get_nodes for fuzzy matching on filter values.get_related_nodes to follow relationships; use get_schema to discover relationship names first.INFRAHUB_ADDRESS — Infrahub instance URL (e.g., http://infrahub.example.com:8000)INFRAHUB_API_TOKEN — Infrahub API authentication tokenMCP_HOST — Server bind address when running in HTTP mode (default: 0.0.0.0, optional)MCP_PORT — Server port when running in HTTP mode (default: 8001, optional)testing
Human-in-the-loop escalation via HumanRail — route low-confidence agent decisions, pre-destructive operation approvals, and ambiguous incident tickets to real human engineers. Human answers are verified and returned as structured output. Workers are paid via Lightning Network. Use when the agent is uncertain, when a destructive change needs explicit human sign-off beyond a ServiceNow CR, or when an ambiguous ticket requires human triage before automated handling.
testing
Manage EVE-NG node lifecycle. Use when listing nodes, checking runtime state, creating or deleting nodes, starting or stopping nodes or whole labs, verifying node details, or wiping node NVRAM back to factory defaults.
development
Manage EVE-NG labs and platform inventory. Use when listing labs, checking lab metadata, creating or deleting labs, importing or exporting lab archives, checking EVE-NG health or auth, or verifying available node images before build work.
tools
Execute live CLI commands on running EVE-NG nodes over telnet console. Use when running show commands, making live config changes, verifying protocol state, testing connectivity, checking console readiness, or interacting with IOS, Junos, VPCS, EOS, or NX-OS nodes.