skills/role-linguist-cypher/SKILL.md
Neo4j and Cypher: graph schema design, query patterns, performance optimisation, PostgreSQL integration.
npx skillsauth add jasonwarrenuk/goblin-mode Cypher LinguistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive guide to Neo4j graph database and Cypher query language. Covers fundamental concepts, common patterns, performance optimization, schema design, and integration with PostgreSQL/Supabase.
Use this skill when:
Nodes - Entities (nouns):
// Simple node
CREATE (u:User)
// Node with properties
CREATE (u:User {
id: 'user-123',
name: 'Alice',
email: '[email protected]'
})
// Multiple labels
CREATE (p:Person:Developer {name: 'Bob'})
Relationships - Connections (verbs):
// Simple relationship
CREATE (a)-[:FOLLOWS]->(b)
// Relationship with properties
CREATE (a)-[:FOLLOWS {since: date(), strength: 'strong'}]->(b)
// Relationship types are UPPERCASE by convention
CREATE (a)-[:MEMBER_OF {role: 'admin'}]->(org)
Properties - Attributes (key-value pairs):
// Node properties
{
id: 'user-123',
name: 'Alice',
age: 30,
verified: true,
createdAt: datetime()
}
// Relationship properties
{
since: date(),
weight: 0.85,
type: 'professional'
}
Relational mindset:
-- Joins and foreign keys
SELECT * FROM users u
JOIN follows f ON f.follower_id = u.id
JOIN users u2 ON f.followed_id = u2.id
WHERE u.id = '123';
Graph mindset:
// Pattern matching
MATCH (u:User {id: '123'})-[:FOLLOWS]->(friend)
RETURN friend;
Key difference: Relationships are first-class citizens in graphs.
Basic pattern:
// Find all users
MATCH (u:User)
RETURN u;
// Find users with specific property
MATCH (u:User {name: 'Alice'})
RETURN u;
// Find users matching condition
MATCH (u:User)
WHERE u.age > 25
RETURN u;
Relationship patterns:
// Outgoing relationship
MATCH (a)-[:FOLLOWS]->(b)
RETURN a, b;
// Incoming relationship
MATCH (a)<-[:FOLLOWS]-(b)
RETURN a, b;
// Any direction
MATCH (a)-[:FOLLOWS]-(b)
RETURN a, b;
// Multiple relationships
MATCH (a)-[:FOLLOWS]->(b)-[:FOLLOWS]->(c)
RETURN a, b, c;
// Variable length
MATCH (a)-[:FOLLOWS*1..3]->(b)
RETURN a, b;
Create nodes:
// Single node
CREATE (u:User {id: 'user-123', name: 'Alice'})
RETURN u;
// Multiple nodes
CREATE
(a:User {name: 'Alice'}),
(b:User {name: 'Bob'}),
(c:User {name: 'Charlie'});
Create relationships:
// Find existing nodes, create relationship
MATCH (a:User {name: 'Alice'})
MATCH (b:User {name: 'Bob'})
CREATE (a)-[:FOLLOWS]->(b);
// Create nodes and relationships together
CREATE (a:User {name: 'Alice'})-[:FOLLOWS]->(b:User {name: 'Bob'});
Create if not exists:
// Create user only if doesn't exist
MERGE (u:User {id: 'user-123'})
ON CREATE SET u.name = 'Alice', u.createdAt = datetime()
ON MATCH SET u.lastSeen = datetime()
RETURN u;
// Create relationship only if doesn't exist
MATCH (a:User {id: 'user-123'})
MATCH (b:User {id: 'user-456'})
MERGE (a)-[r:FOLLOWS]->(b)
ON CREATE SET r.since = datetime()
RETURN r;
Important: MERGE matches on entire pattern:
// This matches on ALL properties
MERGE (u:User {id: 'user-123', name: 'Alice'})
// Better: Match on unique constraint only
MERGE (u:User {id: 'user-123'})
SET u.name = 'Alice'
// Set single property
MATCH (u:User {id: 'user-123'})
SET u.name = 'Alicia'
RETURN u;
// Set multiple properties
MATCH (u:User {id: 'user-123'})
SET u.name = 'Alicia', u.verified = true
RETURN u;
// Set properties from map
MATCH (u:User {id: 'user-123'})
SET u += {name: 'Alicia', age: 31}
RETURN u;
// Add label
MATCH (u:User {id: 'user-123'})
SET u:Verified
RETURN u;
// Delete node (only if no relationships)
MATCH (u:User {id: 'user-123'})
DELETE u;
// Delete node and all relationships
MATCH (u:User {id: 'user-123'})
DETACH DELETE u;
// Delete relationship only
MATCH (a:User)-[r:FOLLOWS]->(b:User)
WHERE a.id = 'user-123' AND b.id = 'user-456'
DELETE r;
// Delete properties
MATCH (u:User {id: 'user-123'})
REMOVE u.age, u.verified
RETURN u;
// Return nodes
MATCH (u:User)
RETURN u;
// Return specific properties
MATCH (u:User)
RETURN u.id, u.name;
// Alias properties
MATCH (u:User)
RETURN u.name AS userName, u.email AS userEmail;
// Return count
MATCH (u:User)
RETURN count(u) AS totalUsers;
// Return distinct
MATCH (u:User)-[:FOLLOWS]->(friend)
RETURN DISTINCT friend.name;
Worked query patterns and mechanical detail, loaded only when needed:
Neo4j implementation is successful when:
*)tools
{{ 𝚫𝚫𝚫 }} Rebuild roadmap-system.zip, the distributable snapshot of the roadmap tooling (scripts, HTML template, conventions reference, and every roadmap-touching skill, including this one).
tools
--- name: "Suggest: Task" description: "{{ 𝚫𝚫𝚫 }} Suggest the next logical task — grounded in the roadmap's pre-vetted ready-set when one exists, codebase analysis otherwise" when_to_use: "When you don't know what to work on next and want a grounded recommendation rather than picking arbitrarily." model: haiku effort: low disable-model-invocation: true allowed-tools: ["Read", "Glob", "Grep", "Bash(python3:*)", "Bash(npm:*)", "Bash(bun:*)", "Bash(pnpm:*)", "Bash(deno:*)"] argument-hint: [named
development
{{ 𝛀𝛀𝛀 }} Convert an old simple-style roadmap (single Markdown, four statuses, <a name> anchors, roadmaps.json pointer registry) into the rich phase-array format (roadmaps.json source of truth + PHASE task list + prose overview).
data-ai
{{ ƔƔƔ }} Create a pull request to main — wordy or shiny (with screenshots), ready-for-review or draft