From infrahub
Creates, validates, and modifies Infrahub schema YAML files for nodes, generics, attributes, relationships, and extensions. Useful for designing data models, adding schema nodes, validating definitions, and planning migrations.
npx claudepluginhub opsmill/claude-marketplace --plugin infrahubThis skill is limited to using the following tools:
Expert guidance for designing and building Infrahub
examples.mdreference.mdrules/_sections.mdrules/_template.mdrules/attribute-defaults-and-types.mdrules/display-human-friendly-id.mdrules/display-order-weight.mdrules/extension-cross-file.mdrules/hierarchy-setup.mdrules/migration-state-absent.mdrules/naming-conventions.mdrules/relationship-component-parent.mdrules/relationship-defaults.mdrules/relationship-identifiers.mdrules/relationship-peer-kind.mdrules/uniqueness-constraints.mdrules/validation-common-errors.mdvalidation.mdCreates and manages Infrahub YAML files for infrastructure objects like devices, locations, organizations, and modules. Use when populating data instances or defining hierarchies, not schemas or queries.
Creates validated models of entities, relationships, and constraints for database schemas (SQL/NoSQL/graph), knowledge graphs, ontologies, API data models, and taxonomies.
Generates database schema docs with tables, constraints, indexes, retention policies, and migration notes from entities, PRDs, or existing schemas.
Share bugs, ideas, or general feedback.
Expert guidance for designing and building Infrahub schemas. Schemas are YAML files defining nodes (concrete types), generics (abstract base types), attributes, relationships, and extensions.
Existing schemas in this project:
!find . -name "*.yml" -path "*/schemas/*" -o -name "*schema*" -name "*.yml" 2>/dev/null | head -20
Infrahub config (if present):
!cat .infrahub.yml 2>/dev/null || echo "No .infrahub.yml found"
If invoked with arguments (e.g., /infrahub:managing-schemas Ipam Vlan VlanGroup),
use the first argument as the namespace and remaining arguments as node names.
| Priority | Category | Prefix | Description |
|---|---|---|---|
| CRITICAL | Naming | naming- | Namespace, node, attribute naming |
| CRITICAL | Relationships | relationship- | IDs, peers, component/parent |
| HIGH | Attributes | attribute- | Defaults, dropdowns, deprecated |
| HIGH | Hierarchy | hierarchy- | Hierarchical generics, parent/children |
| HIGH | Display | display- | human_friendly_id, order_weight |
| MEDIUM | Extensions | extension- | Cross-file via extensions block |
| MEDIUM | Uniqueness | uniqueness- | Constraint format, __value suffix |
| MEDIUM | Migration | migration- | Add/remove attributes, state: absent |
| LOW | Validation | validation- | Common errors, pre-check checklist |
---
# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
version: "1.0"
generics: # Abstract base definitions (shared attributes/relationships)
- ...
nodes: # Concrete object types
- ...
extensions: # Add attributes/relationships to existing nodes from other files
nodes:
- ...
Always include the $schema comment for IDE validation.
Only version is required at the top level.
Follow these steps when creating or modifying a schema:
$schema
comment and version: "1.0". Define generics first
(if any), then nodes. Apply naming, display, and
relationship rules from step 2.human_friendly_id, display_label, and
order_weight per
rules/display-human-friendly-id.md
and rules/display-order-weight.md.infrahubctl schema check per
validation.md. Fix any errors
using rules/validation-common-errors.md.infrahubctl
commands, migration strategies, pre-validation checklist