From infrahub
Creates and manages Infrahub object data YAML files for populating infrastructure instances including devices, locations, organizations, and modules.
How this skill is triggered — by the user, by Claude, or both
Slash command
/infrahub:infrahub-managing-objects [kind] [object-details...][kind] [object-details...]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Expert guidance for creating Infrahub object (data) files.
examples.mdreference.mdrules/_sections.mdrules/_template.mdrules/children-components.mdrules/children-hierarchy.mdrules/format-structure.mdrules/organization-load-order.mdrules/patterns-common.mdrules/range-expansion.mdrules/value-attributes.mdrules/value-generic-relationships.mdrules/value-relationships.mdrules/workflow-branch-first.mdvalidation.mdExpert 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.
Existing schema files:
!find . -name "*.yml" -path "*/schemas/*" -o -name "*schema*" -name "*.yml" 2>/dev/null | head -10
Existing object files:
!find . -name "*.yml" -path "*/objects/*" 2>/dev/null | head -20
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.
| 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 accessnpx claudepluginhub opsmill/claude-marketplace --plugin infrahubCreates, validates, and modifies Infrahub schema YAML files — nodes, generics, attributes, relationships, and extensions. Use when designing data models, validating schemas, or planning migrations.
Manages hosts, groups, and variables in Ansible inventory files using INI and YAML formats for infrastructure organization across environments.
Configures Arness Infra for projects by selecting cloud providers, IaC tools like Terraform/Pulumi, environments, CI/CD platforms, scanning existing artifacts, and persisting to CLAUDE.md.