Neo4j Migration Skill logo

Neo4j Migration Skill

Organization
neo4j-contrib
neo4j-migration-skill

Migrates Neo4j driver code and Cypher queries from older versions (4.x, 5.x) to current (2025.x/2026.x, Cypher 25). Covers Python, JavaScript/Node.js, Java, .NET, and Go drivers — package renames, removed APIs, version requirements, diff-ready fixes. Also handles Cypher syntax migration — QPE paths, CALL subqueries, id() → elementId(), PERIODIC COMMIT → CALL IN TRANSACTIONS, and all Cypher 25 removals. Does NOT write new Cypher queries — use neo4j-cypher-skill. Does NOT cover DB administration or server ops — use neo4j-cli-tools-skill. Does NOT provision new Neo4j instances — use neo4j-getting-started-skill.

Overview

Publisherneo4j-contrib
Repositoryneo4j-skills
Skill nameneo4j-migration-skill
Stars
112
Forks
38
Bundled files
7
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by neo4j-contrib on GitHub. Read the source before you install it.

Installation

Install the Neo4j Migration Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/neo4j-contrib/neo4j-skills.git /tmp/neo4j-skills
mkdir -p .claude/skills
cp -r /tmp/neo4j-skills/neo4j-migration-skill .claude/skills/neo4j-migration-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Neo4j Migration Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Neo4j Migration Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Neo4j Migration Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

When to Use

  • Upgrading driver dependency from 4.x or 5.x to 6.x
  • Migrating Cypher queries to Cypher 25 syntax
  • Fixing deprecated API warnings after a driver or Neo4j version bump
  • Auditing a codebase for removed/deprecated Neo4j APIs before upgrading

When NOT to Use

  • Writing new Cypher queriesneo4j-cypher-skill
  • DB admin (backup, restore, import, cypher-shell) → neo4j-cli-tools-skill
  • Starting freshneo4j-getting-started-skill
  • GDS algorithm migration — not covered here; consult GDS release notes

Entry Criteria

Before starting, ask:

  1. Target Neo4j version — needed to select Cypher dialect and driver version
  2. Languages in use — scan package.json, requirements.txt, pom.xml, *.csproj, go.mod
  3. Current driver versions — read from dependency files; do NOT guess

If target is >= 2025.06: ask whether Cypher 5 or Cypher 25 dialect will be used (both supported; Cypher 25 is the new default).


Step 1 — Scan Codebase

bash
# Find Cypher strings (queries embedded in source)
grep -rn "MATCH\|MERGE\|CREATE\|CALL\|RETURN" --include="*.py" --include="*.js" \
  --include="*.ts" --include="*.java" --include="*.cs" --include="*.go" \
  --include="*.cypher" --include="*.cql" . | grep -v ".git"

# Find dependency files
find . -name "requirements*.txt" -o -name "package.json" -o -name "pom.xml" \
  -o -name "*.csproj" -o -name "go.mod" | grep -v ".git" | grep -v node_modules

Collect findings before modifying anything. List all deprecated patterns found.


Step 2 — Cypher Migration (4.x / 5.x → Cypher 25)

Apply to every Cypher string, .cypher file, OGM/SDN @Query annotation, and template literal.

Complete Substitution Table

Old syntaxCypher 25 replacementNotes
[:REL*1..5](()-[:REL]->()){1,5}QPE quantifier group
[:REL*](()-[:REL]->()){1,}Unbounded QPE
[:REL*0..5](()-[:REL]->()){0,5}Zero-hop allowed
shortestPath((a)-[*]->(b))SHORTEST 1 (a)(()-[]->()){1,}(b)QPE shortest path
allShortestPaths((a)-[*]->(b))ALL SHORTEST (a)(()-[]->()){1,}(b)QPE all-shortest
id(n)elementId(n)Returns string, not int
CALL { WITH x ... }CALL (x) { ... }Explicit import syntax
PERIODIC COMMITCALL (...) { ... } IN TRANSACTIONS OF 1000 ROWSBatched writes
-- comment// commentSQL comment invalid
SET n = r (structural val)SET n = properties(r)Extract map first
MERGE (a {x:1})-[:T]->(b {x:a.x})Rewrite — cross-entity MERGE refs disallowedSplit into MATCH+MERGE
CREATE INDEX ... OPTIONS { indexProvider: ... }Remove indexProvider from OPTIONSProvider selection removed
db.create.setVectorProperty(...)Use native VECTOR property typeProcedure removed
dbms.upgrade() / dbms.upgradeStatus()Use cypher-shell :sysinfoProcedures removed
USE composite.'1'USE `composite.1`Backtick entire qualified name
RETURN 1 as my$IdentifierRETURN 1 as `my$Identifier`$ removed from unescaped ids

