What problem does it solve? Writing Infrahub Generators involves a three-part contract — a CoreGeneratorGroup target, a GraphQL query, and an async Python class — plus a tracking system that deletes stale objects on re-runs. Missteps like sync generate() methods, missing allow_upsert, bare-string relationship references, or wrong group types cause silent failures or data loss. This Skill encodes the rules, API reference, and tested patterns to get generators right the first time. ## Core Features & Use Cases - Generator Scaffolding Guidance: Walks through the full workflow — identify the design pattern, write the .gql query, implement the InfrahubGenerator subclass, register in .infrahub.yml, and test with infrahubctl. - Idempotency & Tracking Rules: Explains the delete_unused_nodes tracking contract, why every save needs allow_upsert=True, and how to keep re-runs safe. - Relationship Reference Rules: Documents the three accepted forms (HFID dict, ID dict, SDK object) and the bare-string anti-pattern behind "Unable to find the node" errors. - Performance Patterns: Covers InfrahubNode.from_graphql hydration to collapse O(N+1) round trips, batch creation, and data-cleaning helpers. - Use Case: You need a generator that turns a data center topology design into devices, interfaces, and IP pool allocations. The Skill provides the query shape, Python class skeleton, registration YAML, and testing commands. ## Quick Start Ask the assistant to create an Infrahub generator named create_dc that builds devices from a data center topology design.