neo4j-driver-javascript-skill

neo4j-driver-javascript-skill is a skill for Claude Code from neo4j-contrib/neo4j-skills. It costs 157 tokens per session (3,683 once invoked), scanned A, original, MIT.

A guide to using the Neo4j JavaScript and TypeScript driver, which lets Node.js or browser code connect to a Neo4j graph database. It covers connections, queries, transactions, results, errors, and data types.

In plain words
What is it for?
Use it when setting up Neo4j connections, running queries or read/write transactions, handling results, writing TypeScript types, or troubleshooting driver behavior.
Why use it?
It helps avoid connection mistakes, leaked sessions, incorrect number handling, and errors in asynchronous JavaScript code. It also keeps database credentials out of source code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the neo4j-skills plugin — 29 skills, 1 command shipped together

Good fit Use it when setting up Neo4j connections, running queries or read/write transactions, handling results, writing TypeScript types, or troubleshooting driver behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/neo4j-contrib/neo4j-skills/neo4j-driver-javascript-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add neo4j-contrib/neo4j-skills --skill neo4j-driver-javascript-skill
Clone the repo
git clone --depth 1 https://github.com/neo4j-contrib/neo4j-skills

Made for: Claude Code.

Or install neo4j-skills, the plugin that ships this one along with the rest of its 29 skills, 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for neo4j-driver-javascript-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/neo4j-contrib/neo4j-skills/neo4j-driver-javascript-skill/github.svg)](https://agentmods.dev/skills/neo4j-contrib/neo4j-skills/neo4j-driver-javascript-skill)
Your own site
<a href="https://agentmods.dev/skills/neo4j-contrib/neo4j-skills/neo4j-driver-javascript-skill"><img src="https://agentmods.dev/badge/skills/neo4j-contrib/neo4j-skills/neo4j-driver-javascript-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for neo4j-driver-javascript-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/neo4j-contrib/neo4j-skills/neo4j-driver-javascript-skill"><img src="https://agentmods.dev/badge/skills/neo4j-contrib/neo4j-skills/neo4j-driver-javascript-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,683 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 42
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 50
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Data Exfiltration · line 200
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 205
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00157 $0.03683
Opus 5 $0.00078 $0.01842
Sonnet 5 $0.00031 $0.00737
Haiku 4.5 $0.00016 $0.00368

Measured 11d ago against content hash 5c34b9bb885b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

neo4j-driver-javascript-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

neo4j-driver-javascript-skill/SKILL.md · 423 lines

How it starts

The opening of the file, as written. The whole thing — 423 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to Use

  • Writing JS/TS code that connects to Neo4j (Node.js or browser)
  • Setting up driver, sessions, transactions, or query execution
  • Debugging Integer handling, result consumption, session leaks, async errors
  • TypeScript type annotations for driver objects

When NOT to Use

  • Writing/optimizing Cypherneo4j-cypher-skill
  • Upgrading driver versionneo4j-migration-skill
  • RxJS session APIreferences/rxjs-session.md

Install

npm install neo4j-driver   # or: yarn add neo4j-driver

Environment Variables

Load connection config from environment — never hardcode credentials.

# .env file (add to .gitignore)
NEO4J_URI=neo4j+s://xxx.databases.neo4j.io
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=secret
NEO4J_DATABASE=neo4j
// npm install dotenv (for Node.js < 20 or when .env auto-load is off)
import 'dotenv/config'   // or: require('dotenv').config()

const URI      = process.env.NEO4J_URI
const USER     = process.env.NEO4J_USERNAME
const PASSWORD = process.env.NEO4J_PASSWORD
const DATABASE = process.env.NEO4J_DATABASE ?? 'neo4j'

Node 20+ natively loads .env with --env-file .env. Next.js / Vite auto-load .env — no dotenv import needed.


Driver Lifecycle

Create one driver instance at startup. Share everywhere. Never create per-request.

// CommonJS
const neo4j = require('neo4j-driver')
// ESM / TypeScript
import neo4j from 'neo4j-driver'

const driver = neo4j.driver(
  process.env.NEO4J_URI,                              // 'neo4j+s://xxx.databases.neo4j.io'
  neo4j.auth.basic(process.env.NEO4J_USER, process.env.NEO4J_PASSWORD)
)
await driver.verifyConnectivity()   // fail fast on startup if unreachable
// On shutdown:
await driver.close()

URI schemes:

Scheme Transport Use
neo4j+s:// TLS + cluster routing Aura; production clusters
neo4j:// plaintext + cluster routing local dev cluster
bolt+s:// TLS, single instance single Neo4j instance with TLS
bolt:// plaintext, single instance local single instance

Read the full file on GitHub · 423 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 423 lines · 157 tokens per session scan A 5c34b9bb885b

Subscribe to this mod's changes

neo4j-driver-javascript-skill is a skill published in the GitHub repository neo4j-contrib/neo4j-skills (109 stars, last pushed 3d ago), licensed MIT. It adds 157 tokens to every session and 3,683 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

prisma-orm-patterns-and-migrations

Best practices for Prisma ORM schema design, high-performance query optimization, preventing N+1 problems, zero-downtime database migrations, connection pooling, and multi-tenant data modeling. Use when building Node.js/TypeScript applications with Prisma.

hamzabellouch/agent-skills · 58 tokens

drizzle-orm-expert

Expert in Drizzle ORM for TypeScript — schema design, relational queries, migrations, serverless DB integration. Use when building type-safe database layers with Drizzle, migrating from Prisma, or optimizing edge runtime DB access.

RaNDoM6913/claude-code-superkit · 50 tokens

coding-standards

Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.

agent-skills-hub/agent-skills-hub · 28 tokens

angular

Modern Angular (v20+) expert with deep knowledge of Signals, Standalone Components, Zoneless applications, SSR/Hydration, and reactive patterns. Use PROACTIVELY for Angular development, component architecture, state management, performance optimization, and migration to modern patterns.

agent-skills-hub/agent-skills-hub · 56 tokens

backend-dev-guidelines

Opinionated backend development standards for Node.js + Express + TypeScript microservices. Covers layered architecture, BaseController pattern, dependency injection, Prisma repositories, Zod validation, unifiedConfig, Sentry error tracking, async safety, and testing discipline.

agent-skills-hub/agent-skills-hub · 54 tokens

bun-development

Modern JavaScript/TypeScript development with Bun runtime. Covers package management, bundling, testing, and migration from Node.js. Use when working with Bun, optimizing JS/TS development speed, or migrating from Node.js to Bun.

agent-skills-hub/agent-skills-hub · 50 tokens