Back to skills
extension
Category: Development & EngineeringNo API key required

Neo4j-Modern-Cypher-Query-Guide

这是一个面向 Neo4j 5.x 的现代 Cypher 查询开发工具,支持: 1. 自动检测并替换已废弃的 Cypher 语法,确保与 Neo4j 5.x 完全兼容; 2. 生成符合企业级规范的图构建、数据导入和查询优化代码; 3. 提供 Python 脚本模板,一键连接本地 Neo4j Desktop 2 进行数据导入; 4. 包含常见错误排查方案,提升开发效率。 适用于图数据库开发、知识图谱构建、Cypher 代码迁移与优化等场景。

personAuthor: mjkyleohubModelScope

Neo4j Modern Cypher Query Guide

Production-grade guidance for Neo4j 5.x Cypher generation and migration. This skill is optimized for AI-assisted workflows and enterprise consistency.

When to Apply

Use this skill when tasks involve:

  • Writing modern Cypher queries for Neo4j 5.x
  • Migrating legacy Cypher to supported syntax
  • Building nodes and relationships with deterministic MERGE patterns
  • Generating Python scripts for Neo4j Desktop 2 data import
  • Producing graph analysis queries and interpretation templates

Rule Categories by Priority

| Priority | Category | Impact | Prefix | | -------- | --------------------------- | -------- | -------------- | | 1 | Compatibility and Safety | CRITICAL | compat- | | 2 | Query Construction | HIGH | query- | | 3 | Read Patterns and Analytics | HIGH | read- | | 4 | Data Import Workflows | MEDIUM | import- | | 5 | Troubleshooting | MEDIUM | troubleshoot-|

Quick Reference

  • rules/compat-deprecated-syntax.md
  • rules/query-modern-construction.md
  • rules/read-subqueries-and-qpp.md
  • rules/import-desktop2-python.md
  • rules/troubleshoot-common-errors.md

Required Output Standard

For migration requests, return:

  1. Issue(s) - why the old query is invalid or risky
  2. Modern Query (Neo4j 5.x) - ready-to-run Cypher
  3. Rationale - concise explanation of key changes

For generation requests, return:

  1. Cypher (parameterized where possible)
  2. Validation Query (to verify imported graph)
  3. Optional Performance Notes (PROFILE, indexing, null-safe sort)

Additional Resources

  • Full compiled handbook: AGENTS.md
  • Structure and contribution guide: README.md