add-node-type
Skill by cartography-cncf
Defines a new Cartography node schema under a module's models folder. It covers properties, tenant relationships, extra Neo4j labels, scoped cleanup and one-to-many transforms, for developers adding resource types to Cartography.
Install add-node-type
Built from the published package, never by AI.
git clone --depth 1 https://github.com/cartography-cncf/cartography /tmp/cartography && mkdir -p ~/.claude/skills && cp -r /tmp/cartography/.agents/skills/add-node-type ~/.claude/skills/add-node-typeRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/cartography-cncf/cartography /tmp/cartography && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/cartography/.agents/skills/add-node-type ~/.gemini/antigravity-cli/skills/add-node-typeAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The add-node-type skill guides an AI assistant through adding a new CartographyNodeSchema and its CartographyNodeProperties to an existing Cartography module. It covers required properties such as id and lastupdated, sub-resource relationships to tenant-like nodes, extra labels such as Identity or UserAccount, and scoped versus global cleanup. It also shows how to flatten lists with one-to-many transforms and how to load data with the load function.
The skill is written for developers working on the Cartography codebase. It assumes the surrounding module already exists and points to the create-module skill for full module creation. It also lists common issues, such as PropertyRef validation errors and ignored custom schema fields, and refers to a troubleshooting skill for more.
Written from the project's SKILL.md and checked against it.
What it can do
- Define node propertiesWrites frozen dataclass node properties with required id and lastupdated fields and business properties.
- Set sub-resource relationshipsLinks a new node type to a tenant-like node such as AWSAccount or GCPProject.
- Add extra Neo4j labelsWraps reusable label constants such as USER_ACCOUNT in ExtraNodeLabels.
- Configure scoped cleanupSets scoped_cleanup to True by default, or to False for global data like CVE feeds.
- Write one-to-many transformsFlattens lists of IDs in transform() and uses one_to_many=True on relationship matchers.
- Handle date valuesPasses ISO 8601 strings or datetimes through directly instead of converting to epoch milliseconds.
- Load data into the graphShows how to call load() with a schema, data, lastupdated and TENANT_ID arguments.
What you need
- An existing Cartography module to add the node type to
- Neo4j 4 or later, for native datetime support
Try asking
- Add a new node type for a resource in my Cartography module
- Set up scoped cleanup for a global threat intel node type
- Model a new resource with a UserAccount extra label and a tenant relationship
Good to know
- Assumes the surrounding Cartography module already exists
- Custom fields on schema classes are silently ignored
- sub_resource_relationship must point to a tenant-like node
- scoped_cleanup should only be set to False for genuinely global data
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/add-node-type/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
references/advanced-properties.md8 KB
Alternatives to add-node-type
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
add-node-type: common questions
What is scoped_cleanup in Cartography node schemas?
scoped_cleanup defaults to True and controls cleanup for data tied to a tenant. The skill says to set it to False only for global data with no tenant, such as CVE databases or public DNS data.
How do I add extra labels to a Cartography node?
Import an uppercase label constant such as USER_ACCOUNT and wrap it in ExtraNodeLabels. The skill gives the example that produces a node with both the YourServiceUser and UserAccount labels.
Why are my custom schema fields not working?
Only the standard schema fields are recognised. The skill says to handle conditional behaviour in transform() by setting fields to None or filtering records before load().
How do I install add-node-type?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is add-node-type free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is add-node-type safe to use?
It scores 84 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to add-node-type?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
