Agent skill · software engineering · prisma

prisma-driver-adapter-implementation

Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.

Why this skill is useful

Provides specific implementation details and patterns for creating and modifying SQL driver adapters in Prisma that the AI wouldn't reliably generate on its own.

What it needs

Requires @prisma/driver-adapter-utils installed locally. About 5k tokens when loaded. Last updated 2026-08-04. 50 stars on the source repository.

What this skill does

Prisma SQL Driver Adapter Implementation Use this guide with the exact @prisma/driver-adapter-utils version installed by the target Prisma release. Driver adapters are a protocol boundary: type-compatible code can still corrupt values, leak connections, or break transactions. When to Apply Implementing SqlDriverAdapterFactory, SqlMigrationAwareDriverAdapterFactory, SqlDriverAdapter, or Transaction Adding nested-transaction/savepoint support Mapping driver values, column metadata, bind arguments, or database errors Debugging P2039, transaction leaks, shadow-database failures, or adapter-specific query behavior Contract snapshot IsolationLevel currently includes READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SNAPSHOT, and SERIALIZABLE; validate what the concrete database supports. Priority rules Priority Rule Impact ---------- ------ -------- CRITICAL One dedicated connection per transaction Prevents interleaving and leaks CRITICAL commit/rollback are lifecycle cleanup hooks Prevents duplicate COMMIT/ROLLBACK CRITICAL Savepoints live on Transaction, not adapter-global depth Makes nested scopes connection-local CRITICAL Preserve original database error code/message Enables useful P2039 fallback HIGH Map arguments and result metadata exactly Prevents silent value corruption HIGH Shadow databases are isolated and always cleaned up Makes Migrate safe HIGH Dispose only resources the adapter owns Prevents shutting down caller-owned pools Query implementation SqlQuery contains sql, args, and parallel argTypes. Map each argument using both value and ArgType; do not discard type/arity information. Execute in the driver's array/tuple row mode so column order is stable. Result mapping Return columnNames, columnTypes, and rows with identical lengths/order. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills prisma/prisma-driver-adapter-implementation

View the source on GitHub

Browse the @skills marketplace