neo4j-driver-dotnet-skill

Official

Build safe, efficient Neo4j C# data access.

Authorneo4j-contrib
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves the problem of writing correct, production-ready Neo4j connection and query code in C#/.NET, especially when dealing with driver lifecycle, sessions/transactions, result streaming, and type-safe record mapping.

Core Features & Use Cases

  • Driver lifecycle and safe disposal: Establishes a single thread-safe IDriver per application and uses await using for correct IAsyncDisposable behavior.
  • Managed transactions for correctness and retry safety: Guides when to use ExecuteReadAsync/ExecuteWriteAsync versus explicit transactions, and how to keep managed callbacks idempotent.
  • Result consumption and mapping: Explains Cursor handling (FetchAsync, ToListAsync, ConsumeAsync, SingleAsync) and robust record value access with .Get<T>()/.As<T>() including null and absent-key scenarios.
  • Practical .NET integration patterns: Covers DI registration as a singleton, cancellation token propagation, UNWIND batching parameterization, and Preview object mapping with AsObject<T>/AsObjectsAsync<T>().
  • Error handling and common traps: Provides an exception-handling approach (e.g., ClientException vs Neo4jException) and a checklist of frequent mistakes.

Quick Start

Use this skill to correctly implement Neo4j.Driver v6 in your C# service by registering IDriver as a singleton and running read/write operations with ExecuteReadAsync/ExecuteWriteAsync while consuming results inside the managed transaction callback.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

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

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

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

Agent Skills Search Helper

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