neo4j-driver-go-skill
适合 Go 项目连接与调优 Neo4j,包含调试要点
覆盖 Neo4j Go 驱动 v6 的连接、事务与结果处理用法
解决用 Go 写 Neo4j 客户端的常见场景:如何新建 neo4j.NewDriver、用 ExecuteQuery、做托管或显式事务、配置 Session、处理错误与类型映射以及连接调优。适合在用 Go 开发后端服务、调试会话/事务或实现稳定的读写逻辑时查阅。聚焦 neo4j-go-driver v6 的用法细节,不负责 Cypher 优化或大规模迁移步骤。
▸ 展开 SKILL.md 英文原文
Covers the Neo4j Go Driver v6 — driver lifecycle, ExecuteQuery, managed and explicit transactions, session config, error handling, data type mapping, and connection tuning. Use when writing Go code that connects to Neo4j, setting up NewDriver or ExecuteQuery, debugging sessions/transactions/result handling, or working with neo4j-go-driver v5→v6 migration. Triggers on NewDriver, ExecuteQuery, SessionConfig, ManagedTransaction, neo4j-go-driver. Does NOT handle Cypher query authoring — use neo4j-cypher-skill. Does NOT cover driver version migration steps — use neo4j-migration-skill.
帮我安装这个 skill:https://raw.githubusercontent.com/neo4j-contrib/neo4j-skills/main/neo4j-driver-go-skill/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/neo4j-contrib/neo4j-skills/main/neo4j-driver-go-skill/SKILL.md"## When to Use - Writing Go code that connects to Neo4j - Setting up `neo4j.NewDriver()`, `ExecuteQuery()`, or session/transaction patterns - Debugging connection errors, result iteration, type assertions, causal consistency ## When NOT to Use - **Writing/optimizing Cypher** → `neo4j-cypher-skill` - **v5→v6 migration steps** → `neo4j-migration-skill` --- ## Installation ```bash go get github.com/neo4j/neo4j-go-driver/v6 ``` Import: `github.com/neo4j/neo4j-go-driver/v6/neo4j` **v5→v6 rename** (deprecated aliases still compile, remove before v7): | v5 | v6 | |----|----| | `neo4j.NewDriverWithContext(...)` | `neo4j.NewDriver(...)` | | `neo4j.DriverWithContext` | `neo4j.Driver` | --- ##