
Neo4j Cypher Guide
If you're building text2cypher tools or having LLMs generate Neo4j queries, this guide keeps you out of trouble with deprecated syntax. It covers the critical stuff like why id() is gone (use elementId() instead), how to handle null values when sorting (always filter them), and when to reach for modern patterns like Quantified Path Patterns for complex traversals. The checklist format makes it easy to validate generated queries before they hit production. Most valuable if you're migrating from older Neo4j versions or need to teach an LLM the difference between legacy pattern expressions and modern COLLECT subqueries. The sorting gotchas alone will save you debugging time.
- skills.sh installs
- 155
- GitHub stars
- 1.6K
- last updated
- Jun 3, 2026
Install
$ npx -y skills add tomasonjo/blogs --skill neo4j-cypher-guide --agent claude-codeInstalls into .claude/skills of the current project.
Files
Neo4j Modern Cypher Query Guide
This skill helps generate Neo4j Cypher read queries using modern syntax patterns and avoiding deprecated features. It focuses on efficient query patterns for graph traversal and data retrieval.
Quick Compatibility Check
When generating Cypher queries, immediately avoid these REMOVED features:
- ❌
id()function → UseelementId() - ❌ Implicit grouping keys → Use explicit WITH clauses
- ❌ Pattern expressions for lists → Use pattern comprehension or COLLECT subqueries
- ❌ Repeated relationship variables → Use unique variable names
- ❌ Automatic list to boolean coercion → Use explicit checks
Core Principles for Query Generation
- Use modern syntax patterns - QPP for complex traversals, CALL subqueries for complex reads
- Optimize during traversal - Filter early within patterns, not after expansion
- Always filter nulls when sorting - Add IS NOT NULL checks for sorted properties
- Explicit is better than implicit - Always use explicit grouping and type checking
Critical Sorting Rule
Sponsors
Details
- Repository
- github.com/tomasonjo/blogs
- Categories
- Documentation, Databases
- First seen
- Jun 3, 2026