v8.0.0-rc.25

record-upgrade-instructions

prisma@prisma⭐ 47.8k stars· last commit 1d ago· 2613 open issues

>-

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

6.6/10
Verified
Oct 12, 2026

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐⭐ 47.8k on GitHubGitHub ↗

Very popular

🟢ProSkills ScoreAI Verified
6.6/10
📍

Not yet listed on ClawHub or SkillsMP

// README


Using Prisma 7? It is maintained for eighteen months after release 8.0; supported versions says what that covers. Its source lives on the v7 branch of this repository and its docs at prisma.io/docs/orm/v7.

Prisma 8 is a release candidate. Release 8.0 is expected in the next four to eight weeks. Until then a release candidate may include breaking changes, and every release ships with an upgrade recipe that the prisma-8 skill applies for you. The candidate is a complete implementation we stand behind: we treat bugs in it as urgent, and the risk you take on is a feature that is not built yet rather than churn. The feature scoreboard names every gap. New projects should start here. Existing Prisma 7 applications can migrate incrementally, and Prisma 7 stays maintained on the v7 branch for eighteen months after release 8.0. Star the repo, follow @prisma on X, or read along on the Prisma blog.

Prisma 8 is a TypeScript rewrite of Prisma ORM, designed to be extensible, composable, and AI-agent friendly by default. Read the announcement or start with the docs.

Prerequisites

  • Node.js 24 or newer
  • A package manager (npm, pnpm, or yarn)

Getting started

1. Scaffold a new project

The interactive scaffolder picks an app template (Next.js, Hono, Nuxt, Astro, NestJS, SvelteKit, TanStack Start, or Elysia) and wires Prisma 8 in with your chosen database (PostgreSQL or MongoDB):

npm create prisma

You finish with a runnable app, a starter contract, and the agent skills already installed. See the create-prisma reference for every template and flag, or follow the PostgreSQL and MongoDB quickstarts.

2. Or, add Prisma 8 to an existing project

Run this from your repo root:

npx prisma orm init

orm init writes prisma.config.ts, scaffolds a starter contract and db.ts under src/prisma/, installs the runtime, and emits the contract. It does not touch your framework or build setup. Then install the agent skills:

npx prisma skills sync

See the orm init and skills CLI references, or the guides for adding Prisma 8 to an existing PostgreSQL or MongoDB app.

3. Use your AI agent for everything Prisma 8

Both installers leave a top-level prisma-8.md primer at your project root for any agent to read first, and install one SKILL.md per workflow into the directories agent runtimes read:

  • .claude/skills/<skill-name>/SKILL.md — Claude Code
  • .cursor/skills/<skill-name>/SKILL.md — Cursor
  • .agents/skills/<skill-name>/SKILL.md — universal location for Copilot Agent and other runtimes
  • .devin/skills/<skill-name>/SKILL.md — Devin

Skills ship inside the Prisma packages your project installs, so they always describe the version in use. Your editor's AI assistant auto-loads the right skill when your prompt matches.

Just describe what you want. For example:

"Add a posts model with a relation to users, then write a query that loads each user's three most recent posts."

The agent loads the prisma-8 skill, opens its contract and queries references, then drives the change end-to-end.

For the full catalogue and what each skill covers, see skills/README.md.

Found a bug, missing a feature, or have a question for the team?

Ask your agent. The prisma-8 skill's feedback flow drafts a structured GitHub issue or hands you a Prisma Discord link for live Q&A. You can review and confirm before anything is submitted.

For extension authors

Prisma 8 has a minimal core. Everything around it, including Postgres support itself, is built on the same public SPI that's available to any author. If you've wanted to integrate your tool, your database, or your library with Prisma, this is the way in.

Extensions already shipping:

See Using extensions for how to install and register one. Want to ship your own? The call for extension authors walks through the SPI, the layers your extension can hook into, and how the team features new extensions.

Supported databases

From release 8.0, every package has a maturity level, which tells you how far you can rely on it. Until then, every package is a release candidate.

  • PostgreSQL: Generally Available from release 8.0
  • MongoDB: Early Access from release 8.0
  • SQLite: Early Access from release 8.0
  • MySQL: Early Access from release 8.0, MySQL 8.4 and later (@prisma/orm-mysql)
  • MariaDB: Early Access from release 8.0, MariaDB 10.11 and later (@prisma/orm-mariadb)

