data-graph-database
Use when the user asks about Neo4j and Cypher, Amazon Neptune, Gremlin, JanusGraph, SPARQL/RDF stores, graph traversal performance or knowledge graph storage…
by j4flmao★ 47 GitHub stars
Install data-graph-database in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Data Graph Database
Purpose
Design graph data models for connected domains (social networks, recommendation engines, knowledge graphs, fraud detection) with optimal traversal patterns, platform selection, and scaling strategy.
Agent Protocol
Trigger
Exact user phrases: "Neo4j", "Amazon Neptune", "JanusGraph", "graph database", "graph model", "Cypher", "Gremlin", "RDF", "SPARQL", "graph traversal", "property graph", "knowledge graph", "graph schema", "node label", "relationship", "graph query".
Input Context
Before activating, verify:
- Domain data (nodes, relationships, properties, cardinality)
- Query patterns (depth of traversal, path enumeration, aggregations)
- Transaction volume (reads/sec, writes/sec, complexity)
- Consistency requirements (ACID vs CQRS)
- Existing graph platform or greenfield
- Integration points (existing databases, streaming, ML pipelines)
- Expected graph size (millions, billions of nodes/edges)
Output Artifact
Graph data model with node labels, relationship types, traversal patterns, and platform-specific deployment config.
Response Format
// Neo4j schema + constraints + traversal queries
// Gremlin traversals for Neptune/JanusGraph
# JanusGraph storage backend config
# Neptune cluster config
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Graph data model designed (property graph or RDF)
- Node labels and relationship types defined with constraints
- Indexes created for high-traffic property lookups
- Traversal patterns optimized for depth and cardinality
- Platform selected (Neo4j, Neptune, JanusGraph) with rationale
- Scaling strategy defined (sharding, replication, caching)
- Query performance verified with PROFILE/explain
Max Response Length
300 lines of schema and queries.
Workflow
Step 1: Graph Data Modeling
Property graph: nodes (entities) with labels, relationships (edges) with types, properties on both. RDF: subject-predicate-object triples with URIs. Design around traversal patterns: ask "what queries will traverse from this node through which relationships?" Favor nodes for entities, relationships for connections, properties for attributes.
// Property graph model for e-commerce
// (:Customer)-[:PURCHASED]->(:Order)-[:CONTAINS]->(:Product)
// (:Customer)-[:REVIEWED]->(:Product)
// Each relationship carries context: timestamp, quantity, rating
Step 2: Node and Relationship Design
Node labels represent entity types. Labels can be hierarchical. Relationship types are directional verbs in present tense. Properties on relationships for context. Avoid generic relationships like RELATED_TO.
// Node labels
CREATE CONSTRAINT customer_id FOR (c:Customer) REQUIRE c.id IS UNIQUE;
CREATE CONSTRAINT product_sku FOR (p:Product) REQUIRE p.sku IS UNIQUE;
// Composite index for lookup
CREATE INDEX customer_region_idx FOR (c:Customer) ON (c.region, c.tier);
Step 3: Indexing and Constraints
Neo4j: BTREE indexes for exact lookups, TEXT for string contains, RANGE for numeric/date, POINT for spatial, FULLTEXT for cross-label search. Composite indexes for multi-property lookups.
// RANGE index for date filtering
CREATE RANGE INDEX order_date_idx FOR ()-[r:PURCHASED]-() ON (r.created_at);
// TEXT index for product search
CREATE TEXT INDEX product_name_idx FOR (p:Product) ON (p.name);
// FULLTEXT for cross-label search
CREATE FULLTEXT INDEX entity_search FOR (n:Customer|Product|Order) ON EACH [n.name, n.description];
Step 4: Traversal Optimization
Start with most selective pattern. Use LIMIT early. Profile queries to find Expand(Into) vs Expand(All). Avoid cartesian products. Use USING INDEX to force index selection. Parameterize all queries.
// Bad: full scan then filter
MATCH (c:Customer)-[:PURCHASED]->(o:Order)-[:CONTAINS]->(p:Product)
WHERE c.region = 'US' AND p.category = 'Electronics'
RETURN c.name, p.name LIMIT 100;
// Good: start with most selective, use indexes
MATCH (c:Customer) WHERE c.region = 'US'
WITH c LIMIT 100
MATCH (c)-[:PURCHASED]->(o:Order)-[:CONTAINS]->(p:Product)
WHERE p.category = 'Electronics'
RETURN c.name, p.name;
// Profile to verify plan
PROFILE
MATCH (c:Customer) WHERE c.region = 'US'
USING INDEX c:Customer(region)
RETURN count(c);
Step 5: Platform Selection
Neo4j: full ACID, Cypher, strongest ecosystem. Neptune: managed AWS, Gremlin + SPARQL. JanusGraph: open-source, pluggable backend, horizontal scaling.
# JanusGraph with Cassandra + Elasticsearch
storage:
backend: cassandra
hostname: ["10.0.1.10", "10.0.1.11", "10.0.1.12"]
port: 9160
keyspace: janusgraph
index:
search:
backend: elasticsearch
hostname: ["10.0.2.10", "10.0.2.11"]
port: 9200
cache:
db-cache: true
db-cache-clean-wait: 20
Step 6: Scaling and Performance
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- references/graph-algorithms.md
- references/graph-data-modeling.md
- references/graph-modeling.md
- references/graph-performance.md
- references/graph-platforms.md
- references/graph-query-performance.md
- references/graph-use-cases.md
- references/query-patterns.md
FAQ
What does the data-graph-database skill do?
Use when the user asks about Neo4j and Cypher, Amazon Neptune, Gremlin, JanusGraph, SPARQL/RDF stores, graph traversal performance or knowledge graph storage. Produces graph model, queries and indexing and scaling choices. Not for relational/graph schema theory (use data-modeling) or GraphRAG prompting (use prompt-rag-query-design).
How do I install the data-graph-database skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the data-graph-database skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…