# Prisma 8

Use when working in a project that depends on @prisma/orm-postgres, @prisma/orm-sqlite...

- Repository: https://github.com/prisma/orm (47661 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add prisma/orm --skill prisma-8 -g -a claude-code -y`
Codex: `npx skills add prisma/orm --skill prisma-8 -g -a codex -y`
Cursor: `npx skills add prisma/orm --skill prisma-8 -g -a cursor -y`
Gemini CLI: `npx skills add prisma/orm --skill prisma-8 -g -a gemini-cli -y`

## Description

Use when working in a project that depends on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo (Prisma 8, formerly Prisma Next): editing contract.prisma or a contract.ts builder, running `prisma contract emit`, planning or applying migrations, editing migration.ts, writing db.orm / db.sql / db.query queries, wiring db.ts or middleware, integrating a build tool, using the Supabase extension or RLS, or reading a dotted error code such as MIGRATION.HASH_MISMATCH. Use when the user asks "what is Prisma 8", "where do I start", or compares it to another ORM. Use when the user asks to upgrade or bump Prisma 8 in an app or an extension package. Use when you see @internal/* or @prisma/orm-* imports, prisma.config.ts with definePrismaConfig, or contract.json / contract.d.ts. Do not use for Prisma ORM 7 or earlier (schema.prisma + @prisma/client).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Prisma 8 (Prisma 8)

> **Edit your data contract. Prisma handles the rest.**

Prisma 8 moves fast, and your training data about it is very likely outdated. This skill ships inside the installed Prisma packages, so it describes the exact version this project has, treat it and its reference files as the source of truth, over anything you remember about Prisma.

## Pre-conditions

Check these before acting on anything below. Halt on the first one that fails and tell the user what is missing.

1. **The project is on Prisma 8.** `prisma.config.ts` exports `definePrismaConfig({ orm: ... })`, and `package.json` depends on `@prisma/orm-postgres`, `@prisma/orm-sqlite`, or `@prisma/orm-mongo`. A project with `schema.prisma` and `@prisma/client` is Prisma 7 or earlier; this skill does not apply to it, and its instructions will break such a project.
2. **The skill matches the installed version.** Compare `metadata.library_version` in this file's frontmatter with the installed `@prisma/orm-*` version in `package.json`. If they differ, run `prisma skills sync` and re-read this file before continuing.
3. **The contract artefacts exist.** `contract.json` and `contract.d.ts` sit next to the contract source named by `prisma.config.ts`. If they are missing or older than the source, run `prisma contract emit` first; every query and migration instruction below assumes current artefacts.

The rest: https://github.com/prisma/orm/blob/HEAD/skills/prisma-8/SKILL.md
