In short.
Prisma SQL Driver Adapter Implementation is a reference skill for developers and coding assistants implementing Prisma ORM 7 SQL adapters, with code sketches that still need database-specific implementation and verification. Its strongest material concerns transaction connection ownership, cleanup hooks, optional savepoints, precise value mapping and preservation of original database errors. It also addresses migration scripts, isolated shadow databases and pool disposal. The file declares skill version 7.9.1 and requires matching the target release's exact @prisma/driver-adapter-utils version. Nothing was executed, so compatibility and runtime correctness remain unverified.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete prisma-driver-adapter-implementation/SKILL.md at revision a6f192959cf43b08aa330fe1ffca090267215812 and the accompanying repository-root LICENSE notice. Other folders and all linked pages are excluded. The assessment concerns the supplied instruction text and licence only. No code was executed, and database behavior, assistant loading, dependency compatibility, performance and integration outcomes remain unverified.
The overview
Identity
The resource is prisma-driver-adapter-implementation/SKILL.md in the prisma/skills repository. Its metadata names prisma as author, declares version 7.9.1 and identifies Prisma ORM 7 SQL driver-adapter work as its purpose. A driver adapter translates Prisma's query and transaction operations into calls to a database driver.
The source location is [https://github.com/prisma/skills/tree/main/prisma-driver-adapter-implementation]. The supplied text comes from revision a6f192959cf43b08aa330fe1ffca090267215812.
Practical assessment
The skill offers a focused implementation and review reference for adapter correctness. It addresses failures that interface compatibility alone may miss: connection leaks, duplicate transaction control, lost numeric precision and unhelpful database errors.
Its usefulness depends on adapting the guidance to a concrete driver and checking the installed Prisma interfaces. It supplies illustrative code and a verification checklist, rather than a complete adapter or evidence of working integrations.
Intended users
The intended users are developers and coding assistants adding SQL database drivers, maintaining Prisma adapters, implementing savepoints or investigating transaction leaks, P2039 errors and migration shadow-database failures.
The examples assume familiarity with TypeScript interfaces, SQL transactions, database-driver APIs and connection pools. Beginners can use the explanations to understand the risks, but the file does not provide an introductory Prisma or SQL tutorial.
Coverage
The skill explains queryRaw, executeRaw and executeScript implementation, including argument type information, ordered result metadata and affected-row counts. Its mapping guidance covers integer precision, decimals, binary values, dates, JSON, arrays and unsupported native types.
It also covers dedicated transaction connections, lifecycle cleanup, optional savepoints, structured error conversion, preservation of original database errors, pool ownership and isolated shadow-database creation and disposal. These are implementation instructions, not features supplied by executable adapter code.
Using it
Requirements
The guide explicitly requires the exact @prisma/driver-adapter-utils version installed by the target Prisma release. Its interface snapshot should therefore be checked against that dependency before implementation.
Applying the guidance requires the concrete driver's query, transaction, metadata and error behavior. Supported isolation levels and savepoint operations must be established for the database. Migration-aware support additionally requires the ability to create and remove an isolated shadow database. No assistant compatibility list or minimum Node.js or TypeScript version is specified.
How the guidance works
The described factory returns an adapter that maps each query argument using its value and corresponding ArgType. Queries use array or tuple rows so result values, column names and column types retain matching order.
A transaction acquires one dedicated connection and keeps its operations on that connection. Under the protocol described in the skill, Prisma sends SQL COMMIT or ROLLBACK through executeRaw; the transaction object's commit and rollback methods only perform cleanup and release resources once. Optional savepoint methods belong to that transaction.
Recognized database failures become DriverAdapterError values while retaining originalCode and originalMessage. Unexpected non-driver exceptions are rethrown so programming errors remain visible.
Getting started
The file gives no assistant-specific installation or activation command. To apply it, make the complete SKILL.md available as a reference, identify the target Prisma release and installed adapter-utilities types, and inspect the chosen driver's APIs.
The examples require concrete implementations of helpers such as mapArg, mapColumnType, validateLevel and safeSavepoint, alongside actual driver connection types. Decide which component owns each pool and whether the driver can support isolated shadow databases before implementing those lifecycle methods.
Source example
The PostgreSQL-style query example passes query.sql and mapped arguments to a driver with rowMode set to array, then constructs columnNames and columnTypes from the returned fields. A separate transaction sketch acquires a connection, sends BEGIN and applies a validated isolation level.
The error example maps PostgreSQL code 23505 to UniqueConstraintViolation. Other database errors retain their original details in a PostgreSQL-specific fallback representation. These are illustrative source examples; no execution results are available.
Assessment & evidence
Limitations
The code sketches omit driver implementations and mapping helpers. Database-specific behavior still needs investigation, particularly native types, migration script syntax, isolation levels and savepoint semantics. The skill warns that splitting SQL scripts on semicolons can break valid statements.
No runtime evidence establishes precision preservation, transaction isolation, resource cleanup or Prisma Client compatibility. The referenced implementation pages are outside the supplied scope, so their contents have not been assessed.
Engineering rationale
The guide treats adapters as a protocol boundary where valid TypeScript can still produce incorrect database behavior. Dedicated transaction connections prevent unrelated work from interleaving; transaction-local savepoints avoid shared nesting state; cleanup-only lifecycle hooks avoid duplicate SQL transaction commands.
Exact value and metadata mapping protects data meaning and precision. Preserving database error details supports useful P2039 fallback messages, while explicit pool ownership and isolated shadow databases reduce unintended effects on caller resources and the primary database.
Related references
The skill names Prisma's driver-adapter interfaces [https://github.com/prisma/prisma/blob/v7/packages/driver-adapter-utils/src/types.ts], PostgreSQL transaction implementation [https://github.com/prisma/prisma/blob/v7/packages/adapter-pg/src/pg.ts] and PostgreSQL error mapping [https://github.com/prisma/prisma/blob/v7/packages/adapter-pg/src/errors.ts] as companion references.
Those linked files are outside the supplied evidence. Their contents, suitability for other drivers and compatibility with a particular installed release are not assessed. No comparative results establish how this skill performs against another skill or guide.
Source evidence
The complete selected instruction file is available at the pinned source address [https://raw.githubusercontent.com/prisma/skills/a6f192959cf43b08aa330fe1ffca090267215812/prisma-driver-adapter-implementation/SKILL.md]. The accompanying repository licence is [https://raw.githubusercontent.com/prisma/skills/a6f192959cf43b08aa330fe1ffca090267215812/LICENSE].
These files establish the instructions, examples, declared metadata and reuse terms. They do not establish that an adapter built from the guidance passes tests or behaves correctly in production.
Access & freshness
Costs
The supplied files contain no pricing, usage measurements or implementation-effort estimates. Coding-assistant charges, database hosting costs and the cost of building and validating an adapter are unknown. No token, latency or performance measurements support a cost estimate.
Licence and reuse
The selected file declares MIT licensing. The accompanying LICENSE names Prisma as copyright holder for 2025 and permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions.
The licence provides the material without warranty and disclaims liability. Terms for any separate database driver, service or coding assistant are not established by these notices.
Version and freshness
The supplied snapshot was captured on 15 November 2026 at revision a6f192959cf43b08aa330fe1ffca090267215812. Version 7.9.1 is the skill's metadata value; it does not independently establish the installed Prisma package version or compatibility with every Prisma ORM 7 release.
No release history or later revisions are included. The latest available version and compatibility with newer or older interfaces are unknown. The skill's requirement to match the exact target dependency remains material.
Before relying on it
Compare the interface snapshot with the exact installed adapter-utilities types. Implement the concrete driver's mappings, validate isolation levels and savepoint identifiers, and establish pool ownership and shadow-database cleanup behavior.
Follow the supplied verification checklist with value round trips, concurrent transactions, commit and rollback cleanup, nested savepoints, error preservation and migration failure cleanup. Include Prisma Client integration or end-to-end tests, rather than relying only on adapter unit tests. These checks remain work to perform; no passing results are supplied.