Vector Index Queries (version-branched)

VersionSyntax
Neo4j < 2026.01CALL db.index.vector.queryNodes(idx, k, $emb) YIELD node, score
Neo4j >= 2026.01SEARCH n IN (VECTOR INDEX idx FOR $emb LIMIT k) SCORE AS score

Cypher Dialect Prefix Rule

  • Target >= 2025.06, dialect = Cypher 25: prepend CYPHER 25 to every top-level query
  • Target >= 2025.06, dialect = Cypher 5: prepend CYPHER 5 (keeps deprecated forms working)
  • Target 4.x or 5.x: no prefix needed; fetch changelog per references/cypher-queries.md

id(n)elementId(n) Caveats

elementId() returns a string (e.g., "4:abc123:0"), not an integer. Fix downstream code that stores or compares it as int. Do NOT use elementId() values for numeric operations.

diff
- WHERE id(n) = $nodeId   # $nodeId was integer
+ WHERE elementId(n) = $nodeId  # $nodeId must now be string

Step 3 — Driver Migration

Pick the section(s) matching languages found in Step 1.


Python Driver (5.x → 6.x)

Min requirements: Python >= 3.10, neo4j package (6.0+, released Jan 12 2026)

Package Rename — do this first
diff
# requirements.txt
- neo4j-driver>=5.0.0
+ neo4j>=6.0.0

neo4j-driver package is deprecated since 6.0 and receives no further updates.

Removed APIs
OldNewNotes
session.read_transaction(fn)session.execute_read(fn)
session.write_transaction(fn)session.execute_write(fn)
session.last_bookmark()session.last_bookmarks()Returns Bookmarks (plural)
Bookmark classBookmarks class
TRUST_ALL_CERTIFICATEStrusted_certificates=TrustAll()
TRUST_SYSTEM_CA_SIGNED_CERTIFICATEStrusted_certificates=TrustSystemCAs()
neo4j.conf, neo4j.data modulesRemoved — use top-level neo4j.*
Resource Management Change

Drivers and sessions no longer auto-close on GC. Add explicit cleanup:

diff
- driver = GraphDatabase.driver(URI, auth=(USER, PASS))
- # used without explicit close
+ with GraphDatabase.driver(URI, auth=(USER, PASS)) as driver:
+     with driver.session(database="neo4j") as session:
+         ...

Or call .close() explicitly. Repeated .close() is a no-op.

Error Handling Changes
Old exceptionNew exceptionTrigger
ClientError (for timeout)ConnectionAcquisitionTimeoutErrorAcquisition timeout
AuthError (invalid config)ConfigurationErrorInvalid auth params
ValueError raised for Query objTypeErrorPassing Query to Transaction.run
Key APIs Unchanged

execute_query(), GraphDatabase.driver(), neo4j+s:// URI, auth=(user, pw), session run().

Full changelog: references/python-driver.md


JavaScript / Node.js Driver (5.x → 6.x)

