neo4j-driver-java-skill

Official

Connect safely to Neo4j with Java

Authorneo4j-contrib
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Neo4j application developers struggle to implement correct, production-safe connection and transaction handling with the official Java Driver, leading to subtle bugs like leaked sessions, invalid result lifecycles, and unreliable error recovery.

Core Features & Use Cases

  • Dependency setup (Maven/Gradle): add the official neo4j-java-driver v6 artifact with the right version.
  • Driver lifecycle best practices: create a long-lived Driver, call verifyConnectivity, and close it correctly.
  • Correct querying APIs and transaction models: use executableQuery as the recommended default and use executeRead/executeWrite managed transactions safely (including result consumption inside callbacks).
  • Async and reactive access: use CompletableFuture/CompletionStage patterns and Reactor/Rx reactive sessions for non-blocking execution.
  • Robust error handling and retry awareness: handle ServiceUnavailableException, transient failures, Neo4jException, and design around commit uncertainty for explicit transactions.
  • Type mapping and null-safety: safely extract values with the correct accessors, avoid pitfalls with graph nulls and absent keys, and map results to Java records.

Use case example: Build a Java service that reads customer nodes and writes updates reliably by enforcing managed transaction rules, consuming results inside callbacks, batching writes with UNWIND, and handling transient failures without corrupting transaction state.

Quick Start

Ask the skill to generate a minimal Java example that creates a Neo4j Driver, runs a parameterized read using executableQuery, and safely consumes records.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: neo4j-driver-java-skill
Download link: https://github.com/neo4j-contrib/neo4j-skills/archive/main.zip#neo4j-driver-java-skill

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.