Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

add-relationship

Skill by cartography-cncf

Adds relationships between Cartography graph nodes, including standard edges, one-to-many edges and MatchLinks. Written for developers building Cartography intel modules.

  • Score 84
  • 4.2k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install add-relationship

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-relationship ~/.claude/skills/add-relationship

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install add-relationship in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The add-relationship skill guides an AI assistant through adding a relationship between Cartography nodes. It covers three options: a standard relationship defined on a node schema, a one-to-many edge set with PropertyRef and one_to_many=True, and a MatchLink that connects two existing nodes. The skill says to prefer standard relationships, since MatchLinks add extra MATCH reads.

It also covers the MatchLink schema, loading with load_matchlinks(), and cleanup using GraphJob.from_node_schema() and GraphJob.from_matchlink(). It is for developers writing Cartography intel modules who need to link nodes, share a node across modules, or model a composite node from two sources. The skill includes reference notes on MatchLink performance, rich properties, and multi-module patterns.

Written from the project's SKILL.md and checked against it.

What it can do

  • Standard relationshipDefines a CartographyRelSchema attached through other_relationships or sub_resource_relationship.
  • Edge directionChooses LinkDirection.OUTWARD or LinkDirection.INWARD for a relationship.
  • One-to-many edgesCreates one edge per ID in a list using PropertyRef with one_to_many=True.
  • MatchLink schemaConnects two existing node types with relationship properties for rich metadata.
  • Load MatchLinksLoads MatchLink data with load_matchlinks() and lastupdated and sub-resource parameters.
  • Cleanup jobsRuns GraphJob.from_node_schema() and GraphJob.from_matchlink() to remove stale relationships.

What you need

  • Cartography
  • Python
  • Neo4j

Try asking

  • Add a standard relationship from my Cartography tenant node to users
  • Model a one-to-many ASSOCIATED_WITH edge from route tables to subnets
  • Write a MatchLink that connects AWS roles to SSO users with cleanup

Good to know

  • MatchLinks have a real performance cost because of extra MATCH reads.
  • Both source and target nodes must already exist before load_matchlinks() runs.
  • Use MatchLinks sparingly and only when the source data or metadata requires them.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/add-relationship/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md7 KB
  • references/matchlinks.md6 KB
  • references/multi-module-patterns.md3 KB

Alternatives to add-relationship

All alternatives →
openclaw-github-repo-commandersickn33
94

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.

AAA Skill 50k
gradiogradio-app
94

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.

AAA Skill 44k
hig-components-menussickn33
94

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.

AAA Skill 50k
fastapi-templateswshobson
94

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.

AAA Skill 43k
appfunctionsandroid
94

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.

AAA Skill 11k
agent-qa-authoringsickn33
94

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.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

add-relationship: common questions

Should I use a MatchLink or a standard relationship?

Prefer standard relationships in node schemas. Use a MatchLink only when the data comes from a separate source connecting two existing node types, or when it needs rich metadata.

Why is my Cartography relationship not created?

The target node probably did not exist when the relationship was loaded. Load parent nodes first.

What cleanup is needed for relationships?

Always implement cleanup. Standard relationships use GraphJob.from_node_schema(), and MatchLinks use GraphJob.from_matchlink().

How do I install add-relationship?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is add-relationship free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is add-relationship 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-relationship?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

add-relationship Install

Add to stack

Loading.