Min requirements: Node.js >= 18 (check engines in driver's package.json); package neo4j-driver

Removed APIs
OldNewNotes
session.readTransaction(fn)session.executeRead(fn)
session.writeTransaction(fn)session.executeWrite(fn)
session.lastBookmark()session.lastBookmarks()Returns array
resultSummary.updateStatisticsresultSummary.counters
driver.verifyConnectivity()ServerInfodriver.getServerInfo()ServerInfoverifyConnectivity() now returns void
Deprecated in 6.0 (will be removed in 7.0)
OldNew
isRetriableError(err)isRetryable(err)
neo4jError.retriableneo4jError.retryable
notificationCategorynotificationClassification
Integer Handling

Neo4j integers map to neo4j.Integer (64-bit). Use .toNumber() or .toInt() for arithmetic. Large values (> 2^53) lose precision — store as string with .toString().

javascript
// Safe pattern
const count = record.get('count').toNumber()

Full changelog: references/javascript-driver.md


Java Driver (5.x → 6.x)

Min requirements: Java 21; Maven org.neo4j.driver:neo4j-java-driver:6.x

Maven Coordinates
diff
<dependency>
  <groupId>org.neo4j.driver</groupId>
  <artifactId>neo4j-java-driver</artifactId>
- <version>5.x.x</version>
+ <version>6.0.0</version>
</dependency>
Removed APIs
RemovedReplacementNotes
RxSession / RxTransactionUse async AsyncSession or sync SessionReactive API removed
Bookmark multi-value constructorBookmark.from(iterable)
session.readTransaction(fn)session.executeRead(fn)
session.writeTransaction(fn)session.executeWrite(fn)
TrustStrategy.certFile()TrustStrategy.trustCustomCertificateSignedBy(path)
Notification.severity()Notification.severityLevel()Returns typed enum
Dependency Note (BOM)

neo4j-java-driver-bom no longer imports netty-bom as of 6.0.1. If using Netty native transport, add explicit netty-bom import.

Logging

Legacy Logging API deprecated → configure System.Logger instead.

Full changelog: references/java-driver.md


.NET Driver (5.x → 6.x)

Min requirements: .NET 8, 9, or 10 (.NET Standard 2.1 dropped); NuGet Neo4j.Driver 6.x

NuGet Package
diff
- <PackageReference Include="Neo4j.Driver" Version="5.*" />
+ <PackageReference Include="Neo4j.Driver" Version="6.*" />

Neo4j.Driver.Signed no longer receives updates — switch to Neo4j.Driver (now signed).

Removed APIs
RemovedReplacementNotes
ILoggerINeo4jLoggerInterface renamed
ConfigBuilder.WithIpv6Enabled()Remove call — IPv6 always enabled
Config.Ipv6Enabled propertyRemove — always true
Simple driverUse standard IDriverRemoved entirely

Full changelog: references/dotnet-driver.md


Go Driver (5.x → 6.x)

Min requirements: Go 1.24; module github.com/neo4j/neo4j-go-driver/v6

go.mod Update
diff
- require github.com/neo4j/neo4j-go-driver/v5 v5.x.x
+ require github.com/neo4j/neo4j-go-driver/v6 v6.x.x

Update all imports from /v5/ to /v6/.

Removed APIs and Replacements
OldNewNotes
neo4j.NewDriver(...)neo4j.NewDriverWithContext(...)Context-aware; or just use neo4j.NewDriver (now has context)
neo4j.Config structconfig.ConfigImport github.com/neo4j/neo4j-go-driver/v6/neo4j/config
neo4j.ServerAddressResolverconfig.ServerAddressResolver
neo4j.LogLevel / neo4j.ERROR etc.log.Level / log.ERRORImport neo4j/log sub-package
log.Consolelog.ToConsole
log.Voidlog.ToVoid
neo4j.Single[T]neo4j.SingleT[T] (still present; context variant preferred)
neo4j.Driver interfaceneo4j.DriverWithContext*WithContext variants are now primary
neo4j.Session interfaceneo4j.SessionWithContext
Config.RootCAs fieldConfig.TlsConfigPass *tls.Config directly
Notification constants (old pkg)notifications.* equivalentsImport neo4j/notifications
Context API Consolidation

In v6, neo4j.NewDriverWithContext is the canonical constructor. The old *WithContext method names are deprecated (targeted for removal in v7) — base names now include context by default.

diff
- driver, err := neo4j.NewDriver(uri, neo4j.BasicAuth(user, pass, ""))
+ driver, err := neo4j.NewDriverWithContext(uri, neo4j.BasicAuth(user, pass, ""))

Full migration guide: references/go-driver.md


Step 4 — Version Compatibility Matrix

Neo4j versionCypher dialectDriver 6.x compatibleNotes
4.4 LTSCypher 4Yes (bolt compat)Support ended Nov 2025
5.26 LTSCypher 5YesSupported until Nov 2028
2025.01–2025.05Cypher 5YesCalVer era begins
2025.06+Cypher 5 or 25YesCypher 25 new default
2026.01+Cypher 25YesSEARCH clause available
2026.07.0Cypher 25YesSkip this patch — block-format UTF-8 regression makes trim() fail queries and corrupt stored strings; upgrade target is 2026.07.1
2026.08+Cypher 25YesUUID type + string interpolation added; UUID properties require driver >= 6.2 (Python >= 6.3) — older drivers return placeholder MAP and warn 03N95; 2026.08 bundles Java driver 6.2.1

Store format: no changes between 4.4 and 2026.x. block format default for new Enterprise dbs since 5.22. high_limit and standard deprecated in 5.23, removed after 2026 LTS.

No downgrades supported — take a backup before any server upgrade.


Step 5 — Test After Migration

bash
# Python: run with dev mode to surface all deprecation warnings
python -W error::DeprecationWarning -m pytest tests/

# JS: run tests
npm test

# Java
mvn test

# .NET
dotnet test

# Go
go test ./...

After test run: if any DeprecationWarning or deprecated-API log appears, treat as ERROR — fix before proceeding.

For Cypher: run each migrated query through EXPLAIN first:

bash
# Via Query API v2
curl -X POST https://<host>/db/<database>/query/v2 \
  -u <user>:<password> -H "Content-Type: application/json" \
  -d '{"statement": "EXPLAIN <your query>"}'

Common Migration Errors

ErrorCauseFix
id(n) returns string, int comparison failselementId() returns stringUpdate stored IDs to string; fix WHERE clauses
Cannot merge node using null property valueMERGE key resolved to nullValidate params before MERGE
Neo4j.Driver.Exceptions.AuthenticationExceptionWrong credential config after .NET renameUpdate INeo4jLogger usage; verify config
TypeError: neo4j-driver is deprecatedOld package installedReplace with neo4j>=6.0.0 in requirements
AttributeError: 'Session' has no 'read_transaction'Python 5→6, method removedReplace with execute_read()
RxSession not foundJava 6.x, Reactive API removedMigrate to async or sync session
undefined is not a function (.readTransaction)JS 6.x, method removedReplace with executeRead()
Go: undefined: neo4j.Configv5 import path still presentUpdate all imports to /v6/
PERIODIC COMMIT not supportedCypher 25, clause removedUse CALL (...) IN TRANSACTIONS
Unknown function id()id() removed in Cypher 25Replace with elementId()

References

Load on demand — high discovery rate because explicitly linked:

For any syntax not covered above, fetch: https://neo4j.com/docs/cypher-manual/25/deprecations-additions-removals-compatibility/


Checklist

  • Target Neo4j version confirmed; Cypher dialect selected (Cypher 5 or 25)
  • Dependency files scanned; all driver versions identified
  • Cypher substitution table applied to every query in codebase
  • id(n)elementId(n) and downstream int→string conversions fixed
  • PERIODIC COMMITCALL IN TRANSACTIONS in all batch writes
  • CALL { WITH x ... }CALL (x) { ... } in all subqueries
  • Package renames done (Python: neo4j-driverneo4j)
  • Deprecated session methods replaced (read_transaction/readTransactionexecute_read/executeRead)
  • Resource cleanup added where missing (Python: context managers or .close())
  • Bookmark API updated (last_bookmarklast_bookmarks, BookmarkBookmarks)
  • Go imports updated from /v5/ to /v6/; neo4j.Configconfig.Config
  • Java: Java 21 confirmed; RxSession usages removed
  • .NET: ILoggerINeo4jLogger; Neo4j.Driver.SignedNeo4j.Driver
  • Tests pass with no DeprecationWarnings
  • EXPLAIN run on all migrated Cypher queries; no errors

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Neo4j Migration Skill AI skill do?

Migrates Neo4j driver code and Cypher queries from older versions (4.x, 5.x) to current (2025.x/2026.x, Cypher 25). Covers Python, JavaScript/Node.js, Java, .NET, and Go drivers — package renames, removed APIs, version requirements, diff-ready fixes. Also handles Cypher syntax migration — QPE paths, CALL subqueries, id() → elementId(), PERIODIC COMMIT → CALL IN TRANSACTIONS, and all Cypher 25 removals. Does NOT write new Cypher queries — use neo4j-cypher-skill. Does NOT cover DB administration or server ops — use neo4j-cli-tools-skill. Does NOT provision new Neo4j instances — use neo4j-gett...

Why use Neo4j Migration Skill on TypingMind?

Because you install it once and use it with any model. Neo4j Migration Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Neo4j Migration Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-migration-skill. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Neo4j Migration Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Neo4j Migration Skill?

As many as you like. As long as a model supports skills, you can use Neo4j Migration Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Neo4j Migration Skill AI skill free?

Yes. It is published on GitHub by neo4j-contrib under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