/infrahub:infrahub-managing-objects [kind] [object-details...]from infrahub
Creates, modifies, and manages Infrahub object data YAML files for populating infrastructure instances like devices, locations, organizations, and modules. Use when defining or editing objects under objects/ or data/ directories.
Ships in infrahub. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert guidance for creating Infrahub object (data) files. Objects are YAML files that populate schema nodes with actual infrastructure data -- devices, locations, organizations, modules, and more.
Before writing object files, look at the project with read-only tools:
.yml or .yaml files under a
schemas/ directory, or with schema in the name..yml or .yaml files
under an objects/ or data/ directory.These steps contact the Infrahub server, so they come after the read-only look at the project:
infrahubctl command, detect the
project's Python environment as
../infrahub-common/rules/connectivity-python-environment.md
describes.If invoked with arguments (e.g., /infrahub:managing-objects DcimDevice spine-01),
use the first argument as the kind and remaining arguments as object details.
apiVersion: infrahub.app/v1 and
kind: Object, such as a file under objects/ or data/| Priority | Category | Prefix | Description |
|---|---|---|---|
| CRITICAL | Branch-First Loading | workflow- | Load onto a branch, not the default branch |
| CRITICAL | File Format | format- | apiVersion, kind, spec structure |
| CRITICAL | Value Mapping | value- | Attributes, dropdowns, references |
| HIGH | Children | children- | Hierarchy/component nesting |
| MEDIUM | Range | range- | Sequential interface expansion |
| MEDIUM | Organization | organization- | Naming, load order, multi-doc |
| LOW | Patterns | patterns- | Flat lists, devices, git repos |
Object files reference schema-defined shapes; missing schema setup turns into "object failed to load" or "reference not found" errors at sync time. Before populating data, verify the schema upstream:
| If the object... | The schema must... | See |
|---|---|---|
| References another object across files | Define human_friendly_id on the target node (the shape determines scalar-vs-list reference) | ../infrahub-managing-schemas/rules/display-human-friendly-id.md |
| Sits in a location/parent tree | Use a hierarchical generic with parent/children and full-kind peer references | ../infrahub-managing-schemas/rules/hierarchy-setup.md |
| Sets a Dropdown attribute value | Declare the dropdown choices as objects with name (not bare strings); the object references the choice name | ../infrahub-managing-schemas/rules/attribute-defaults-and-types.md |
| Owns Component children inline | The parent's Component relationship and child's Parent relationship must share an identifier and the child needs optional: false | ../infrahub-managing-schemas/rules/relationship-component-parent.md |
| Will be the target of an artifact pipeline | The concrete node must inherit_from: CoreArtifactTarget (set on the node, not on a generic) | ../infrahub-managing-schemas/rules/extension-artifact-target.md |
If any of these is missing, the schema needs an update before the objects can load — that's a schema migration, not an object fix.
---
apiVersion: infrahub.app/v1
kind: Object
spec:
kind: <NodeKind> # Schema node kind (e.g., DcimDellServer)
data:
- <attribute>: <value> # List of object instances
apiVersion, kind: Object, spec.kind, and spec.data
are always required. Each spec block targets a single
node kind.
Follow these steps when creating object data files:
--branch is given — main by
convention, but it can be renamed) writes unreviewed
data to the source of truth, and a bad bulk load there
means deleting objects one by one instead of discarding
a branch. Read
rules/workflow-branch-first.md.
The default branch is only reasonable on a local
throwaway instance.value + metadata mapping —
see ../infrahub-common/metadata-lineage.md
(remember source is lineage only; locking needs
owner + is_protected).--branch). See
validation.md for the commands and
pre-load checklist.infrahubctl object validate / object load
commands, common load errors, pre-load checklistsource, owner, is_protected):
setting lineage/ownership and why source does not
control edit accessdocs.infrahub.app
on a genuine gap (e.g. deleting nodes)examples.md (opens in a new tab)reference.md (opens in a new tab)rules/_sections.md (opens in a new tab)rules/_template.md (opens in a new tab)rules/children-components.md (opens in a new tab)rules/children-hierarchy.md (opens in a new tab)rules/format-structure.md (opens in a new tab)rules/organization-load-order.md (opens in a new tab)rules/patterns-common.md (opens in a new tab)rules/range-expansion.md (opens in a new tab)rules/value-attributes.md (opens in a new tab)rules/value-generic-relationships.md (opens in a new tab)rules/value-profiles-templates.md (opens in a new tab)rules/value-relationships.md (opens in a new tab)rules/workflow-branch-first.md (opens in a new tab)validation.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
infrahub@opsmill is listed by opsmill/claude-marketplace — review the source before installing
npx claudepluginhub opsmill/claude-marketplace --plugin infrahub18 skills in this plugin
/infrahub-analyzing-dataAnalyzes and correlates live Infrahub data via the MCP server — answers operational questions, detects drift, and investigates impact. TRIGGER when: querying infrastructure data, checking compliance, investigating change impact, producing ad-hoc reports. DO NOT TRIGGER when: writing automated checks, building transforms, designing schemas, populating data files, planning an Infrahub version upgrade (use infrahub-planning-upgrades). ALWAYS pass the user's question verbatim as args — this skill runs in a forked context and cannot see the parent conversation. Invoking without args will fail./infrahub-analyzing-diagnosticsAnalyze an already-collected infrahub-collect diagnostic bundle — traceback and failure triage across service logs, incident correlation, and known-issue matching against opsmill/infrahub GitHub issues. TRIGGER when: the user says they collected a diagnostic bundle, gives you a bundle path, or pastes bundle contents — and asks what's wrong, wants the logs or tracebacks analyzed, asks "what does this bundle say", wants errors triaged/correlated, or asks whether a crash is a known issue. DO NOT TRIGGER when: no bundle exists yet — collect one first (use infrahub-collecting-diagnostics), filing the issue itself (use infrahub-reporting-issues), or querying live data (use infrahub-analyzing-data)./infrahub-auditing-repoAudits an Infrahub repository against best practices and rules, producing a structured compliance report. TRIGGER when: reviewing repo for compliance, onboarding to existing project, pre-deployment validation, catching issues. DO NOT TRIGGER when: creating schemas, writing checks/generators, querying live data, populating objects, planning an Infrahub version upgrade (use infrahub-planning-upgrades). ALWAYS pass the user's request verbatim as args, with any scope, path, or focus they named. This skill runs in a forked context and cannot see the parent conversation./infrahub-collecting-diagnosticsCollect a redacted local diagnostic bundle (logs, config, version, state) for an OpsMill expert hand-off. TRIGGER when: Infrahub is broken/failing/erroring, the user asks for help debugging, wants to collect logs/diagnostics, prepares a hand-off for OpsMill support, or reports a crash/timeout/connection issue (upgrade failure, stuck branch, container CrashLoopBackOff, 500s, OOM). DO NOT TRIGGER when: debugging a check, transform, generator, menu, or schema in the repository (use the infrahub-managing-* skills), a bundle has already been collected and the user wants it analyzed (use infrahub-analyzing-diagnostics), filing a public GitHub issue (use infrahub-reporting-issues), running operational queries (use infrahub-analyzing-data), or planning an upgrade that has not run yet (use infrahub-planning-upgrades)./infrahub-commonShared references and cross-cutting rules for all Infrahub skills — GraphQL syntax, .infrahub.yml format, and common patterns. DO NOT TRIGGER directly — loaded automatically by other Infrahub skills when they need shared references./infrahub-converting-netbox-device-typesConverts NetBox device-type and module-type definitions (the netbox-community devicetype-library format, also published via the NetBox Data Exchange / NDX) into Infrahub object templates as Infrahub object YAML, using a bundled Python converter driven by a schema mapping profile. TRIGGER when: importing NetBox device types or module types, exporting device types from a running NetBox instance, building object templates from vendor device models, converting line cards / PSUs / transceivers from NetBox module types into Template* objects, re-running a conversion after changing the mapping profile, debugging a wrong or failed conversion. DO NOT TRIGGER when: importing CSV/TSV data (use infrahub-importing-data), authoring schemas from scratch (use infrahub-managing-schemas), writing ordinary object data files (use infrahub-managing-objects), or setting up continuous two-way replication with a live NetBox (that is infrahub-sync, a separate product; a one-off export of device types is in scope here).Other plugins' skills for the same job