Creator · neo4j-contrib
Last updated · Sep 4, 2026
Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery,
Creator · neo4j-contrib
Last updated · Sep 4, 2026
Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery,
Creator · neo4j-contrib
Last updated · Sep 4, 2026
Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery,
Creator · neo4j-contrib
Last updated · Sep 4, 2026
Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery,
Sandbox only
Install targets
Codex install prompt
Install the "neo4j-driver-java-skill" agent skill from https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-driver-java-skill. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"neo4j-contrib-neo4j-driver-java-skill","task":"Install neo4j-driver-java-skill","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Maintenance
fresh
5d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
106
67/100 Quality · 69/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
106 GitHub stars
Repo activity
106 stars, 36 forks
Maintenance
5d since push
License
MIT
Install
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skillDo not use when
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
Agent should check
Copy prompt
Task: Use neo4j-driver-java-skill in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
Install command: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
LLM text format
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install?format=text
Find alternatives
/api/skills/search?q=neo4j-driver-java-skill&limit=3
Agent prompt
Use neo4j-driver-java-skill for this task. Review https://www.openagentskill.com/api/skills/neo4j-contrib-neo4j-driver-java-skill/install, then install with: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skillRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/neo4j-contrib-neo4j-driver-java-skill
LLM text
/api/registry/manifest/neo4j-contrib-neo4j-driver-java-skill?format=text
Install alias
/api/registry/install/neo4j-contrib-neo4j-driver-java-skill
Recommend
/api/registry/recommend?task=Use%20neo4j-driver-java-skill%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
GitHub automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO106 GitHub stars
Stars/forks activity
CHECK106 stars, 36 forks; issue activity unavailable in current metadata
Recent maintenance
PASS5d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Similar skills that may fit this task.
Run multimodal agents that operate desktop interfaces
Connect agents to hundreds of workflow automations
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
--- name: neo4j-driver-java-skill description: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, executeRead/Write managed transactions, explicit transactions, async/reactive patterns, error handling, data type mapping, connection pool tuning, causal consistency/bookmarks. Use when writing Java or Kotlin code that connects to Neo4j via GraphDatabase.driver, executableQuery, SessionConfig, executeRead, executeWrite, or TransactionCallback. Does NOT handle Cypher authoring — use neo4j-cypher-skill. Does NOT cover driver version upgrades — use neo4j-migration-skill. Does NOT cover Spring Data Neo4j (@Node, Neo4jRepository) — use neo4j-spring-data-skill. version: 1.0.10 allowed-tools: Bash WebFetch ---
## When to Use - Java/Kotlin code connecting to Neo4j (Aura or self-managed) - Setting up driver, sessions, transactions in Maven/Gradle projects - Debugging result handling, error recovery, connection pool issues - Async (`CompletableFuture`) or reactive (Project Reactor / RxJava) Neo4j access
## When NOT to Use - **Cypher query authoring/optimization** → `neo4j-cypher-skill` - **Driver version upgrades** → `neo4j-migration-skill` - **Spring Data Neo4j** (`@Node`, `@Relationship`, `Neo4jRepository`) → `neo4j-spring-data-skill`
---
## Dependency
### Maven ```xml <dependency> <groupId>org.neo4j.driver</groupId> <artifactId>neo4j-java-driver</artifactId> <version>6.2.1</version> </dependency> ```
### Gradle ```groovy implementation 'org.neo4j.driver:neo4j-java-driver:6.2.1' ```
Check latest: https://central.sonatype.com/artifact/org.neo4j.driver/neo4j-java-driver
6.2.0 [2026-06]: Neo4j `UUID` type + Bolt 6.1 support; `QueryProfile` in result summary. 6.2.1 [2026-08]: fixes `Value#asObject()` on `UUID` values — required if reading UUID properties generically. Neo4j 2026.07 server bundles 6.2.0.
---
## Environment Variables
Standard pattern for connection config — never hardcode credentials:
```java String uri = System.getenv().getOrDefault("NEO4J_URI", "neo4j://localhost:7687"); String user = System.getenv().getOrDefault("NEO4J_USERNAME", "neo4j"); String password = System.getenv().getOrDefault("NEO4J_PASSWORD", ""); String database = System.getenv().getOrDefault("NEO4J_DATABASE", "neo4j"); ```
Spring Boot: inject via `@Value("${spring.neo4j.uri}")` or `application.properties`: ```properties spring.neo4j.uri=neo4j+s://xxx.databases.neo4j.io spring.neo4j.authentication.username=neo4j spring.neo4j.authentication.password=secret ```
---
## Driver Lifecycle
One `Driver` per application — thread-safe, expensive to create. Implement `AutoCloseable` or use try-with-resources.
```java // Long-lived singleton var driver = GraphDatabase.driver( "neo4j+s://xxx.databases.neo4j.io", // Aura TLS+routing AuthTokens.basic(user, password)); driver.verifyConnectivity(); // fail fast
// Short-lived (tests / CLI) try (var driver = GraphDatabase.driver(uri, AuthTokens.basic(user, password))) { driver.verifyConnectivity(); // ... } ```
URI schemes:
| URI | Use | |---|---| | `neo4j://localhost` | Unencrypted, cluster routing | | `neo4j+s://xxx.databases.neo4j.io` | TLS + cluster routing (Aura) | | `bolt://localhost:7687` | Unencrypted, single instance | | `bolt+s://localhost:7687` | TLS, single instance |
Auth options: `AuthTokens.basic(u,p)` · `AuthTokens.bearer(token)` · `AuthTokens.kerberos(b64)` · `AuthTokens.none()`
---
## Choosing the Right API
| API | When | Auto-retry | Streaming | |---|---|:---:|:---:| | `driver.executableQuery()` | Default for most queries | ✅ | ❌ eager | | `session.executeRead/Write()` | Large results, callback control | ✅ | ✅ | | `session.beginTransaction()` | Multi-method, external coordination | ❌ | ✅ | | `session.run()` | Self-managing queries (`CALL IN TRANSACTIONS`) | ⚠️ one-shot [6.1+] | ✅ | | `driver.asyncSession()` | Non-blocking `CompletableFuture` | ✅ | ✅ | | `driver.rxSession()` | Reactor/RxJava backpressure | ✅ | ✅ |
`CALL { … } IN TRANSACTIONS` and `USING PERIODIC COMMIT` self-manage their transaction — use `session.run()` only. `executableQuery` and `executeRead/Write` will fail for these queries.
`session.run()` retry [6.1+]: single immediate retry on idempotent errors only (enabled by default). Disable per driver or per session:
```java // Driver-level — disable for all sessions var config = Config.builder().withAutoCommitRetriesDisabled(true).build();
// Session-level — overrides driver var sessionConfig = SessionConfig.builder() .withAutoCommitRetriesMode(AutoCommitRetriesMode.DISABLED) // DEFAULT = follow driver .build(); ```
---
## `executableQuery` — Default
```java // Read — route to replicas var result = driver.executableQuery(""" MATCH (p:Person {name: $name})-[:KNOWS]->(friend) RETURN friend.name AS name """) .withParameters(Map.of("name", "Alice")) .withConfig(QueryConfig.builder() .withDatabase("neo4j") // always specify — avoids home-db round-trip .withRouting(RoutingControl.READ) .build()) .execute();
result.records().forEach(r -> System.out.println(r.get("name").asString())); long ms = result.summary().resultAvailableAfter(TimeUnit.MILLISECONDS);
// Write driver.executableQuery("CREATE (p:Person {name: $name, age: $age})") .withParameters(Map.of("name", "Bob", "age", 30)) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute(); ```
Never string-interpolate Cypher. Always `.withParameters(Map.of(...))`.
---
## Managed Transactions (`executeRead` / `executeWrite`)
Sessions are NOT thread-safe — one per request/thread, always close.
```java try (var session = driver.session(SessionConfig.builder() .withDatabase("neo4j").build())) {
// Read → replica routing var names = session.executeRead(tx -> { var result = tx.run( "MATCH (p:Person) WHERE p.name STARTS WITH $prefix RETURN p.name AS name", Map.of("prefix", "Al")); return result.stream().map(r -> r.get("name").asString()).toList(); // collect INSIDE });
// Write → leader routing session.executeWriteWithoutResult(tx -> tx.run("CREATE (p:Person {name: $name})", Map.of("name", "Carol")) ); } ```
### Result must be consumed INSIDE the callback
`Result` is a lazy cursor tied to the open transaction. Transaction closes when callback returns — any read after that throws `ResultConsumedException`.
```java // ❌ Returns Result — already closed by the time caller uses it var result = session.executeRead(tx -> tx.run("MATCH (p:Person) RETURN p.name AS name")); result.stream().forEach(...); // throws ResultConsumedException
// ✅ Collect to List inside callback var names = session.executeRead(tx -> tx.run("MATCH (p:Person) RETURN p.name AS name") .stream().map(r -> r.get("name").asString()).toList()); ```
### Callback rules
- Consume each `Result` before next `tx.run()` — multiple open cursors = undefined behaviour. - No side effects (HTTP, email, metric increments) — callback may be retried on transient errors. - Use `MERGE` (idempotent), not `CREATE`, for retry-safe writes. - `executeRead` → replica; `executeWrite` → leader.
### TransactionConfig — timeouts & metadata
```java var config = TransactionConfig.builder() .withTimeout(Duration.ofSeconds(5)) .withMetadata(Map.of("app", "myService", "user", userId)) // visible in SHOW TRANSACTIONS .build(); session.executeRead(tx -> { /* ... */ }, config); ```
---
## Explicit Transactions
Use when work spans multiple methods or requires external coordination. Not auto-retried.
```java try (var session = driver.session(SessionConfig.builder().withDatabase("neo4j").build())) { var tx = session.beginTransaction(); try { doPartA(tx); doPartB(tx); tx.commit(); } catch (Exception e) { try { tx.rollback(); } catch (Exception rb) { e.addSuppressed(rb); } throw e; } } ```
`tx.rollback()` is a network call — wrap in its own try/catch and use `addSuppressed` so the original exception is not lost.
**Commit uncertainty**: if `tx.commit()` throws `ServiceUnavailableException`, the commit may or may not have succeeded. Design writes as idempotent (`MERGE` + unique constraints) so retrying is safe.
Choose explicit vs managed: - Auto-retry needed → `executeRead` / `executeWrite` - Work spans multiple methods → explicit (pass `tx` as parameter) - Coordinating with external I/O → explicit (commit only after I/O succeeds)
---
## Error Handling
```java try { driver.executableQuery("...").execute(); } catch (ServiceUnavailableException e) { // No servers — check connection } catch (SessionExpiredException e) { // Server closed session — open new one } catch (TransientException e) { // Managed txns retry automatically; explicit txns need manual retry } catch (Neo4jException e) { // Cypher/constraint error — e.code() gives GQL status code } ```
Managed transactions auto-retry `TransientException` — no catch needed.
---
## Data Types & Value Extraction
| Cypher type | Java accessor | |---|---| | `Integer` | `value.asLong()` / `value.asInt()` | | `Float` | `value.asDouble()` | | `String` | `value.asString()` | | `Boolean` | `value.asBoolean()` | | `List` | `value.asList()` | | `Map` | `value.asMap()` | | `Node` | `value.asNode()` | | `Relationship` | `value.asRelationship()` | | `Date` | `value.asLocalDate()` | | `DateTime` | `value.asZonedDateTime()` |
```java var record = result.records().get(0); String name = record.get("name").asString(); long age = record.get("age").asLong();
var node = record.get("p").asNode(); String label = node.labels().iterator().next(); Map<String,Object> props = node.asMap(); ```
### Null safety — two distinct cases
| Situation | `record.get(key)` | `.asString()` | |---|---|---| | Key present, value non-null | the value | returns string | | Key present, value is graph null | `Value` where `.isNull()` = true | **throws** `Uncoercible` | | Key absent (typo / not projected) | `Value.NULL` sentinel | **throws** `NoSuchElementException` |
```java // Graph null — use default overload (safe only if key is always projected): String city = record.get("city").asString("Unknown");
// Absent key — check containsKey first: if (record.containsKey("city") && !record.get("city").isNull()) { String city = record.get("city").asString(); } ```
---
## Object Mapping
Map query results to Java records/classes directly — eliminates manual accessor calls.
```java // Domain record — field names match RETURN aliases (case-sensitive) public record Person(String name, long age) {}
// Map single record var person = driver.executableQuery("MATCH (p:Person {name: $name}) RETURN p.name AS name, p.age AS age") .withParameters(Map.of("name", "Alice")) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute() .records() .stream() .map(r -> r.get("name").asString()) // or: r.as(Person.class) — see note .findFirst() .orElseThrow();
// Using .as(Person.class) — maps RETURN keys to record fields by name var person2 = driver.executableQuery(""" MATCH (p:Person {name: $name}) RETURN p.name AS name, p.age AS age """) .withParameters(Map.of("name", "Tom Hanks")) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute() .records() .stream() .map(record -> record.get("p").as(Person.class)) .findFirst() .orElseThrow(() -> new RuntimeException("Person not found")); ```
Nested mapping — return a map projection and include `COLLECT {}` for lists:
```java public record Movie(String title, List<Person> actors) {}
var movieCypher = """ MATCH (movie:Movie) LIMIT 1 RETURN movie { .title, actors: COLLECT { MATCH (actor:Person)-[:ACTED_IN]->(movie) RETURN a
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for neo4j-driver-java-skill, ready for a manual X post.
A practical pick for a repeatable workflow: neo4j-driver-java-skill: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, 106 stars https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=x
Listing + install path for neo4j-driver-java-skill: https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=x Install: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to neo4j-contrib but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill/audit)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)neo4j-contrib
@neo4j-contrib
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
UI-TARS Desktop
Run multimodal agents that operate desktop interfaces
37.0K Starsn8n
Connect agents to hundreds of workflow automations
194.1K StarsMoneyPrinterTurbo
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
88.5K StarsTasmota
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
24.7K StarsSandbox only
Install targets
Codex install prompt
Install the "neo4j-driver-java-skill" agent skill from https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-driver-java-skill. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"neo4j-contrib-neo4j-driver-java-skill","task":"Install neo4j-driver-java-skill","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Maintenance
fresh
5d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
106
67/100 Quality · 69/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
106 GitHub stars
Repo activity
106 stars, 36 forks
Maintenance
5d since push
License
MIT
Install
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skillDo not use when
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
Agent should check
Copy prompt
Task: Use neo4j-driver-java-skill in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
Install command: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
LLM text format
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install?format=text
Find alternatives
/api/skills/search?q=neo4j-driver-java-skill&limit=3
Agent prompt
Use neo4j-driver-java-skill for this task. Review https://www.openagentskill.com/api/skills/neo4j-contrib-neo4j-driver-java-skill/install, then install with: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skillRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/neo4j-contrib-neo4j-driver-java-skill
LLM text
/api/registry/manifest/neo4j-contrib-neo4j-driver-java-skill?format=text
Install alias
/api/registry/install/neo4j-contrib-neo4j-driver-java-skill
Recommend
/api/registry/recommend?task=Use%20neo4j-driver-java-skill%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
GitHub automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO106 GitHub stars
Stars/forks activity
CHECK106 stars, 36 forks; issue activity unavailable in current metadata
Recent maintenance
PASS5d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Similar skills that may fit this task.
Run multimodal agents that operate desktop interfaces
Connect agents to hundreds of workflow automations
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
--- name: neo4j-driver-java-skill description: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, executeRead/Write managed transactions, explicit transactions, async/reactive patterns, error handling, data type mapping, connection pool tuning, causal consistency/bookmarks. Use when writing Java or Kotlin code that connects to Neo4j via GraphDatabase.driver, executableQuery, SessionConfig, executeRead, executeWrite, or TransactionCallback. Does NOT handle Cypher authoring — use neo4j-cypher-skill. Does NOT cover driver version upgrades — use neo4j-migration-skill. Does NOT cover Spring Data Neo4j (@Node, Neo4jRepository) — use neo4j-spring-data-skill. version: 1.0.10 allowed-tools: Bash WebFetch ---
## When to Use - Java/Kotlin code connecting to Neo4j (Aura or self-managed) - Setting up driver, sessions, transactions in Maven/Gradle projects - Debugging result handling, error recovery, connection pool issues - Async (`CompletableFuture`) or reactive (Project Reactor / RxJava) Neo4j access
## When NOT to Use - **Cypher query authoring/optimization** → `neo4j-cypher-skill` - **Driver version upgrades** → `neo4j-migration-skill` - **Spring Data Neo4j** (`@Node`, `@Relationship`, `Neo4jRepository`) → `neo4j-spring-data-skill`
---
## Dependency
### Maven ```xml <dependency> <groupId>org.neo4j.driver</groupId> <artifactId>neo4j-java-driver</artifactId> <version>6.2.1</version> </dependency> ```
### Gradle ```groovy implementation 'org.neo4j.driver:neo4j-java-driver:6.2.1' ```
Check latest: https://central.sonatype.com/artifact/org.neo4j.driver/neo4j-java-driver
6.2.0 [2026-06]: Neo4j `UUID` type + Bolt 6.1 support; `QueryProfile` in result summary. 6.2.1 [2026-08]: fixes `Value#asObject()` on `UUID` values — required if reading UUID properties generically. Neo4j 2026.07 server bundles 6.2.0.
---
## Environment Variables
Standard pattern for connection config — never hardcode credentials:
```java String uri = System.getenv().getOrDefault("NEO4J_URI", "neo4j://localhost:7687"); String user = System.getenv().getOrDefault("NEO4J_USERNAME", "neo4j"); String password = System.getenv().getOrDefault("NEO4J_PASSWORD", ""); String database = System.getenv().getOrDefault("NEO4J_DATABASE", "neo4j"); ```
Spring Boot: inject via `@Value("${spring.neo4j.uri}")` or `application.properties`: ```properties spring.neo4j.uri=neo4j+s://xxx.databases.neo4j.io spring.neo4j.authentication.username=neo4j spring.neo4j.authentication.password=secret ```
---
## Driver Lifecycle
One `Driver` per application — thread-safe, expensive to create. Implement `AutoCloseable` or use try-with-resources.
```java // Long-lived singleton var driver = GraphDatabase.driver( "neo4j+s://xxx.databases.neo4j.io", // Aura TLS+routing AuthTokens.basic(user, password)); driver.verifyConnectivity(); // fail fast
// Short-lived (tests / CLI) try (var driver = GraphDatabase.driver(uri, AuthTokens.basic(user, password))) { driver.verifyConnectivity(); // ... } ```
URI schemes:
| URI | Use | |---|---| | `neo4j://localhost` | Unencrypted, cluster routing | | `neo4j+s://xxx.databases.neo4j.io` | TLS + cluster routing (Aura) | | `bolt://localhost:7687` | Unencrypted, single instance | | `bolt+s://localhost:7687` | TLS, single instance |
Auth options: `AuthTokens.basic(u,p)` · `AuthTokens.bearer(token)` · `AuthTokens.kerberos(b64)` · `AuthTokens.none()`
---
## Choosing the Right API
| API | When | Auto-retry | Streaming | |---|---|:---:|:---:| | `driver.executableQuery()` | Default for most queries | ✅ | ❌ eager | | `session.executeRead/Write()` | Large results, callback control | ✅ | ✅ | | `session.beginTransaction()` | Multi-method, external coordination | ❌ | ✅ | | `session.run()` | Self-managing queries (`CALL IN TRANSACTIONS`) | ⚠️ one-shot [6.1+] | ✅ | | `driver.asyncSession()` | Non-blocking `CompletableFuture` | ✅ | ✅ | | `driver.rxSession()` | Reactor/RxJava backpressure | ✅ | ✅ |
`CALL { … } IN TRANSACTIONS` and `USING PERIODIC COMMIT` self-manage their transaction — use `session.run()` only. `executableQuery` and `executeRead/Write` will fail for these queries.
`session.run()` retry [6.1+]: single immediate retry on idempotent errors only (enabled by default). Disable per driver or per session:
```java // Driver-level — disable for all sessions var config = Config.builder().withAutoCommitRetriesDisabled(true).build();
// Session-level — overrides driver var sessionConfig = SessionConfig.builder() .withAutoCommitRetriesMode(AutoCommitRetriesMode.DISABLED) // DEFAULT = follow driver .build(); ```
---
## `executableQuery` — Default
```java // Read — route to replicas var result = driver.executableQuery(""" MATCH (p:Person {name: $name})-[:KNOWS]->(friend) RETURN friend.name AS name """) .withParameters(Map.of("name", "Alice")) .withConfig(QueryConfig.builder() .withDatabase("neo4j") // always specify — avoids home-db round-trip .withRouting(RoutingControl.READ) .build()) .execute();
result.records().forEach(r -> System.out.println(r.get("name").asString())); long ms = result.summary().resultAvailableAfter(TimeUnit.MILLISECONDS);
// Write driver.executableQuery("CREATE (p:Person {name: $name, age: $age})") .withParameters(Map.of("name", "Bob", "age", 30)) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute(); ```
Never string-interpolate Cypher. Always `.withParameters(Map.of(...))`.
---
## Managed Transactions (`executeRead` / `executeWrite`)
Sessions are NOT thread-safe — one per request/thread, always close.
```java try (var session = driver.session(SessionConfig.builder() .withDatabase("neo4j").build())) {
// Read → replica routing var names = session.executeRead(tx -> { var result = tx.run( "MATCH (p:Person) WHERE p.name STARTS WITH $prefix RETURN p.name AS name", Map.of("prefix", "Al")); return result.stream().map(r -> r.get("name").asString()).toList(); // collect INSIDE });
// Write → leader routing session.executeWriteWithoutResult(tx -> tx.run("CREATE (p:Person {name: $name})", Map.of("name", "Carol")) ); } ```
### Result must be consumed INSIDE the callback
`Result` is a lazy cursor tied to the open transaction. Transaction closes when callback returns — any read after that throws `ResultConsumedException`.
```java // ❌ Returns Result — already closed by the time caller uses it var result = session.executeRead(tx -> tx.run("MATCH (p:Person) RETURN p.name AS name")); result.stream().forEach(...); // throws ResultConsumedException
// ✅ Collect to List inside callback var names = session.executeRead(tx -> tx.run("MATCH (p:Person) RETURN p.name AS name") .stream().map(r -> r.get("name").asString()).toList()); ```
### Callback rules
- Consume each `Result` before next `tx.run()` — multiple open cursors = undefined behaviour. - No side effects (HTTP, email, metric increments) — callback may be retried on transient errors. - Use `MERGE` (idempotent), not `CREATE`, for retry-safe writes. - `executeRead` → replica; `executeWrite` → leader.
### TransactionConfig — timeouts & metadata
```java var config = TransactionConfig.builder() .withTimeout(Duration.ofSeconds(5)) .withMetadata(Map.of("app", "myService", "user", userId)) // visible in SHOW TRANSACTIONS .build(); session.executeRead(tx -> { /* ... */ }, config); ```
---
## Explicit Transactions
Use when work spans multiple methods or requires external coordination. Not auto-retried.
```java try (var session = driver.session(SessionConfig.builder().withDatabase("neo4j").build())) { var tx = session.beginTransaction(); try { doPartA(tx); doPartB(tx); tx.commit(); } catch (Exception e) { try { tx.rollback(); } catch (Exception rb) { e.addSuppressed(rb); } throw e; } } ```
`tx.rollback()` is a network call — wrap in its own try/catch and use `addSuppressed` so the original exception is not lost.
**Commit uncertainty**: if `tx.commit()` throws `ServiceUnavailableException`, the commit may or may not have succeeded. Design writes as idempotent (`MERGE` + unique constraints) so retrying is safe.
Choose explicit vs managed: - Auto-retry needed → `executeRead` / `executeWrite` - Work spans multiple methods → explicit (pass `tx` as parameter) - Coordinating with external I/O → explicit (commit only after I/O succeeds)
---
## Error Handling
```java try { driver.executableQuery("...").execute(); } catch (ServiceUnavailableException e) { // No servers — check connection } catch (SessionExpiredException e) { // Server closed session — open new one } catch (TransientException e) { // Managed txns retry automatically; explicit txns need manual retry } catch (Neo4jException e) { // Cypher/constraint error — e.code() gives GQL status code } ```
Managed transactions auto-retry `TransientException` — no catch needed.
---
## Data Types & Value Extraction
| Cypher type | Java accessor | |---|---| | `Integer` | `value.asLong()` / `value.asInt()` | | `Float` | `value.asDouble()` | | `String` | `value.asString()` | | `Boolean` | `value.asBoolean()` | | `List` | `value.asList()` | | `Map` | `value.asMap()` | | `Node` | `value.asNode()` | | `Relationship` | `value.asRelationship()` | | `Date` | `value.asLocalDate()` | | `DateTime` | `value.asZonedDateTime()` |
```java var record = result.records().get(0); String name = record.get("name").asString(); long age = record.get("age").asLong();
var node = record.get("p").asNode(); String label = node.labels().iterator().next(); Map<String,Object> props = node.asMap(); ```
### Null safety — two distinct cases
| Situation | `record.get(key)` | `.asString()` | |---|---|---| | Key present, value non-null | the value | returns string | | Key present, value is graph null | `Value` where `.isNull()` = true | **throws** `Uncoercible` | | Key absent (typo / not projected) | `Value.NULL` sentinel | **throws** `NoSuchElementException` |
```java // Graph null — use default overload (safe only if key is always projected): String city = record.get("city").asString("Unknown");
// Absent key — check containsKey first: if (record.containsKey("city") && !record.get("city").isNull()) { String city = record.get("city").asString(); } ```
---
## Object Mapping
Map query results to Java records/classes directly — eliminates manual accessor calls.
```java // Domain record — field names match RETURN aliases (case-sensitive) public record Person(String name, long age) {}
// Map single record var person = driver.executableQuery("MATCH (p:Person {name: $name}) RETURN p.name AS name, p.age AS age") .withParameters(Map.of("name", "Alice")) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute() .records() .stream() .map(r -> r.get("name").asString()) // or: r.as(Person.class) — see note .findFirst() .orElseThrow();
// Using .as(Person.class) — maps RETURN keys to record fields by name var person2 = driver.executableQuery(""" MATCH (p:Person {name: $name}) RETURN p.name AS name, p.age AS age """) .withParameters(Map.of("name", "Tom Hanks")) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute() .records() .stream() .map(record -> record.get("p").as(Person.class)) .findFirst() .orElseThrow(() -> new RuntimeException("Person not found")); ```
Nested mapping — return a map projection and include `COLLECT {}` for lists:
```java public record Movie(String title, List<Person> actors) {}
var movieCypher = """ MATCH (movie:Movie) LIMIT 1 RETURN movie { .title, actors: COLLECT { MATCH (actor:Person)-[:ACTED_IN]->(movie) RETURN a
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for neo4j-driver-java-skill, ready for a manual X post.
A practical pick for a repeatable workflow: neo4j-driver-java-skill: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, 106 stars https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=x
Listing + install path for neo4j-driver-java-skill: https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=x Install: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to neo4j-contrib but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill/audit)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)neo4j-contrib
@neo4j-contrib
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
UI-TARS Desktop
Run multimodal agents that operate desktop interfaces
37.0K Starsn8n
Connect agents to hundreds of workflow automations
194.1K StarsMoneyPrinterTurbo
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
88.5K StarsTasmota
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
24.7K StarsSandbox only
Install targets
Codex install prompt
Install the "neo4j-driver-java-skill" agent skill from https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-driver-java-skill. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"neo4j-contrib-neo4j-driver-java-skill","task":"Install neo4j-driver-java-skill","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Maintenance
fresh
5d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
106
67/100 Quality · 69/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
106 GitHub stars
Repo activity
106 stars, 36 forks
Maintenance
5d since push
License
MIT
Install
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skillDo not use when
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
Agent should check
Copy prompt
Task: Use neo4j-driver-java-skill in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
Install command: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
LLM text format
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install?format=text
Find alternatives
/api/skills/search?q=neo4j-driver-java-skill&limit=3
Agent prompt
Use neo4j-driver-java-skill for this task. Review https://www.openagentskill.com/api/skills/neo4j-contrib-neo4j-driver-java-skill/install, then install with: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skillRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/neo4j-contrib-neo4j-driver-java-skill
LLM text
/api/registry/manifest/neo4j-contrib-neo4j-driver-java-skill?format=text
Install alias
/api/registry/install/neo4j-contrib-neo4j-driver-java-skill
Recommend
/api/registry/recommend?task=Use%20neo4j-driver-java-skill%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
GitHub automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO106 GitHub stars
Stars/forks activity
CHECK106 stars, 36 forks; issue activity unavailable in current metadata
Recent maintenance
PASS5d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Similar skills that may fit this task.
Run multimodal agents that operate desktop interfaces
Connect agents to hundreds of workflow automations
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
--- name: neo4j-driver-java-skill description: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, executeRead/Write managed transactions, explicit transactions, async/reactive patterns, error handling, data type mapping, connection pool tuning, causal consistency/bookmarks. Use when writing Java or Kotlin code that connects to Neo4j via GraphDatabase.driver, executableQuery, SessionConfig, executeRead, executeWrite, or TransactionCallback. Does NOT handle Cypher authoring — use neo4j-cypher-skill. Does NOT cover driver version upgrades — use neo4j-migration-skill. Does NOT cover Spring Data Neo4j (@Node, Neo4jRepository) — use neo4j-spring-data-skill. version: 1.0.10 allowed-tools: Bash WebFetch ---
## When to Use - Java/Kotlin code connecting to Neo4j (Aura or self-managed) - Setting up driver, sessions, transactions in Maven/Gradle projects - Debugging result handling, error recovery, connection pool issues - Async (`CompletableFuture`) or reactive (Project Reactor / RxJava) Neo4j access
## When NOT to Use - **Cypher query authoring/optimization** → `neo4j-cypher-skill` - **Driver version upgrades** → `neo4j-migration-skill` - **Spring Data Neo4j** (`@Node`, `@Relationship`, `Neo4jRepository`) → `neo4j-spring-data-skill`
---
## Dependency
### Maven ```xml <dependency> <groupId>org.neo4j.driver</groupId> <artifactId>neo4j-java-driver</artifactId> <version>6.2.1</version> </dependency> ```
### Gradle ```groovy implementation 'org.neo4j.driver:neo4j-java-driver:6.2.1' ```
Check latest: https://central.sonatype.com/artifact/org.neo4j.driver/neo4j-java-driver
6.2.0 [2026-06]: Neo4j `UUID` type + Bolt 6.1 support; `QueryProfile` in result summary. 6.2.1 [2026-08]: fixes `Value#asObject()` on `UUID` values — required if reading UUID properties generically. Neo4j 2026.07 server bundles 6.2.0.
---
## Environment Variables
Standard pattern for connection config — never hardcode credentials:
```java String uri = System.getenv().getOrDefault("NEO4J_URI", "neo4j://localhost:7687"); String user = System.getenv().getOrDefault("NEO4J_USERNAME", "neo4j"); String password = System.getenv().getOrDefault("NEO4J_PASSWORD", ""); String database = System.getenv().getOrDefault("NEO4J_DATABASE", "neo4j"); ```
Spring Boot: inject via `@Value("${spring.neo4j.uri}")` or `application.properties`: ```properties spring.neo4j.uri=neo4j+s://xxx.databases.neo4j.io spring.neo4j.authentication.username=neo4j spring.neo4j.authentication.password=secret ```
---
## Driver Lifecycle
One `Driver` per application — thread-safe, expensive to create. Implement `AutoCloseable` or use try-with-resources.
```java // Long-lived singleton var driver = GraphDatabase.driver( "neo4j+s://xxx.databases.neo4j.io", // Aura TLS+routing AuthTokens.basic(user, password)); driver.verifyConnectivity(); // fail fast
// Short-lived (tests / CLI) try (var driver = GraphDatabase.driver(uri, AuthTokens.basic(user, password))) { driver.verifyConnectivity(); // ... } ```
URI schemes:
| URI | Use | |---|---| | `neo4j://localhost` | Unencrypted, cluster routing | | `neo4j+s://xxx.databases.neo4j.io` | TLS + cluster routing (Aura) | | `bolt://localhost:7687` | Unencrypted, single instance | | `bolt+s://localhost:7687` | TLS, single instance |
Auth options: `AuthTokens.basic(u,p)` · `AuthTokens.bearer(token)` · `AuthTokens.kerberos(b64)` · `AuthTokens.none()`
---
## Choosing the Right API
| API | When | Auto-retry | Streaming | |---|---|:---:|:---:| | `driver.executableQuery()` | Default for most queries | ✅ | ❌ eager | | `session.executeRead/Write()` | Large results, callback control | ✅ | ✅ | | `session.beginTransaction()` | Multi-method, external coordination | ❌ | ✅ | | `session.run()` | Self-managing queries (`CALL IN TRANSACTIONS`) | ⚠️ one-shot [6.1+] | ✅ | | `driver.asyncSession()` | Non-blocking `CompletableFuture` | ✅ | ✅ | | `driver.rxSession()` | Reactor/RxJava backpressure | ✅ | ✅ |
`CALL { … } IN TRANSACTIONS` and `USING PERIODIC COMMIT` self-manage their transaction — use `session.run()` only. `executableQuery` and `executeRead/Write` will fail for these queries.
`session.run()` retry [6.1+]: single immediate retry on idempotent errors only (enabled by default). Disable per driver or per session:
```java // Driver-level — disable for all sessions var config = Config.builder().withAutoCommitRetriesDisabled(true).build();
// Session-level — overrides driver var sessionConfig = SessionConfig.builder() .withAutoCommitRetriesMode(AutoCommitRetriesMode.DISABLED) // DEFAULT = follow driver .build(); ```
---
## `executableQuery` — Default
```java // Read — route to replicas var result = driver.executableQuery(""" MATCH (p:Person {name: $name})-[:KNOWS]->(friend) RETURN friend.name AS name """) .withParameters(Map.of("name", "Alice")) .withConfig(QueryConfig.builder() .withDatabase("neo4j") // always specify — avoids home-db round-trip .withRouting(RoutingControl.READ) .build()) .execute();
result.records().forEach(r -> System.out.println(r.get("name").asString())); long ms = result.summary().resultAvailableAfter(TimeUnit.MILLISECONDS);
// Write driver.executableQuery("CREATE (p:Person {name: $name, age: $age})") .withParameters(Map.of("name", "Bob", "age", 30)) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute(); ```
Never string-interpolate Cypher. Always `.withParameters(Map.of(...))`.
---
## Managed Transactions (`executeRead` / `executeWrite`)
Sessions are NOT thread-safe — one per request/thread, always close.
```java try (var session = driver.session(SessionConfig.builder() .withDatabase("neo4j").build())) {
// Read → replica routing var names = session.executeRead(tx -> { var result = tx.run( "MATCH (p:Person) WHERE p.name STARTS WITH $prefix RETURN p.name AS name", Map.of("prefix", "Al")); return result.stream().map(r -> r.get("name").asString()).toList(); // collect INSIDE });
// Write → leader routing session.executeWriteWithoutResult(tx -> tx.run("CREATE (p:Person {name: $name})", Map.of("name", "Carol")) ); } ```
### Result must be consumed INSIDE the callback
`Result` is a lazy cursor tied to the open transaction. Transaction closes when callback returns — any read after that throws `ResultConsumedException`.
```java // ❌ Returns Result — already closed by the time caller uses it var result = session.executeRead(tx -> tx.run("MATCH (p:Person) RETURN p.name AS name")); result.stream().forEach(...); // throws ResultConsumedException
// ✅ Collect to List inside callback var names = session.executeRead(tx -> tx.run("MATCH (p:Person) RETURN p.name AS name") .stream().map(r -> r.get("name").asString()).toList()); ```
### Callback rules
- Consume each `Result` before next `tx.run()` — multiple open cursors = undefined behaviour. - No side effects (HTTP, email, metric increments) — callback may be retried on transient errors. - Use `MERGE` (idempotent), not `CREATE`, for retry-safe writes. - `executeRead` → replica; `executeWrite` → leader.
### TransactionConfig — timeouts & metadata
```java var config = TransactionConfig.builder() .withTimeout(Duration.ofSeconds(5)) .withMetadata(Map.of("app", "myService", "user", userId)) // visible in SHOW TRANSACTIONS .build(); session.executeRead(tx -> { /* ... */ }, config); ```
---
## Explicit Transactions
Use when work spans multiple methods or requires external coordination. Not auto-retried.
```java try (var session = driver.session(SessionConfig.builder().withDatabase("neo4j").build())) { var tx = session.beginTransaction(); try { doPartA(tx); doPartB(tx); tx.commit(); } catch (Exception e) { try { tx.rollback(); } catch (Exception rb) { e.addSuppressed(rb); } throw e; } } ```
`tx.rollback()` is a network call — wrap in its own try/catch and use `addSuppressed` so the original exception is not lost.
**Commit uncertainty**: if `tx.commit()` throws `ServiceUnavailableException`, the commit may or may not have succeeded. Design writes as idempotent (`MERGE` + unique constraints) so retrying is safe.
Choose explicit vs managed: - Auto-retry needed → `executeRead` / `executeWrite` - Work spans multiple methods → explicit (pass `tx` as parameter) - Coordinating with external I/O → explicit (commit only after I/O succeeds)
---
## Error Handling
```java try { driver.executableQuery("...").execute(); } catch (ServiceUnavailableException e) { // No servers — check connection } catch (SessionExpiredException e) { // Server closed session — open new one } catch (TransientException e) { // Managed txns retry automatically; explicit txns need manual retry } catch (Neo4jException e) { // Cypher/constraint error — e.code() gives GQL status code } ```
Managed transactions auto-retry `TransientException` — no catch needed.
---
## Data Types & Value Extraction
| Cypher type | Java accessor | |---|---| | `Integer` | `value.asLong()` / `value.asInt()` | | `Float` | `value.asDouble()` | | `String` | `value.asString()` | | `Boolean` | `value.asBoolean()` | | `List` | `value.asList()` | | `Map` | `value.asMap()` | | `Node` | `value.asNode()` | | `Relationship` | `value.asRelationship()` | | `Date` | `value.asLocalDate()` | | `DateTime` | `value.asZonedDateTime()` |
```java var record = result.records().get(0); String name = record.get("name").asString(); long age = record.get("age").asLong();
var node = record.get("p").asNode(); String label = node.labels().iterator().next(); Map<String,Object> props = node.asMap(); ```
### Null safety — two distinct cases
| Situation | `record.get(key)` | `.asString()` | |---|---|---| | Key present, value non-null | the value | returns string | | Key present, value is graph null | `Value` where `.isNull()` = true | **throws** `Uncoercible` | | Key absent (typo / not projected) | `Value.NULL` sentinel | **throws** `NoSuchElementException` |
```java // Graph null — use default overload (safe only if key is always projected): String city = record.get("city").asString("Unknown");
// Absent key — check containsKey first: if (record.containsKey("city") && !record.get("city").isNull()) { String city = record.get("city").asString(); } ```
---
## Object Mapping
Map query results to Java records/classes directly — eliminates manual accessor calls.
```java // Domain record — field names match RETURN aliases (case-sensitive) public record Person(String name, long age) {}
// Map single record var person = driver.executableQuery("MATCH (p:Person {name: $name}) RETURN p.name AS name, p.age AS age") .withParameters(Map.of("name", "Alice")) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute() .records() .stream() .map(r -> r.get("name").asString()) // or: r.as(Person.class) — see note .findFirst() .orElseThrow();
// Using .as(Person.class) — maps RETURN keys to record fields by name var person2 = driver.executableQuery(""" MATCH (p:Person {name: $name}) RETURN p.name AS name, p.age AS age """) .withParameters(Map.of("name", "Tom Hanks")) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute() .records() .stream() .map(record -> record.get("p").as(Person.class)) .findFirst() .orElseThrow(() -> new RuntimeException("Person not found")); ```
Nested mapping — return a map projection and include `COLLECT {}` for lists:
```java public record Movie(String title, List<Person> actors) {}
var movieCypher = """ MATCH (movie:Movie) LIMIT 1 RETURN movie { .title, actors: COLLECT { MATCH (actor:Person)-[:ACTED_IN]->(movie) RETURN a
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for neo4j-driver-java-skill, ready for a manual X post.
A practical pick for a repeatable workflow: neo4j-driver-java-skill: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, 106 stars https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=x
Listing + install path for neo4j-driver-java-skill: https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=x Install: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to neo4j-contrib but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill/audit)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)neo4j-contrib
@neo4j-contrib
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
UI-TARS Desktop
Run multimodal agents that operate desktop interfaces
37.0K Starsn8n
Connect agents to hundreds of workflow automations
194.1K StarsMoneyPrinterTurbo
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
88.5K StarsTasmota
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
24.7K StarsSandbox only
Install targets
Codex install prompt
Install the "neo4j-driver-java-skill" agent skill from https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-driver-java-skill. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"neo4j-contrib-neo4j-driver-java-skill","task":"Install neo4j-driver-java-skill","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Maintenance
fresh
5d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
106
67/100 Quality · 69/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
106 GitHub stars
Repo activity
106 stars, 36 forks
Maintenance
5d since push
License
MIT
Install
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skillDo not use when
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
Agent should check
Copy prompt
Task: Use neo4j-driver-java-skill in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20neo4j-driver-java-skill%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
Install command: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install
LLM text format
/api/skills/neo4j-contrib-neo4j-driver-java-skill/install?format=text
Find alternatives
/api/skills/search?q=neo4j-driver-java-skill&limit=3
Agent prompt
Use neo4j-driver-java-skill for this task. Review https://www.openagentskill.com/api/skills/neo4j-contrib-neo4j-driver-java-skill/install, then install with: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skillRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/neo4j-contrib-neo4j-driver-java-skill
LLM text
/api/registry/manifest/neo4j-contrib-neo4j-driver-java-skill?format=text
Install alias
/api/registry/install/neo4j-contrib-neo4j-driver-java-skill
Recommend
/api/registry/recommend?task=Use%20neo4j-driver-java-skill%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
GitHub automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO106 GitHub stars
Stars/forks activity
CHECK106 stars, 36 forks; issue activity unavailable in current metadata
Recent maintenance
PASS5d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Similar skills that may fit this task.
Run multimodal agents that operate desktop interfaces
Connect agents to hundreds of workflow automations
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
--- name: neo4j-driver-java-skill description: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, executeRead/Write managed transactions, explicit transactions, async/reactive patterns, error handling, data type mapping, connection pool tuning, causal consistency/bookmarks. Use when writing Java or Kotlin code that connects to Neo4j via GraphDatabase.driver, executableQuery, SessionConfig, executeRead, executeWrite, or TransactionCallback. Does NOT handle Cypher authoring — use neo4j-cypher-skill. Does NOT cover driver version upgrades — use neo4j-migration-skill. Does NOT cover Spring Data Neo4j (@Node, Neo4jRepository) — use neo4j-spring-data-skill. version: 1.0.10 allowed-tools: Bash WebFetch ---
## When to Use - Java/Kotlin code connecting to Neo4j (Aura or self-managed) - Setting up driver, sessions, transactions in Maven/Gradle projects - Debugging result handling, error recovery, connection pool issues - Async (`CompletableFuture`) or reactive (Project Reactor / RxJava) Neo4j access
## When NOT to Use - **Cypher query authoring/optimization** → `neo4j-cypher-skill` - **Driver version upgrades** → `neo4j-migration-skill` - **Spring Data Neo4j** (`@Node`, `@Relationship`, `Neo4jRepository`) → `neo4j-spring-data-skill`
---
## Dependency
### Maven ```xml <dependency> <groupId>org.neo4j.driver</groupId> <artifactId>neo4j-java-driver</artifactId> <version>6.2.1</version> </dependency> ```
### Gradle ```groovy implementation 'org.neo4j.driver:neo4j-java-driver:6.2.1' ```
Check latest: https://central.sonatype.com/artifact/org.neo4j.driver/neo4j-java-driver
6.2.0 [2026-06]: Neo4j `UUID` type + Bolt 6.1 support; `QueryProfile` in result summary. 6.2.1 [2026-08]: fixes `Value#asObject()` on `UUID` values — required if reading UUID properties generically. Neo4j 2026.07 server bundles 6.2.0.
---
## Environment Variables
Standard pattern for connection config — never hardcode credentials:
```java String uri = System.getenv().getOrDefault("NEO4J_URI", "neo4j://localhost:7687"); String user = System.getenv().getOrDefault("NEO4J_USERNAME", "neo4j"); String password = System.getenv().getOrDefault("NEO4J_PASSWORD", ""); String database = System.getenv().getOrDefault("NEO4J_DATABASE", "neo4j"); ```
Spring Boot: inject via `@Value("${spring.neo4j.uri}")` or `application.properties`: ```properties spring.neo4j.uri=neo4j+s://xxx.databases.neo4j.io spring.neo4j.authentication.username=neo4j spring.neo4j.authentication.password=secret ```
---
## Driver Lifecycle
One `Driver` per application — thread-safe, expensive to create. Implement `AutoCloseable` or use try-with-resources.
```java // Long-lived singleton var driver = GraphDatabase.driver( "neo4j+s://xxx.databases.neo4j.io", // Aura TLS+routing AuthTokens.basic(user, password)); driver.verifyConnectivity(); // fail fast
// Short-lived (tests / CLI) try (var driver = GraphDatabase.driver(uri, AuthTokens.basic(user, password))) { driver.verifyConnectivity(); // ... } ```
URI schemes:
| URI | Use | |---|---| | `neo4j://localhost` | Unencrypted, cluster routing | | `neo4j+s://xxx.databases.neo4j.io` | TLS + cluster routing (Aura) | | `bolt://localhost:7687` | Unencrypted, single instance | | `bolt+s://localhost:7687` | TLS, single instance |
Auth options: `AuthTokens.basic(u,p)` · `AuthTokens.bearer(token)` · `AuthTokens.kerberos(b64)` · `AuthTokens.none()`
---
## Choosing the Right API
| API | When | Auto-retry | Streaming | |---|---|:---:|:---:| | `driver.executableQuery()` | Default for most queries | ✅ | ❌ eager | | `session.executeRead/Write()` | Large results, callback control | ✅ | ✅ | | `session.beginTransaction()` | Multi-method, external coordination | ❌ | ✅ | | `session.run()` | Self-managing queries (`CALL IN TRANSACTIONS`) | ⚠️ one-shot [6.1+] | ✅ | | `driver.asyncSession()` | Non-blocking `CompletableFuture` | ✅ | ✅ | | `driver.rxSession()` | Reactor/RxJava backpressure | ✅ | ✅ |
`CALL { … } IN TRANSACTIONS` and `USING PERIODIC COMMIT` self-manage their transaction — use `session.run()` only. `executableQuery` and `executeRead/Write` will fail for these queries.
`session.run()` retry [6.1+]: single immediate retry on idempotent errors only (enabled by default). Disable per driver or per session:
```java // Driver-level — disable for all sessions var config = Config.builder().withAutoCommitRetriesDisabled(true).build();
// Session-level — overrides driver var sessionConfig = SessionConfig.builder() .withAutoCommitRetriesMode(AutoCommitRetriesMode.DISABLED) // DEFAULT = follow driver .build(); ```
---
## `executableQuery` — Default
```java // Read — route to replicas var result = driver.executableQuery(""" MATCH (p:Person {name: $name})-[:KNOWS]->(friend) RETURN friend.name AS name """) .withParameters(Map.of("name", "Alice")) .withConfig(QueryConfig.builder() .withDatabase("neo4j") // always specify — avoids home-db round-trip .withRouting(RoutingControl.READ) .build()) .execute();
result.records().forEach(r -> System.out.println(r.get("name").asString())); long ms = result.summary().resultAvailableAfter(TimeUnit.MILLISECONDS);
// Write driver.executableQuery("CREATE (p:Person {name: $name, age: $age})") .withParameters(Map.of("name", "Bob", "age", 30)) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute(); ```
Never string-interpolate Cypher. Always `.withParameters(Map.of(...))`.
---
## Managed Transactions (`executeRead` / `executeWrite`)
Sessions are NOT thread-safe — one per request/thread, always close.
```java try (var session = driver.session(SessionConfig.builder() .withDatabase("neo4j").build())) {
// Read → replica routing var names = session.executeRead(tx -> { var result = tx.run( "MATCH (p:Person) WHERE p.name STARTS WITH $prefix RETURN p.name AS name", Map.of("prefix", "Al")); return result.stream().map(r -> r.get("name").asString()).toList(); // collect INSIDE });
// Write → leader routing session.executeWriteWithoutResult(tx -> tx.run("CREATE (p:Person {name: $name})", Map.of("name", "Carol")) ); } ```
### Result must be consumed INSIDE the callback
`Result` is a lazy cursor tied to the open transaction. Transaction closes when callback returns — any read after that throws `ResultConsumedException`.
```java // ❌ Returns Result — already closed by the time caller uses it var result = session.executeRead(tx -> tx.run("MATCH (p:Person) RETURN p.name AS name")); result.stream().forEach(...); // throws ResultConsumedException
// ✅ Collect to List inside callback var names = session.executeRead(tx -> tx.run("MATCH (p:Person) RETURN p.name AS name") .stream().map(r -> r.get("name").asString()).toList()); ```
### Callback rules
- Consume each `Result` before next `tx.run()` — multiple open cursors = undefined behaviour. - No side effects (HTTP, email, metric increments) — callback may be retried on transient errors. - Use `MERGE` (idempotent), not `CREATE`, for retry-safe writes. - `executeRead` → replica; `executeWrite` → leader.
### TransactionConfig — timeouts & metadata
```java var config = TransactionConfig.builder() .withTimeout(Duration.ofSeconds(5)) .withMetadata(Map.of("app", "myService", "user", userId)) // visible in SHOW TRANSACTIONS .build(); session.executeRead(tx -> { /* ... */ }, config); ```
---
## Explicit Transactions
Use when work spans multiple methods or requires external coordination. Not auto-retried.
```java try (var session = driver.session(SessionConfig.builder().withDatabase("neo4j").build())) { var tx = session.beginTransaction(); try { doPartA(tx); doPartB(tx); tx.commit(); } catch (Exception e) { try { tx.rollback(); } catch (Exception rb) { e.addSuppressed(rb); } throw e; } } ```
`tx.rollback()` is a network call — wrap in its own try/catch and use `addSuppressed` so the original exception is not lost.
**Commit uncertainty**: if `tx.commit()` throws `ServiceUnavailableException`, the commit may or may not have succeeded. Design writes as idempotent (`MERGE` + unique constraints) so retrying is safe.
Choose explicit vs managed: - Auto-retry needed → `executeRead` / `executeWrite` - Work spans multiple methods → explicit (pass `tx` as parameter) - Coordinating with external I/O → explicit (commit only after I/O succeeds)
---
## Error Handling
```java try { driver.executableQuery("...").execute(); } catch (ServiceUnavailableException e) { // No servers — check connection } catch (SessionExpiredException e) { // Server closed session — open new one } catch (TransientException e) { // Managed txns retry automatically; explicit txns need manual retry } catch (Neo4jException e) { // Cypher/constraint error — e.code() gives GQL status code } ```
Managed transactions auto-retry `TransientException` — no catch needed.
---
## Data Types & Value Extraction
| Cypher type | Java accessor | |---|---| | `Integer` | `value.asLong()` / `value.asInt()` | | `Float` | `value.asDouble()` | | `String` | `value.asString()` | | `Boolean` | `value.asBoolean()` | | `List` | `value.asList()` | | `Map` | `value.asMap()` | | `Node` | `value.asNode()` | | `Relationship` | `value.asRelationship()` | | `Date` | `value.asLocalDate()` | | `DateTime` | `value.asZonedDateTime()` |
```java var record = result.records().get(0); String name = record.get("name").asString(); long age = record.get("age").asLong();
var node = record.get("p").asNode(); String label = node.labels().iterator().next(); Map<String,Object> props = node.asMap(); ```
### Null safety — two distinct cases
| Situation | `record.get(key)` | `.asString()` | |---|---|---| | Key present, value non-null | the value | returns string | | Key present, value is graph null | `Value` where `.isNull()` = true | **throws** `Uncoercible` | | Key absent (typo / not projected) | `Value.NULL` sentinel | **throws** `NoSuchElementException` |
```java // Graph null — use default overload (safe only if key is always projected): String city = record.get("city").asString("Unknown");
// Absent key — check containsKey first: if (record.containsKey("city") && !record.get("city").isNull()) { String city = record.get("city").asString(); } ```
---
## Object Mapping
Map query results to Java records/classes directly — eliminates manual accessor calls.
```java // Domain record — field names match RETURN aliases (case-sensitive) public record Person(String name, long age) {}
// Map single record var person = driver.executableQuery("MATCH (p:Person {name: $name}) RETURN p.name AS name, p.age AS age") .withParameters(Map.of("name", "Alice")) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute() .records() .stream() .map(r -> r.get("name").asString()) // or: r.as(Person.class) — see note .findFirst() .orElseThrow();
// Using .as(Person.class) — maps RETURN keys to record fields by name var person2 = driver.executableQuery(""" MATCH (p:Person {name: $name}) RETURN p.name AS name, p.age AS age """) .withParameters(Map.of("name", "Tom Hanks")) .withConfig(QueryConfig.builder().withDatabase("neo4j").build()) .execute() .records() .stream() .map(record -> record.get("p").as(Person.class)) .findFirst() .orElseThrow(() -> new RuntimeException("Person not found")); ```
Nested mapping — return a map projection and include `COLLECT {}` for lists:
```java public record Movie(String title, List<Person> actors) {}
var movieCypher = """ MATCH (movie:Movie) LIMIT 1 RETURN movie { .title, actors: COLLECT { MATCH (actor:Person)-[:ACTED_IN]->(movie) RETURN a
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for neo4j-driver-java-skill, ready for a manual X post.
A practical pick for a repeatable workflow: neo4j-driver-java-skill: Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, 106 stars https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=x
Listing + install path for neo4j-driver-java-skill: https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=x Install: npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-java-skill
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to neo4j-contrib but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill/audit)
[](https://www.openagentskill.com/skills/neo4j-contrib-neo4j-driver-java-skill?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)neo4j-contrib
@neo4j-contrib
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
UI-TARS Desktop
Run multimodal agents that operate desktop interfaces
37.0K Starsn8n
Connect agents to hundreds of workflow automations
194.1K StarsMoneyPrinterTurbo
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
88.5K StarsTasmota
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
24.7K StarsPermission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Thin public metadata
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Thin public metadata
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Thin public metadata
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Thin public metadata
Risk summary
Install readiness