add-node-type

Define and attach a Cartography node schema to an existing module.

4.0k|550|Updated Feb 27, 2019
One-click install
npx skills add https://github.com/cartography-cncf/cartography --skill add-node-type
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-node-type
Source: https://github.com/cartography-cncf/cartography/tree/main/.agents/skills/add-node-type
Command: npx skills add https://github.com/cartography-cncf/cartography --skill add-node-type

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Adds a new Cartography node schema to an existing module, enabling modeling of an additional resource type with proper relationships, required properties, and cleanup semantics.

Core Features & Use Cases

  • Defines a CartographyNodeSchema and CartographyNodeProperties for a module that already exists
  • Establishes a sub_resource_relationship to a tenant-like node (e.g., AWSAccount, AzureSubscription, GCPProject, GitHubOrganization)
  • Supports extra_node_labels, conditional labels, and scoped_cleanup settings
  • Enables one-to-many transforms and related edges, aligning with the module's ontology
  • Guides end-to-end module extension or new module scaffolding for node types

Quick Start

Create and wire a new CartographyNodeSchema into your module, specifying the label, properties, sub_resource_relationship, and optional labels to tailor the ontology.

Frequently Asked Questions about add-node-type

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a new node type in Cartography?

To define a new node type in Cartography, you create and wire a CartographyNodeSchema into your existing module, specifying the node label, required properties, and sub-resource relationships to extend the graph data model.

How do I model a sub-resource relationship to a tenant node in Cartography?

Modeling a sub-resource relationship in Cartography involves attaching a sub_resource_relationship to a tenant-like node such as AWSAccount, AzureSubscription, or GCPProject within the new node schema definition.

Can I add extra labels and scoped cleanup settings to a Cartography node schema?

Yes, Cartography node schemas support extra_node_labels, conditional labels, and scoped_cleanup settings, allowing you to tailor the ontology and enforce default cleanup behaviors for the new resource type.

What is the best way to extend a Cartography module with one-to-many transforms?

The best way to extend a Cartography module with one-to-many transforms is to define a new CartographyNodeSchema that enforces standardized dataclass annotations and configures related edges to align with the module's ontology.

Do I need an existing module to add a new Cartography node schema?

Yes, adding a new Cartography node schema requires an existing module to attach the schema to, enabling end-to-end module extension or new module scaffolding for the additional resource type.

Why does my Cartography node schema require standardized dataclass annotations?

Standardized dataclass annotations are required for Cartography node schemas to enforce correct relationship wiring, validate required properties, and ensure default behaviors for cleanup and transforms function properly.