neo4j-data-models

Designs Neo4j graph data models with node, relationship, and constraint patterns.

3|1|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/PALabs-v1/AI_friend --skill neo4j-data-models-palabs-v1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neo4j-data-models
Source: https://github.com/PALabs-v1/AI_friend/tree/main/.agents/skills/neo4j-data-models
Command: npx skills add https://github.com/PALabs-v1/AI_friend --skill neo4j-data-models-palabs-v1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing a Neo4j graph schema without established patterns leads to redundant data, generic relationships, missing constraints, and slow queries. This Skill provides proven modeling conventions and a reference fraud-detection schema so you can build correct, performant graph models from the start. ## Core Features & Use Cases - Modeling Conventions: Enforces CapitalCase labels, UPPER_SNAKE_CASE relationships, camelCase properties, and anti-pattern avoidance (symmetric relationships, foreign keys as properties, label overload). - Reference Fraud Detection Schema: Provides a complete banking/fraud investigation model covering Customer, Account, Transaction, Device, Session, IP, Alert, and Case nodes with constraints, indexes, and vector search for facial embeddings. - Data Loading & Performance Guidance: Covers batch loading with MERGE, unique constraints on business keys, index strategy, and query profiling. - Use Case: When building a fraud detection system, apply the canonical transaction schema to model customers sharing emails or devices, then traverse the graph to detect linked identities and open investigation cases. ## Quick Start Use the neo4j-data-models skill to design a graph schema for my fraud detection application with customers, accounts, and transactions.

Frequently Asked Questions about neo4j-data-models

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

FAQPage Schema
How do I design a Neo4j graph data model?

Start with specific business questions, then conceptualize nodes and relationships, design queries that answer those questions, and validate against real data. Use CapitalCase labels, UPPER_SNAKE_CASE relationships, and camelCase properties, and always create unique constraints on business keys before loading data.

How to model fraud detection data in Neo4j?

Model PII like Email, Phone, Address, and Device as separate shared nodes connected to Customer nodes, enabling shared-identity detection via traversal. Represent Transaction as a node linked to Accounts via PERFORMS and BENEFITS_TO, and connect Alert to Case nodes for the investigation pipeline.

Should relationships in Neo4j be bidirectional?

No, create relationships in a single direction only. Cypher can traverse relationships regardless of direction using undirected patterns like MATCH (a)-[:KNOWS]-(b), so symmetric pairs only duplicate data and slow writes.

Why does MERGE create duplicate nodes in Neo4j?

MERGE creates duplicates when no unique constraint exists on the business key being matched. Always create node key or uniqueness constraints on identifiers like customerId or accountNumber before loading data.

When should data be a node instead of a property in Neo4j?

Make it a node when the value is shared across entities, forms a collection, or needs to be traversed in queries, such as emails shared by multiple customers. Keep simple single-entity attributes as properties, and never store foreign keys as properties.