See the feature scoreboard for what PostgreSQL, SQLite and MongoDB support today; it does not yet cover MySQL or MariaDB.

Contributing

See CONTRIBUTING.md for setup, commands, DCO signoff, and PR expectations. For substantive changes, please open an issue first so we can give direction-fit feedback before you invest implementation time. The vision says where Prisma 8 is going, and the steering list names requests we have already answered, with what to use instead.

Security issues: follow the Private Vulnerability Report

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills-contrib/record-upgrade-instructions/SKILL.md14 KB7c1e19f137beupstream ↗
    ---
    name: record-upgrade-instructions
    description: >-
      Record upgrade instructions alongside a Prisma 8 breaking-change
      PR, so downstream consumers (applications on the published
      `@prisma/orm-*` packages and authors of Prisma 8 extensions) can apply the matching code translation
      automatically via the published upgrade skills. Use when you have
      refactored framework code and the test suite went red in
      `examples/`, `packages/3-extensions/` or a target facade, when you fixed those
      red tests by updating example or extension code, when you are told to "record
      upgrade instructions for this PR", or when you made a breaking
      change to Prisma 8 that downstream consumers will need help
      migrating across.
    ---
    
    # Record upgrade instructions
    
    Contribute an independent fragment on the PR that changes Prisma 8. Release preparation combines fragments into the published app and extension guides; **feature PRs do not edit shared transition guides or choose a release number**. Read the canonical [upgrade instruction lifecycle](../../upgrade-instructions/README.md) for storage, release assembly, and checker modes.
    
    ## Detection signals and routing
    
    Use this skill when a framework change makes tests red in `examples/`, `packages/3-extensions/` or a target facade (`packages/3-targets/*/9-facade/` or `packages/3-targets/*/*/9-facade/`) and you fix them by updating the example or extension code rather than reverting the framework change. Those edits are the same translation downstream consumers need.
    
    | Directory changed by the PR | Fragment audience | Consumers |
    | --- | --- | --- |
    | `examples/` | `app` | Public package API, contract files, on-disk migrations |
    | `packages/3-extensions/`, `packages/3-targets/*/9-facade/` and `packages/3-targets/*/*/9-facade/` | `extension` | Framework SPI and extension authors |
    | Both | Both, independently | Both audiences |
    
    Changes in these directories require a declaration, subject to existing coverage-check exclusions. Generated artefacts are not generally exempt: contract format changes require a codemod or re-emission instructions. Genuinely consumer-invisible changes still get an explicit `changes: []` declaration, with no prose.
    
    **Stacked PRs:** compare against the branch the PR actually targets, not always `main`. Each PR adds its own declaration in its own commits; inherited fragments do not cover a new PR. Do not pool a stack's instructions in its bottom PR.
    
    Throughout this skill, `<target>` is the target branch (`main` unless stacked), `<base>` is its pinned comparison commit, and `<head>` is the PR head commit.
    
    ## Authoring workflow
    
    1. **Identify affected audiences.** Inspect `git diff <base>..<head> -- examples/ packages/3-extensions/ 'packages/3-targets/*/9-facade/' 'packages/3-targets/*/*/9-facade/'`. If none of these directories has relevant changes, the coverage check does not require a declaration.
    2. **Choose a descriptive pending name.** Add `upgrade-instructions/pending/<descriptive-name>/<audience>/instructions.md` for each affected audience. Avoid collisions with pending work; no random suffix, global registry, historical-name reservation, or shared index is required. Never append to another PR's fragment. A release landing during your PR does not change this unversioned destination.
    3. **Write the instructions.** Retain the existing YAML frontmatter `changes[]` and Markdown prose format. Each change has a kebab-case `id` unique within the guide, a one-line `summary`, optional `detection` (glob and content predicate), and an optional `script` path relative to `instructions.md`. Prose-only transformations omit `script`; the consumer's agent follows the body.
    
       **Write detection patterns for whole-file matching.** The upgrade flows test each `matches` pattern as `new RegExp(pattern)`, with no flags, against the whole content of a file ([upgrade-app.md](../../skills/prisma-8/references/upgrade-app.md), step 4). A pattern may span lines. To exclude a file by something elsewhere in it, anchor a lookahead at the start of the input with `(?<![\s\S])`, not `^`, which the `m` flag turns into a line start.
    
       **Make detection predicates token-precise.** Test against both a true positive and the nearest false positive. A moved tag must not match an unchanged tag; excluding an unchanged spelling needs a token boundary:
    
       ```text
       matches:      .raw`
       must not fire on: fns.raw`
       too broad:    (?<!fns)\.raw`        also suppresses myfns.raw`
       shipped:      (?<!(?<![\w$])fns)\.raw`
       ```
    
       The inner lookbehind restricts the exclusion to the exact `fns` token.
    
       **Name only published packages in prose.** Follow the rule in [`upgrade-instructions/README.md`](../../upgrade-instructions/README.md#checks): prose names `@prisma/orm-*` entries, never `@internal/*` packages; `detection` patterns and codemod scripts may name workspace names.
    
       **Only describe consumer action.** Omit narrative about internal renames, dev-only dependency bumps, and incidental generated churn. Changes to `@internal/*` APIs that no published `@prisma/*` package re-exports are not consumer action either: a PR that only changes those declares `changes: []`, even when extension tests had to be updated. If this PR's audience needs no action, use only:
    
       ```md
       ---
       changes: []
       ---
       ```
    
       No "consumers need not do anything" body prose. Both audiences declare independently, including real-change/no-op combinations.
    
    4. **Author optional colocated scripts/assets.** TypeScript that Node runs directly (`node <script>.ts`, so only syntax Node's type stripping accepts; a project made by `orm init` has no `tsx`), shell, or codemods are appropriate. Require no network, environment variables, or input beyond the consumer filesystem and bundled assets. Keep relative references inside the fragment's audience directory. For cross-audience changes, copy scripts into both audience directories; do not symlink or import from the other audience. The published clusters remain independently installable. A script that patches a snapshot `migrations/snapshots/<hex>/contract.d.ts` must handle both the single-line form the store writes and the formatted form of entries written before it, so match declarations without relying on line breaks or indentation.
    
       **Test a script outside the fragment.** A script's tests and fixtures live in `test/integration/test/upgrade-instructions/<fragment-name>/`, where tests can import `@internal/*` and CI runs them with the integration suite. One constant in that folder, `SCRIPT_PATHS`, names the path of each audience's copy of the script, so the tests run the files that ship; while the fragment is pending it points into `upgrade-instructions/pending/<fragment-name>/`. Put fixture projects under the folder's `fixtures/`. Every `test/integration/test/upgrade-instructions/*/fixtures` folder is left out of the integration TypeScript project, the single-import-root lint and the scans for the repository's own contracts, so a fixture may hold old-format files and import either root. A test that checks the script against live framework code, such as one that recomputes fixture hashes with `@internal/*` functions, and a generator that writes fixtures with them, hold only while the fragment is pending: the published script is frozen at its release, and a later framework change would fail them. At release, the release step points `SCRIPT_PATHS` at the published copy, keeps the before-and-after tests, and freezes the live-code tests and the generator (records what they compute) or deletes them.
    5. **Validate by execution** using the unchanged concrete procedure below. An entry updates consumer code, not the example or extension tests. Do not introduce a separate testing system: a script's own tests (step 4) are ordinary integration tests, and the validation by execution below is still required beside them.
    6. **Include the fragment and updated example or extension code in the PR.** Commit working changes before running the Git-ref check:
    
       ```bash
       pnpm check:upgrade-coverage --mode pr --prev <base> --head <head>
       ```
    
       `<head>` must include the committed declaration; the check does not inspect uncommitted edits. Link each new fragment directory in the PR description. Review must verify that the instructions actually describe the PR's changes; the gate checks added declarations, readable change lists, and relative script references, not semantic correctness.
    
    ## Validation by execution
    
    Before merging, run every new entry against the corresponding example or extension code in this repository, starting from its pre-PR state and ending with passing tests. This is the existing per-PR quality bar, not a release-wide migration test.
    
    Workflow per entry (both flows apply for cross-audience entries):
    
    - **Open PR:** `<head>` is the PR branch head; `<base>` is the actual target branch's comparison commit.
    - **Merged PR:** `<head>` is the merge commit; `<base>` is its mainline parent. `git log --first-parent` names both.
    
    Use a disposable checkout for the restoration steps so unrelated working changes are not overwritten. The PR author updates example and extension tests; the upgrade instructions must not change them. The equality check excludes `test/` directories; the companion check confirms the entry left those directories exactly as it found them.
    
    ### App entry (against `examples/`)
    
    1. Check out `<head>`, which has the framework change applied.
    2. Revert `examples/` to its pre-PR state (`git restore --source=<base> -- examples/`).
    3. Run the fragment against the restored example code: invoke colocated scripts per `script:` references, then walk the prose body for additional instructions.
    4. Verify `examples/` matches `<head>` outside test directories:
    
       ```bash
       git status --porcelain -- examples/ ':(exclude)examples/*/test/**'
       ```
    
       It must print nothing, including no newly created files. The entry must reproduce `git diff <base>..<head> -- examples/ ':(exclude)examples/*/test/**'`.
    5. Verify the entry left tests at `<base>`; the source equality check cannot detect test changes:
    
       ```bash
       git diff --exit-code <base> -- 'examples/*/test/**'
       git ls-files --others --exclude-standard -- 'examples/*/test/**'
       ```
    
       The first command must exit 0 and the second print nothing. An entry must not mutate or create tests to make the next step pass. A file under a test directory that the entry's own script wrote passes when it equals `<head>` byte for byte.
    6. Run `pnpm --filter <example-package> test` for each touched example. The repo-wide `pnpm test:examples` also runs examples needing a database and `.env` (`pnpm db:up`, then copy `.env.example`); run it only with those in place.
    
    ### Extension entry (against `packages/3-extensions/`)
    
    The target facades, every folder matching `packages/3-targets/*/9-facade/` or `packages/3-targets/*/*/9-facade/`, are extension code too; the check covers a new database's facade without any change to the script. When the PR changes one, add its folder to every path in the commands below.
    
    1. Check out `<head>`, which has the framework change applied.
    2. Revert `packages/3-extensions/` to its pre-PR state (`git restore --source=<base> -- packages/3-extensions/`).
    3. Run the fragment against the restored extension code, including referenced scripts and prose.
    4. Verify the non-test paths match `<head>`:
    
       ```bash
       git status --porcelain -- packages/3-extensions/ ':(exclude)packages/3-extensions/*/test/**'
       ```
    
       It must print nothing. The entry reproduces `git diff <base>..<head> -- packages/3-extensions/ ':(exclude)packages/3-extensions/*/test/**'`.
    5. Verify test paths remain at `<base>`:
    
       ```bash
       git diff --exit-code <base> -- 'packages/3-extensions/*/test/**'
       git ls-files --others --exclude-standard -- 'packages/3-extensions/*/test/**'
       ```
    
       The first command must exit 0; the second must print nothing. A file under a test directory that the entry's own script wrote passes when it equals `<head>` byte for byte.
    6. Verify the matching test suite is green: `pnpm test --filter='./packages/3-extensions/*'`.
    
    If any check fails, iterate on the entry; do not merge. Classify failures before changing anything, per [CI failure classification](../../.agents/rules/ci-failure-classification.mdc). A timeout or connection error makes the environment a candidate cause, not a verdict.
    
    ## PR commit shape
    
    Include:
    
    - Each new `upgrade-instructions/pending/<name>/<audience>/instructions.md` and any colocated scripts/assets.
    - The updated example and extension code, matching the result of applying the instructions outside test directories. The entry neither writes nor updates those tests.
    - PR-description references naming the fragment directories, for example `upgrade-instructions/pending/migration-metadata-shape/app/` and `upgrade-instructions/pending/migration-metadata-shape/extension/`.
    
    Both audience copies may share IDs, summaries, or detection predicates; they are independent records. Fixes to either copy use normal PR review. Historical published guidance can also be corrected through normal reviewed PRs, but edits to old guides do not replace a new PR's required pending declaration. Guides up to `8.0.0-rc.24` may keep the workspace names they shipped with; the published-names check does not read them.
    
    ## Out of scope
    
    Fragments describe code translation only. Do not add the general bump/install/instructions/validate/commit loop to their bodies: the published [app](../../skills/prisma-8/references/upgrade-app.md) and [extension](../../skills/prisma-8/references/upgrade-extension.md) flows own it. Extension exact-pin enforcement remains `prisma-8-check-pins` from `@internal/extension-author-tools`.
    
    Release synthesis, archives, skipped unpublished bumps, and release completeness belong to the [canonical lifecycle](../../upgrade-instructions/README.md), not feature-PR authoring. No release-wide migration rehearsal is required.
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/prisma-orm-skills-contrib-record-upgrade-instructions.md

// REPO STATS

47.8k stars
2613 open issues
Last commit: 1d ago