Skip to content
Back to skills

Clod Stack Cypher

ASecurity

Neo4j and Cypher: graph schema design, query patterns, performance optimisation, PostgreSQL integration.

  • 7 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
ai-agentsgosqlnodedatabaseperformance

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add JasonWarrenUK/goblin-mode --skill clod-stack-cypher --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clod Stack Cypher?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clod Stack Cypher
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jasonwarrenuk-clod-stack-cypher/badge)](https://www.skillsdirectory.com/skills/jasonwarrenuk-clod-stack-cypher)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "Stack: Cypher"
description: "Neo4j and Cypher: graph schema design, query patterns, performance optimisation, PostgreSQL integration."
when_to_use: "When writing or reviewing Cypher queries, designing a graph schema or bridging Neo4j with a relational store; the Cypher can live in .cypher files or embedded strings."
user-invocable: false
metadata:
  family: clod-stack
  goblin-spinner: traversing the graph|matching nodes|writing cypher
# No paths gate: Cypher mostly lives inside .ts strings, not .cypher files, so
# file identity is an unreliable proxy for relevance
allowed-tools:
  - Read
  - Glob
  - Grep
---

# Neo4j and Cypher

The basics (`MATCH`, `CREATE`, `SET`, `DELETE`, `RETURN`) are assumed. This file holds the conventions and the mistakes that are easy to make; the worked patterns are in the supporting files.

## Conventions

- Relationship types are UPPERCASE: `FOLLOWS`, `MEMBER_OF`.
- An entity that lives in both PostgreSQL and Neo4j carries the same UUID in each.

## Gotchas

**`MERGE` matches on the entire pattern.** Merge on the unique key alone, then set the rest:

```cypher
// ✗ Matches on ALL properties
MERGE (u:User {id: 'user-123', name: 'Alice'})

// ✓ Match on the unique key only
MERGE (u:User {id: 'user-123'})
ON CREATE SET u.createdAt = datetime()
ON MATCH SET u.lastSeen = datetime()
SET u.name = 'Alice'
```

**`DELETE` only removes a node that has no relationships.** `DETACH DELETE` removes the node and its relationships together.

**Bound every variable-length traversal.** `[:FOLLOWS*1..3]`, never a bare `[:FOLLOWS*]`.

**Two disconnected patterns make a Cartesian product.** `MATCH (a:User), (b:User)` pairs every user with every other; join them through a relationship or a shared node.

## Additional resources

Worked query patterns and mechanical detail, loaded only when needed:

- [query-patterns.md](query-patterns.md): social graph (followers, blocking), hierarchy (org charts, categories), recommendation (collaborative/content-based filtering), path-finding (shortest path, Dijkstra), access control
- [performance-and-schema.md](performance-and-schema.md): indexes/constraints, PROFILE-driven optimisation tips, batch operations with UNWIND/APOC, schema modelling guidelines (relationships vs properties, multiple labels)
- [postgres-integration.md](postgres-integration.md): shared-key and event-driven sync patterns with Supabase, hybrid query examples

## Success Criteria

Neo4j implementation is successful when:

- Queries leverage graph traversal strengths
- Indexes on frequently queried properties
- Bounded traversals (not unbounded `*`)
- Clear distinction between nodes/relationships/properties
- Integration with relational database clean
- Performance acceptable for use case
- Schema supports future requirements

Files in this skill

  • SKILL.md6.3 KB
  • performance-and-schema.md3.6 KB
  • postgres-integration.md1.7 KB
  • query-patterns.md4.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.