neo4j-cypher-skill

Generates, optimizes, and validates Cypher 25 queries for Neo4j 2025.x and 2026.x databases.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires neo4j, python-dotenv, and includes scripts (resource) and references (resource) components.

What problem does it solve? Writing correct, performant Cypher queries for modern Neo4j versions is error-prone: syntax changed significantly in Cypher 25, deprecated patterns from older versions produce broken queries, and subtle issues like Eager operators, missing indexes, or wrong MERGE usage cause slow or incorrect results. This Skill generates schema-aware, version-gated Cypher queries and validates them before execution. ## Core Features & Use Cases - Schema-first query generation: Inspects the live database or reads a <db-name>-schema.json file before writing any query, so labels, relationship types, and properties are always real. - Cypher 25 coverage with version gates: Handles QPEs, subqueries (EXISTS, COUNT, COLLECT, CALL (x)), CALL IN TRANSACTIONS batch writes, vector/fulltext SEARCH, dynamic labels, and GRAPH TYPE DDL, with annotated fallbacks for older versions. - Optimization and validation: Detects anti-patterns like AllNodesScan, CartesianProduct, and Eager, enforces EXPLAIN/PROFILE workflows, and applies a write-execution gate before mutating data. - Use Case: Ask for a shortest-path route between two airports with a distance constraint, and receive a parameterized SHORTEST 1 QPE query validated against your actual schema, with index recommendations. ## Quick Start Ask the assistant to write a Cypher query against your Neo4j database, for example to find the shortest path between two nodes or batch-import a CSV file, and it will inspect the schema first and return a validated Cypher 25 query.

Frequently Asked Questions about neo4j-cypher-skill

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

FAQPage Schema
How do I write Cypher queries for Neo4j 2025 with an AI assistant?

Activate this Skill and describe the query you need in natural language. It inspects your database schema first, then generates a parameterized Cypher 25 query with the correct labels, relationship types, and version-appropriate syntax.

How to optimize a slow Cypher query in Neo4j?

Run EXPLAIN or PROFILE on the query and check for red flags like AllNodesScan, CartesianProduct, or Eager operators. The Skill applies fixes such as adding specific labels, collecting before writes, using CALL IN TRANSACTIONS for batching, and adding index hints.

Does this Skill support Neo4j vector search and fulltext search?

Yes. It covers the SEARCH clause for vector indexes introduced in Neo4j 2026.01, with a procedure-based fallback using db.index.vector.queryNodes for 2025.x, and db.index.fulltext.queryNodes for fulltext search on any supported version.

What Neo4j versions are compatible with this Cypher skill?

The baseline is Neo4j 2025.01 with Cypher 25, and features introduced in 2025.x and 2026.x are annotated with version gates and fallbacks. Older Neo4j 5.x patterns are covered in reference files where syntax differs.

When should I not use this Cypher generation skill?

Do not use it for driver migration or API changes across Neo4j versions, which belongs to neo4j-migration-skill, or for database administration tasks like users, configuration, and backups, which belongs to neo4j-cli-tools-skill.

Why does my Cypher MERGE create duplicate nodes?

MERGE without a uniqueness constraint has no atomicity guarantee, so concurrent MERGE operations can create duplicates. The Skill enforces MERGE only on constrained keys and recommends creating a uniqueness constraint before loading data.