Prisma's official command reference for Prisma ORM 7: init, generate, migrate, db, dev, studio and mcp, with a safety checkpoint before destructive commands.
Prisma Driver Adapter Implementation Skill
Prisma's official reference for building or changing Prisma ORM 7 SQL driver adapters: the adapter contract, transaction and savepoint protocol, result and error mapping, shadow databases and a verification checklist.
Install
Other ways to install
About
- Snapshot of the Prisma 7 SqlDriverAdapter, factory and Transaction interfaces
- Priority rules for connections, lifecycle hooks, savepoints and errors
- Argument and column-type mapping without precision loss
- Transaction protocol with isolation levels and connection-local savepoints
- Error mapping to DriverAdapterError that keeps original codes for P2039
- Pool ownership rules for dispose()
- Isolated shadow-database creation and cleanup for Prisma Migrate
- 13-item verification checklist and links to the pg adapter source
Prisma Driver Adapter Implementation is an official skill from Prisma for a narrow, high-stakes job: writing or modifying a SQL driver adapter for Prisma ORM 7, the layer that lets Prisma Client talk to a database through a JavaScript driver. It is aimed at library authors and teams adding a new database driver, and at anyone debugging P2039 errors, leaked transactions or shadow-database failures in an existing adapter. Its opening warning sets the tone: adapters are a protocol boundary, and code that typechecks can still corrupt values, leak connections or break transactions.
The skill starts with a snapshot of the SqlDriverAdapterFactory, SqlDriverAdapter and Transaction interfaces from @prisma/driver-adapter-utils, and tells the agent to work against the exact version installed by the target Prisma release. A priority table marks the critical rules: one dedicated connection per transaction; commit and rollback as lifecycle hooks that release the connection exactly once, because Prisma already sends the SQL COMMIT or ROLLBACK; savepoint state kept on the transaction rather than on the shared adapter; and original database error codes and messages preserved so Prisma can produce a useful P2039.
TypeScript examples cover query execution in array row mode, mapping argument and column types (64-bit integers without truncation, decimals, bytes, dates, UUID, JSON, arrays), running migration scripts without naively splitting on semicolons, starting a transaction with an isolation level, savepoints, and converting driver errors into DriverAdapterError values. It also explains pool ownership on dispose() and how to create, isolate and drop a shadow database for Prisma Migrate. A 13-item checklist and links to the PostgreSQL adapter source close it out. MIT-licensed, version 7.9.1.
Try it
Once installed, ask your agent something like:
Add savepoint support to our Prisma driver adapter and make sure concurrent interactive transactions get their own connections.
SKILL.md
The instructions your agent loads, as published by Prisma.
Related Skills
See all Prisma Driver Adapter Implementation alternativesSkill: Prisma ORM Setup
by Prisma
Prisma's official skill for setting up Prisma ORM or repairing an app's database connection: it detects the app's Prisma version, defaults new apps to Prisma 8 and its package-owned skill, and keeps Prisma 6 and 7 apps on their own major.
Skill: Prisma Client API Reference
by Prisma
Prisma's official Prisma Client reference skill: client setup with driver adapters, CRUD and bulk queries, select/include/omit, filters, relation reads and nested writes, transactions and safe raw SQL.
Skill: Prisma 7 Upgrade Guide
by Prisma
Prisma's official skill for migrating an ORM project from v6 to v7 - the prisma-client generator, driver adapters, prisma.config.ts, ESM entrypoints and every removed API.