/neo4j-skills:neo4j-migration-skillfrom neo4j-skills
Migrates Neo4j driver code (Python, JavaScript/Node.js, Java, .NET, Go) and Cypher queries from 4.x/5.x to current versions. Handles package renames, removed APIs, and Cypher 25 syntax changes like id() to elementId() and PERIODIC COMMIT to CALL IN TRANSACTIONS.
Ships in neo4j-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
neo4j-cypher-skillneo4j-cli-tools-skillneo4j-getting-started-skillBefore starting, ask:
package.json, requirements.txt, pom.xml, *.csproj, go.modIf target is >= 2025.06: ask whether Cypher 5 or Cypher 25 dialect will be used (both supported; Cypher 25 is the new default).
# 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.
Apply to every Cypher string, .cypher file, OGM/SDN @Query annotation, and template literal.
| Old syntax | Cypher 25 replacement | Notes |
|---|---|---|
id(n) | elementId(n) | Returns string, not int |
CALL { WITH x ... } | CALL (x) { ... } | Explicit import syntax |
PERIODIC COMMIT | CALL (...) { ... } IN TRANSACTIONS OF 1000 ROWS | Batched writes |
-- comment | // comment | SQL 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 disallowed | Split into MATCH+MERGE |
CREATE INDEX ... OPTIONS { indexProvider: ... } | Remove indexProvider from OPTIONS | Provider selection removed |
db.create.setVectorProperty(...) | Use native VECTOR property type | Procedure removed |
dbms.upgrade() / dbms.upgradeStatus() | Use cypher-shell :sysinfo | Procedures removed |
USE composite.'1' | USE `composite.1` | Backtick entire qualified name |
RETURN 1 as my$Identifier | RETURN 1 as `my$Identifier` | $ removed from unescaped ids |
[:REL*], shortestPath() and allShortestPaths() still run in Cypher 25 — not removed or deprecated. Leave them in code that already compiles. Rewrite only when the user asks or needs a QPE-only feature; semantics differ when a WHERE filters the path — re-test results, not just compilation.
| Existing syntax | QPE / SHORTEST form |
|---|---|
[:REL*1..5] | (()-[:REL]->()){1,5} |
[:REL*] | (()-[:REL]->()){1,} |
[:REL*0..5] | (()-[:REL]->()){0,5} |
shortestPath((a)-[*]->(b)) | SHORTEST 1 (a)(()-[]->()){1,}(b) |
allShortestPaths((a)-[*]->(b)) | ALL SHORTEST (a)(()-[]->()){1,}(b) |
| Version | Syntax |
|---|---|
| Neo4j < 2026.01 | CALL db.index.vector.queryNodes(idx, k, $emb) YIELD node, score |
| Neo4j >= 2026.01 (Cypher 25) | MATCH (n:Label) SEARCH n IN (VECTOR INDEX idx FOR $emb LIMIT k) SCORE AS score — SEARCH is a subclause of MATCH; alone it is a syntax error |
| Neo4j < 2026.09 | CALL db.index.fulltext.queryNodes(idx, $q) YIELD node, score |
| Neo4j >= 2026.09 | MATCH (n:Label) SEARCH n IN (FULLTEXT INDEX idx FOR $q LIMIT k) SCORE AS score — procedures deprecated 2026.10 |
CYPHER 25 (or set the database default language). Don't blanket-prefix code that already compiles unless the user chose thisCYPHER 5 (keeps deprecated forms working)id(n) → elementId(n) CaveatselementId() 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.
- WHERE id(n) = $nodeId # $nodeId was integer
+ WHERE elementId(n) = $nodeId # $nodeId must now be string
Pick the section(s) matching languages found in Step 1.
Min requirements: Python >= 3.10, neo4j package (6.0.0 released 2025-09-30)
# requirements.txt
- neo4j-driver>=5.0.0
+ neo4j>=6.0.0
neo4j-driver package is deprecated since 6.0 and receives no further updates.
| Old | New | Notes |
|---|---|---|
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 class | Bookmarks class | |
TRUST_ALL_CERTIFICATES | trusted_certificates=TrustAll() | Only with neo4j:///bolt:// |
TRUST_SYSTEM_CA_SIGNED_CERTIFICATES | trusted_certificates=TrustSystemCAs() | Only with neo4j:///bolt:// |
neo4j.conf, neo4j.data modules | Removed — use top-level neo4j.* |
With a +s / +ssc URI, remove encrypted= and trusted_certificates= — they raise ConfigurationError there (the scheme already sets TLS).
Drivers and sessions no longer auto-close on GC. Add explicit cleanup:
- 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.
| Old exception | New exception | Trigger |
|---|---|---|
ClientError (for timeout) | ConnectionAcquisitionTimeoutError | Acquisition timeout |
AuthError (invalid config) | ConfigurationError | Invalid auth params |
ValueError raised for Query obj | TypeError | Passing Query to Transaction.run |
execute_query(), GraphDatabase.driver(), neo4j+s:// URI, auth=(user, pw), session run().
Full changelog: references/python-driver.md
Min requirements: Node.js >= 18 (check engines in driver's package.json); package neo4j-driver
| Old | New | Notes |
|---|---|---|
session.readTransaction(fn) | session.executeRead(fn) | |
session.writeTransaction(fn) | session.executeWrite(fn) | |
session.lastBookmark() | session.lastBookmarks() | Returns array |
resultSummary.updateStatistics | resultSummary.counters | |
driver.verifyConnectivity() → ServerInfo | driver.getServerInfo() → ServerInfo | verifyConnectivity() now returns void |
| Old | New |
|---|---|
isRetriableError(err) | isRetryableError(err) (isRetryable is not exported) |
neo4jError.retriable | neo4jError.retryable |
notificationCategory | notificationClassification |
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().
// Safe pattern
const count = record.get('count').toNumber()
Full changelog: references/javascript-driver.md
Min requirements: Java 17+; Maven org.neo4j.driver:neo4j-java-driver:6.x
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
- <version>5.x.x</version>
+ <version>6.0.0</version>
</dependency>
| Removed | Replacement | Notes |
|---|---|---|
RxSession / RxTransaction | ReactiveSession / ReactiveTransaction (org.neo4j.driver.reactivestreams or org.neo4j.driver.reactive Flow); open with driver.session(ReactiveSession.class, cfg) | Rx API removed; reactive API remains |
Bookmark multi-value constructor | One Bookmark.from(String) per value, collected in a Set<Bookmark> | Multi-value form removed |
session.readTransaction(fn) | session.executeRead(fn) | |
session.writeTransaction(fn) | session.executeWrite(fn) | |
TrustStrategy.certFile() | TrustStrategy.trustCustomCertificateSignedBy(path) | |
Notification.severity() | Notification.severityLevel() | Returns typed enum |
neo4j-java-driver-bom no longer imports netty-bom as of 6.0.1. If using Netty native transport, add explicit netty-bom import.
Legacy Logging API deprecated → configure System.Logger instead.
Full changelog: references/java-driver.md
Min requirements: .NET 8, 9, or 10 (.NET Standard 2.1 dropped); NuGet Neo4j.Driver 6.x
- <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 | Replacement | Notes |
|---|---|---|
ILogger | INeo4jLogger | Interface renamed |
ConfigBuilder.WithIpv6Enabled() | Remove call — IPv6 always enabled | |
Config.Ipv6Enabled property | Remove — always true | |
| Simple driver | Use standard IDriver | Removed entirely |
IAsyncSession.ReadTransactionAsync / WriteTransactionAsync | ExecuteReadAsync / ExecuteWriteAsync | Removed in 6.0. Sync code (Neo4j.Driver.Simple, removed) must move to async ExecuteReadAsync/ExecuteWriteAsync |
Full changelog: references/dotnet-driver.md
Min requirements: Go 1.24; module github.com/neo4j/neo4j-go-driver/v6
- 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/.
| Old | New | Notes |
|---|---|---|
neo4j.NewDriver(...) | neo4j.NewDriverWithContext(...) | Context-aware; or just use neo4j.NewDriver (now has context) |
neo4j.Config struct | config.Config | Import github.com/neo4j/neo4j-go-driver/v6/neo4j/config |
neo4j.ServerAddressResolver | config.ServerAddressResolver | |
neo4j.LogLevel / neo4j.ERROR etc. | log.Level / log.ERROR | Import neo4j/log sub-package |
log.Console | log.ToConsole | |
log.Void | log.ToVoid | |
neo4j.Single[T] | neo4j.SingleT[T] (still present; context variant preferred) | |
neo4j.Driver interface | neo4j.DriverWithContext | *WithContext variants are now primary |
neo4j.Session interface | neo4j.SessionWithContext | |
Config.RootCAs field | Config.TlsConfig | Pass *tls.Config directly |
| Notification constants (old pkg) | notifications.* equivalents | Import neo4j/notifications |
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.
- 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
| Neo4j version | Cypher dialect | Driver 6.x compatible | Notes |
|---|---|---|---|
| 4.4 LTS | Cypher 4 | Yes (bolt compat) | Support ended Nov 2025 |
| 5.26 LTS | Cypher 5 | Yes | Supported until Nov 2028 |
| 2025.01–2025.05 | Cypher 5 | Yes | CalVer era begins |
| 2025.06+ | Cypher 5 or 25 | Yes | Cypher 25 new default |
| 2026.01+ | Cypher 25 | Yes | SEARCH clause available |
| 2026.07.0 | Cypher 25 | Yes | Skip this patch — block-format UTF-8 regression makes trim() fail queries and corrupt stored strings; upgrade target is 2026.07.1 |
| 2026.08+ | Cypher 25 | Yes | UUID 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; skip 2026.08.0 (query-failure bug) — target 2026.08.1+ |
| 2026.09+ | Cypher 25 | Yes | SEARCH clause accepts FULLTEXT INDEX; page cache reserves full server.memory.pagecache.size at startup |
| 2026.10+ | Cypher 25 | Yes | db.index.fulltext.queryNodes / queryRelationships deprecated → SEARCH ... FULLTEXT INDEX; map addition map1 + map2; legacy Browser removed from distribution in 2026.11.0 (new Browser only) |
| Self-managed after 2026 LTS | Cypher 25 | Yes | Default native-user password minimum 8 → 16 chars (pin dbms.security.auth_minimum_password_length to keep old value); new installs default query log format PLAIN → JSON (existing server-logs.xml kept) — update log parsers |
| Aura after 2026.12 LTS | Cypher 25 | Yes | dbms.components() switches from fixed 5.27 to calendar version (e.g. 2027.01) — fix code (incl. Kafka/Spark/GraphQL integrations) that parses a 5.x string |
| Aura 2027.01 | Cypher 25 | Yes | Native-user password minimum 8 → 16 chars on create/change |
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 — Neo4j refuses to start on a high_limit store after that LTS; run offline neo4j-admin database migrate --to-format=block <db> on or before the LTS.
Server JVM: 2026.x runs on Java SE 21 or 25; Java 21 support ends with the 2026 LTS — move servers to Java 25 [2026.08 deprecation].
No downgrades supported — take a backup before any server upgrade.
# 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:
# 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>"}'
| Error | Cause | Fix |
|---|---|---|
id(n) returns string, int comparison fails | elementId() returns string | Update stored IDs to string; fix WHERE clauses |
Cannot merge node using null property value | MERGE key resolved to null | Validate params before MERGE |
Neo4j.Driver.Exceptions.AuthenticationException | Wrong credential config after .NET rename | Update INeo4jLogger usage; verify config |
TypeError: neo4j-driver is deprecated | Old package installed | Replace with neo4j>=6.0.0 in requirements |
AttributeError: 'Session' has no 'read_transaction' | Python 5→6, method removed | Replace with execute_read() |
RxSession not found | Java 6.x, Rx API removed | Migrate to ReactiveSession |
undefined is not a function (.readTransaction) | JS 6.x, method removed | Replace with executeRead() |
Go: undefined: neo4j.Config | v5 import path still present | Update all imports to /v6/ |
PERIODIC COMMIT not supported | Cypher 25, clause removed | Use CALL (...) IN TRANSACTIONS |
Unknown function id() | id() removed in Cypher 25 | Replace with elementId() |
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/
id(n) → elementId(n) and downstream int→string conversions fixedPERIODIC COMMIT → CALL IN TRANSACTIONS in all batch writesCALL { WITH x ... } → CALL (x) { ... } in all subqueriesneo4j-driver → neo4j)read_transaction/readTransaction → execute_read/executeRead).close())last_bookmark → last_bookmarks, Bookmark → Bookmarks)/v5/ to /v6/; neo4j.Config → config.ConfigRxSession → ReactiveSessionILogger → INeo4jLogger; ReadTransactionAsync/WriteTransactionAsync → ExecuteReadAsync/ExecuteWriteAsync; Neo4j.Driver.Signed → Neo4j.DriverEXPLAIN run on all migrated Cypher queries; no errorsREADME.md (opens in a new tab)references/cypher-queries.md (opens in a new tab)references/dotnet-driver.md (opens in a new tab)references/go-driver.md (opens in a new tab)references/java-driver.md (opens in a new tab)references/javascript-driver.md (opens in a new tab)references/python-driver.md (opens in a new tab)references/relational-to-graph.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Python, JavaScript, Java, Go, SQL
npx claudepluginhub neo4j/agent-skills --plugin neo4j-skills30 skills in this plugin
/neo4j-agent-memory-skillAuthoritative reference for the neo4j-agent-memory Python package — a graph-native memory system for AI agents built on Neo4j — and for the hosted service (NAMS) at memory.neo4jlabs.com. Use this skill whenever the user mentions neo4j-agent-memory, agent memory with Neo4j, context graphs, the POLE+O model, MemoryClient/MemorySettings, the memory MCP server, or any of the framework integrations (LangChain, PydanticAI, CrewAI, AWS Strands, Google ADK, Microsoft Agent Framework, OpenAI Agents, LlamaIndex). Also use when the user mentions the hosted service at memory.neo4jlabs.com, NAMS, the Neo4j Agent Memory Service, the `nams_` API key prefix, or the hosted MCP endpoint. Also use when writing documentation, blog posts, tutorials, PRDs, or code samples for the project, when comparing agent memory approaches, or when positioning graph-native memory against vector-only approaches — even if the user doesn't explicitly name the package. Does NOT handle GraphRAG pipelines — use neo4j-graphrag-skill./neo4j-aura-agent-skillManages Neo4j Aura Agents via the v2beta1 REST API — create, list, get, update, delete, and invoke Aura agents backed by an AuraDB instance. Use when configuring Aura Agent tools (CypherTemplate, SimilaritySearch, Text2Cypher), setting system prompts, deploying agents to REST or MCP endpoints, invoking agents with natural language queries, or generating evaluation datasets (max 50 questions) for the Aura Agent evaluation feature. Covers OAuth2 auth, organization/project scoping, tool parameter schemas, and InvokeAgentResponse format. Does NOT cover AuraDB instance provisioning — use neo4j-aura-provisioning-skill. Does NOT cover vector index creation — use neo4j-vector-index-skill./neo4j-aura-graph-analytics-skillServerless Aura Graph Analytics (AGA) GDS Sessions — covers GdsSessions, AuraGraphDataScience, AuraAPICredentials, DbmsConnectionInfo, SessionMemory, get_or_create, remote graph projection with gds.graph.project.cypher and gds.graph.project.remote, gds.graph.project.native, gds.graph.construct, graphdatascience client 2.0 session endpoints, async compute and gds.jobs, AuraDB Cypher API memory/sessionId projection, algorithms, write-back, and session lifecycle. Use for AuraDB-connected, self-managed Neo4j, or standalone DataFrame/Spark session workloads. Does NOT cover the embedded GDS plugin on Aura Pro or self-managed Neo4j — use neo4j-gds-skill. Does NOT handle Cypher authoring — use neo4j-cypher-skill. Does NOT cover Snowflake Graph Analytics — use neo4j-snowflake-graph-analytics-skill./neo4j-aura-provisioning-skillProvisions and manages Neo4j Aura instances via CLI (aura-cli v1.7+) or REST API. Use when creating, pausing, resuming, resizing, or deleting AuraDB Free/Professional/Business Critical/VDC instances; downloading credentials; scripting CI/CD pipelines; polling async status; or using the Terraform neo4j-labs/neo4jaura provider. Covers auth setup (client credentials OAuth2), credential lifecycle (download once — never recoverable), instance type selection, region codes, and Python provisioning scripts. Does NOT handle Cypher queries — use neo4j-cypher-skill. Does NOT cover Graph Data Science algorithms — use neo4j-gds-skill or neo4j-aura-graph-analytics-skill. Does NOT cover neo4j-admin/cypher-shell — use neo4j-cli-tools-skill./neo4j-cli-tools-skillUse when working with Neo4j command-line tools — neo4j-cli (modern unified CLI — Cypher via Bolt, schema inspection, Aura management, Docker containers, credential management, agent skill catalog install; install with curl -sSfL https://neo4j.sh/install.sh | bash), neo4j-admin (backup, restore, import, memory sizing), cypher-shell (ad-hoc queries, scripting, CI/CD), or neo4j-mcp (quick MCP server install). Does NOT cover Cypher query authoring — use neo4j-cypher-skill. Does NOT cover driver upgrades — use neo4j-migration-skill. Does NOT cover full MCP editor configuration — use neo4j-mcp-skill. Does NOT cover the relate embedded engine (relatedb.ai) — use the relate skill; choice guide in neo4j-getting-started-skill./neo4j-cypher-skillGenerates, optimizes, and validates Cypher 25 queries for Neo4j 2025.x and 2026.x. Use when writing new Cypher queries, optimizing slow queries, graph pattern matching, vector or fulltext search, subqueries, or batch writes. Covers MATCH, MERGE, CREATE, WITH, RETURN, CALL, UNWIND, FOREACH, LOAD CSV, SEARCH, expressions, functions, indexes, and subqueries. Does NOT handle driver migration or API changes — use neo4j-migration-skill. Does NOT cover DB administration or server ops — use neo4j-cli-tools-skill. Does NOT cover Cypher on the relate embedded engine — use the relate skill.Other plugins' skills for the same job