AI-Readiness Scorecard
@prisma/client · v7.8.0

Prisma 7 is 80% ready for AI coding agents.

Claude Opus 4.8 writes Prisma's query API flawlessly — and even the new $extends. But it still reaches for Prisma 6's setup code that no longer compiles: the old constructor, the removed datasources option, and $use middleware. 3 of 15 real tasks fail to type-check against the installed package.

80/100
Agent-readiness
12 compile clean 3 fail type-check
Model: claude-opus-4-8 Tasks: 15 Method: tsc against real installed package Run: 2026-07-17
The gap

3 things the agent gets wrong

Each is real code the model generated, verified by the TypeScript compiler against Prisma 7's actual types. These are Prisma 6 patterns the model still writes.

Constructing the clientTS2554
Agent wrote (Prisma 6)
const prisma = new PrismaClient()
Prisma 7
import { PrismaPg } from "@prisma/adapter-pg"

const adapter = new PrismaPg({
  connectionString: process.env.DATABASE_URL,
})
const prisma = new PrismaClient({ adapter })
error TS2554: Expected 1 arguments, but got 0.
Why: Prisma 7 dropped the bundled query engine — the constructor now requires a driver adapter. A bare new PrismaClient() no longer type-checks.
Setting the datasource URLTS2353
Agent wrote (Prisma 6)
new PrismaClient({
  datasources: {
    db: { url: process.env.DATABASE_URL },
  },
})
Prisma 7
// the URL now flows through the adapter
const adapter = new PrismaPg({
  connectionString: process.env.DATABASE_URL,
})
new PrismaClient({ adapter })
error TS2353: Object literal may only specify known properties, and 'datasources' does not exist in type 'PrismaClientOptions'.
Why: the datasources constructor option was removed. The connection string is configured on the driver adapter instead.
Logging query duration (middleware)TS2339
Agent wrote (Prisma 6)
prisma.$use(async (params, next) => {
  const start = Date.now()
  const result = await next(params)
  console.log(Date.now() - start)
  return result
})
Prisma 7
const db = prisma.$extends({
  query: {
    async $allOperations({ args, query }) {
      const start = performance.now()
      const res = await query(args)
      console.log(performance.now() - start)
      return res
    },
  },
})
error TS2339: Property '$use' does not exist on type 'PrismaClient'.
Why: $use middleware was removed in favor of client extensions ($extends). The model knows $extends elsewhere — it just defaults to the old middleware for this task.
Fair's fair

What it gets right — 12 of 15

The query surface is solid.

Every CRUD, relation, and query task compiled clean against Prisma 7 — including the new $extends computed fields and raw queries. The gap is specific to setup & config APIs that changed in the major.

create / update upsert findUnique / findMany where + orderBy nested relation writes include cursor pagination $transaction count $extends (computed field) $queryRaw
Why this matters

The version-drift gap

Models are trained on a snapshot of the past. The moment your SDK ships a breaking major, coding agents keep writing the old API — confidently, and it looks right — until they're retrained. For your users, that's broken code on their first try with your latest version.

The gap refreshes twice over: every new SDK major re-opens it, and every new model release shifts it. That makes it a moving target worth monitoring, not a one-time audit — which is exactly what SDKProof watches.

No opinions — just the compiler

How this was measured

15 realistic Prisma tasks → generated by claude-opus-4-8 → each solution written into a project with the real installed @prisma/client v7.8.0 and type-checked with tsc --noEmit.
A task passes only if it compiles clean. Failures are the compiler's own diagnostics (TS2554 / TS2353 / TS2339) — no LLM judge, no hand-waving. Reproducible: pinned package version, pinned model.
On the board next

SDKs shipping breaking majors — scoring soon

Is your SDK ready for AI agents?

Right after a major release, most aren't — agents keep shipping your old API. SDKProof scores it, tracks it across model releases, and tells you exactly what to fix.

Get your SDK scored →
early project · scorecards are independent analysis