Skills prisma-driver-adapter-implementation
📦

prisma-driver-adapter-implementation

v7.6.0 Content revision r2 High Risk ⚙️ External commands🔑 Env variables

Implement Prisma Driver Adapters Correctly

Prisma driver adapters require precise transaction, type, and error contracts. This guide provides implementation patterns and verification steps for Prisma ORM v7 adapters.

Supports: Claude Codex Code(CC)
⚠️ 38 Poor

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "prisma-driver-adapter-implementation" from https://skillstore.io/skills/prisma-prisma-driver-adapter-implementation.md and its manifest at https://skillstore.io/api/skills/prisma-prisma-driver-adapter-implementation/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.

Your Agent should still show its plan and request any confirmation required by the security policy.

Test it

Using "prisma-driver-adapter-implementation". Explain which interfaces a PostgreSQL Prisma v7 adapter must implement.

Expected outcome:

  • Factory: connects to primary and isolated shadow databases.
  • Adapter: executes queries and scripts, starts transactions, reports connection information, and disposes resources.
  • Transaction: supports queries while commit and rollback only release resources.

Using "prisma-driver-adapter-implementation". Review my transaction implementation.

Expected outcome:

  • Finding: commit sends SQL although Prisma already sends the transaction command.
  • Fix: keep commit as a lifecycle hook that releases the reserved connection.
  • Test: verify commit, rollback, nested savepoints, and isolation validation.

Using "prisma-driver-adapter-implementation". Create a verification plan for a SQLite adapter.

Expected outcome:

  • Verify integer, bytes, date, JSON, and boolean conversions.
  • Reject unsupported isolation levels and test script execution behavior.
  • Run direct adapter tests and end-to-end PrismaClient CRUD and rollback tests.

Security Audit

High Risk
v8 • 7/23/2026 Open versioned report

All 69 static alerts are false positives from Markdown, TypeScript examples, expected byte decoding, and a standard DATABASE_URL reference. A separate high-severity data-integrity issue exists because connectToShadowDb() can reuse the primary database URL.

1
Files scanned
639
Lines analyzed
0
Review items
0
False positives ignored

Confirmed security concerns (1)

High
Primary Database Reused as Shadow Database
connectToShadowDb() falls back to the primary connection URL when no shadow URL is supplied. Migration shadow operations could alter or erase primary data.
The fallback is explicit in the example, and shadow databases are isolated migration workspaces. Reusing the primary URL creates a direct data-integrity hazard.
Audited by: codex View Audit History →
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/prisma-prisma-driver-adapter-implementation/audits/8?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/prisma-prisma-driver-adapter-implementation/security.svg)](https://skillstore.io/skills/prisma-prisma-driver-adapter-implementation?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/prisma-prisma-driver-adapter-implementation?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/prisma-prisma-driver-adapter-implementation/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/prisma-prisma-driver-adapter-implementation.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA · BibTeX · CFF)

APA citation

prisma. (2026). prisma-driver-adapter-implementation security audit report (audit version 8) [Author version 7.6.0]. Skillstore. https://skillstore.io/skills/prisma-prisma-driver-adapter-implementation/audits/8

BibTeX citation

@techreport{prisma-prisma-prisma-driver-adapter-implementation-2026, author = {prisma}, title = {prisma-driver-adapter-implementation security audit report (audit version 8)}, institution = {Skillstore}, year = {2026}, number = {8}, url = {https://skillstore.io/skills/prisma-prisma-driver-adapter-implementation/audits/8}, note = {Author version 7.6.0} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "prisma-driver-adapter-implementation security audit report (audit version 8)" version: "7.6.0" type: report authors: - name: "prisma" date-released: "2026-07-23" url: "https://skillstore.io/skills/prisma-prisma-driver-adapter-implementation/audits/8" identifiers: - type: other value: "skillstore:prisma-prisma-driver-adapter-implementation:audit:8" description: "Skillstore immutable audit report identifier"

Skillstore Score

Why this score Evidence Confidence: Medium
55
Architecture
100
Maintainability
87
Content
65
Community
87
Spec Compliance

What You Can Build

Build a New Adapter

Implement the required Prisma v7 contracts for a database driver and map its native types and errors.

Upgrade an Existing Adapter

Compare an older adapter with Prisma v7 transaction, factory, query, and result requirements.

Review Adapter Correctness

Check lifecycle behavior, type conversion, error mapping, disposal, and integration tests before release.

Try These Prompts

Explain the Contracts
Explain the Prisma v7 SqlDriverAdapter interfaces for a developer new to adapters. Include each required method and its return type.
Design Query Mapping
Review my driver API and design queryRaw and executeRaw mappings. Preserve parameter binding and map results to SqlResultSet.
Implement Transactions
Implement transaction support for [database]. Validate supported isolation levels, handle nested savepoints, release resources, and keep lifecycle hooks free of SQL.
Audit a Complete Adapter
Audit this Prisma v7 adapter against the guide. Identify contract violations in transactions, type conversion, error mapping, disposal, shadow databases, and tests.

Best Practices

  • Bind query arguments through the driver instead of interpolating application values into SQL.
  • Reserve a dedicated connection for transactions and release it through lifecycle hooks.
  • Use an isolated shadow database and test every supported database behavior with PrismaClient.

Avoid

  • Do not issue COMMIT or ROLLBACK SQL from transaction lifecycle hooks.
  • Do not infer all database types from JavaScript values when driver metadata is available.
  • Do not connect shadow database operations to the primary database URL.

Frequently Asked Questions

Which Prisma version does this skill cover?
It covers Prisma ORM v7 driver adapter interfaces and lifecycle expectations.
Does this skill provide a complete adapter package?
No. It provides reference interfaces, implementation patterns, database notes, and verification guidance.
Why must commit and rollback avoid issuing SQL?
Prisma sends transaction SQL through executeRaw. These methods should only finalize adapter resources.
Which databases are discussed?
The guide includes notes for SQLite, PostgreSQL, MySQL, and MariaDB, plus provider support for SQL Server.
How should byte values be handled?
Convert Prisma base64 strings into the driver byte type and return byte results in Prisma-compatible form.
What testing is required?
Use direct adapter tests and PrismaClient end-to-end tests for queries, scripts, transactions, conversions, errors, and disposal.

Developer Details

Author

prisma

License

MIT

Author version

v7.6.0

Skillstore revision

r2

Ref

ebdfe608f5de2b66ff37ab4af12af8ac4f5e8006

Maintenance freshness

7/25/2026

Usage

0 downloads · 0 views

File structure

📄 SKILL.md