
Neo4j Modeling Skill
Design or refactor a Neo4j graph schema—labels, relationships, constraints—before agents write Cypher or app code.
Overview
neo4j-modeling-skill is an agent skill most often used in Build (also Validate and Operate) that designs and reviews Neo4j graph schemas and anti-patterns—not Cypher or import.
Install
npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-modeling-skillWhat is this skill?
- Guides node vs relationship vs property vs label decisions from domain requirements
- Detects anti-patterns: generic labels, supernodes, and missing constraints
- Covers intermediate nodes for n-ary relationships and migration from relational/document schemas
- Enforces schema with constraints and indexes per Neo4j best practices
- Explicit boundaries: not Cypher authoring, Spring Data, GraphQL, or bulk import
- Skill version 1.0.1 in frontmatter
- Documented out-of-scope handoffs to four sibling Neo4j skills (Cypher, Spring, GraphQL, import)
Adoption & trust: 2 installs on skills.sh; 80 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+200% hot-view momentum).
What problem does it solve?
Your agent is writing Cypher against a graph shape that will not scale or match how your domain actually connects.
Who is it for?
Indie backends adding Neo4j who need structured modeling rituals before codegen or migration.
Skip if: Tasks that are pure Cypher tuning, Spring Data entity mapping, GraphQL schema design, or one-shot CSV import without schema design.
When should I use this skill?
Choosing labels vs relationships vs properties, migrating schemas to graph, detecting anti-patterns, or assessing a model against Neo4j best practices.
What do I get? / Deliverables
You leave with a reviewed model: clear labels and relationship types, constraint/index plan, and flagged anti-patterns before query or import skills take over.
- Graph model outline: labels, relationship types, and key properties
- Constraint and index recommendations with anti-pattern remediation notes
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Graph modeling is shelved under Build/backend because the primary output is a durable data model for your product’s graph store. Backend is correct when the work is schema, constraints, indexes, and relationship shapes—not import jobs or GraphQL SDL (those are sibling Neo4j skills).
Where it fits
Map core domain entities to nodes and relationships before committing to a graph-backed MVP scope.
Define uniqueness constraints and relationship cardinality before the agent generates repositories or APIs.
Refactor a production graph that accumulated generic :Entity labels or hotspot supernodes.
How it compares
Modeling skill for graph topology and constraints, not a replacement for neo4j-cypher-skill query authoring.
Common Questions / FAQ
Who is neo4j-modeling-skill for?
Solo builders and small teams using Claude Code, Cursor, or Codex to design or audit Neo4j data models before implementation.
When should I use neo4j-modeling-skill?
In Validate when scoping a graph-backed MVP; in Build when defining labels and constraints; in Operate when refactoring a live model that shows supernodes or generic labels.
Is neo4j-modeling-skill safe to install?
Check the Security Audits panel on this page; the skill allows WebFetch and Bash—scope those tools to your repo and trusted Neo4j docs only.
Workflow Chain
Then invoke: neo4j cypher skill, neo4j import skill
SKILL.md
READMESKILL.md - Neo4j Modeling Skill
> **Status: Draft / WIP** # neo4j-modeling-skill Guides agents through designing and reviewing Neo4j graph data models: node labels, relationship types, properties, constraints, and anti-pattern detection. **Install:** ```bash npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-modeling-skill ``` Or paste this link into your coding assistant: https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-modeling-skill --- name: neo4j-modeling-skill description: Design, review, and refactor Neo4j graph data models. Use when choosing node labels vs relationship types vs properties, migrating relational/document schemas to graph, detecting anti-patterns (generic labels, supernodes, missing constraints), designing intermediate nodes for n-ary relationships, enforcing schema with constraints and indexes, or assessing an existing model against graph modeling best practices. Does NOT handle Cypher query authoring — use neo4j-cypher-skill. Does NOT handle Spring Data Neo4j entity mapping — use neo4j-spring-data-skill. Does NOT handle GraphQL type definitions — use neo4j-graphql-skill. Does NOT handle data import — use neo4j-import-skill. version: 1.0.1 allowed-tools: WebFetch Bash --- ## When to Use - Designing graph model from scratch (domain → nodes, rels, props) - Reviewing existing model for anti-patterns - Deciding node vs property vs relationship vs label - Migrating relational or document schema to graph - Designing intermediate nodes for n-ary or complex relationships - Detecting and mitigating supernode / high-fanout problems - Choosing and creating constraints + indexes for a model ## When NOT to Use - **Writing or optimizing Cypher** → `neo4j-cypher-skill` - **Spring Data Neo4j (@Node, @Relationship)** → `neo4j-spring-data-skill` - **GraphQL type definitions** → `neo4j-graphql-skill` - **Importing data (LOAD CSV, APOC import)** → `neo4j-import-skill` --- ## Inspect Before Designing On existing database, run first — never propose changes without current state: ```cypher CALL db.schema.visualization() YIELD nodes, relationships RETURN nodes, relationships; SHOW CONSTRAINTS YIELD name, type, labelsOrTypes, properties RETURN name, type, labelsOrTypes, properties; SHOW INDEXES YIELD name, type, labelsOrTypes, state WHERE state = 'ONLINE' RETURN name, type, labelsOrTypes; ``` If APOC available: ```cypher CALL apoc.meta.schema() YIELD value RETURN value; ``` MCP tool map: | Operation | Tool | |---|---| | Inspect schema | `get-schema` | | `SHOW CONSTRAINTS`, `SHOW INDEXES` | `read-cypher` | | `CREATE CONSTRAINT ... IF NOT EXISTS` | `write-cypher` (show + confirm first) | --- ## Defaults — Apply to Every Model 1. Use-case first — list 5+ queries the model must answer before designing 2. Nodes = entities (nouns) with identity; rels = connections (verbs) with direction 3. Labels PascalCase; rel types SCREAMING_SNAKE_CASE; properties camelCase 4. Every node type used in MERGE has a uniqueness constraint on its key property 5. Add property type constraints (`REQUIRE n.prop IS :: STRING`) where the type is known — helps the query planner and catches bad writes early 6. No generic labels (`:Entity`, `:Node`, `:Thing`); no generic rel types (`:RELATED_TO`, `:HAS`) 7. Security labels (used for row-level access control) should start with a common prefix (e.g. `Sec`) so application code can reliably filter them out of the domain schema 8. Rel direction encodes semantic meaning — not arbitrary 9. Inspect schema before proposing any change on an existing database 10. All constraint/index DDL uses `IF NOT EXISTS` — safe to rerun 11. **On Neo4j 2026.02+ (Enterprise/Aura):** consider `ALTER CURRENT GRAPH TYPE SET { … }` or `EXTEND GRAPH TYPE WITH { … }` to declare the full model in one block instead of individual `CREATE CONSTRAINT` statements — see `neo4j-cypher-skill/references/graph-type.md`. **PREVIEW** — syntax may change before GA. --- ## Key Patterns ### Node vs Relationship vs P