prisma-next-extension-upgrade
Upgrades Prisma Next dependencies in an extension package across one or more minor versions.
Identity proven by GitHub's verified organisation badge (prisma)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- Apache-2.0 (permissive)
- Pin
- 55458c4pinned Oct 9, 2026
- Context cost
- about 2,000 tokenswhen the skill loads
- GitHub stars
- 415on prisma/prisma-next
- Scripts
- 8 scripts
What it does
“Upgrade Prisma Next in your extension. Bumps every `@prisma-next/*` dependency to the requested target (or npm `latest`), runs the per-transition upgrade instructions for the extension SPI (middleware lifecycle, codec / migration-tools / framework-components churn, seed-migration on-disk shape), verifies the pins are correctly exact via `prisma-next-check-pins`, runs the extension's own typecheck and tests, and commits each minor step on its own. Use when the user asks to "upgrade Prisma Next" in an extension package, or to update an extension's `@prisma-next/*` deps to a new minor.”
Generated summary from the skill's own text
Upgrades Prisma Next dependencies in an extension package across one or more minor versions. Executes version-specific migration instructions, runs validation checks and tests, and commits each step separately.
When to use it
- Extension package needs Prisma Next dependency updated to newer minor version
- User requests upgrade of @prisma-next/* packages in extension
- Extension consumes framework SPI packages like @prisma-next/contract
When not to
- Project is a consumer app, not an extension package
- Upgrading Prisma Next in a regular application codebase
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add prisma/prisma-next --skill prisma-next-extension-upgradeInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install prisma/prisma-next prisma-next-extension-upgrade@55458c441d2cf452028c22eed21370447720840aInstalls the commit we checked (55458c4).
Copy by hand
Download the folder at 55458c4 and put it in .claude/skills/prisma-next-extension-upgrade for Claude Code and in .agents/skills/prisma-next-extension-upgrade for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "prisma-next-extension-upgrade" by Prisma. Source, pinned to commit 55458c441d2cf452028c22eed21370447720840a: https://github.com/prisma/prisma-next/tree/55458c441d2cf452028c22eed21370447720840a/skills/extension-author/prisma-next-extension-upgrade 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/prisma-next-extension-upgrade/ for Claude Code and .agents/skills/prisma-next-extension-upgrade/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/prisma/prisma-next-extension-upgrade
SKILL.md at the pin
---
name: prisma-next-extension-upgrade
description: >-
Upgrade Prisma Next in your extension. Bumps every `@prisma-next/*`
dependency to the requested target (or npm `latest`), runs the
per-transition upgrade instructions for the extension SPI (middleware
lifecycle, codec / migration-tools / framework-components churn,
seed-migration on-disk shape), verifies the pins are correctly exact
via `prisma-next-check-pins`, runs the extension's own typecheck and
tests, and commits each minor step on its own. Use when the user asks
to "upgrade Prisma Next" in an extension package, or to update an
extension's `@prisma-next/*` deps to a new minor.
---
# Upgrade Prisma Next (extension)
This skill upgrades a project that **is** a Prisma Next extension — a package that consumes the framework SPI (`@prisma-next/contract`, `@prisma-next/framework-components`, `@prisma-next/migration-tools`, etc.) and exposes contract / middleware / codec / migration surfaces that downstream apps install via `prisma-next.config.ts`.
If the project you are upgrading is a consumer **app** (it imports `@prisma-next/postgres` or `@prisma-next/mongo` from its application code), use the `prisma-next-upgrade` skill instead — or both, if the repo contains both a consumer app and an extension package, in which case run the user flow first then the extension flow in the same session.
## Step 0 — Ensure the skill is up to date
Before doing anything else, ensure this skill is installed at `@latest` and reload it. Bug fixes to *old* per-transition upgrade instructions ship in the latest skill release as part of its cumulative set; running against a stale skill can apply a known-broken translation.
Concretely: if the agent runtime supports an in-session refresh, perform it now. Otherwise, exit and ask the user to re-install:
```bash
pnpm dlx skills add prisma/prisma-next/skills/extension-author --all
```
The extension-author skill subpath is intentionally unpinned (always `main`) — the cumulative instruction set is the source of truth and the latest release fixes apply to every prior transition.
Then re-invoke this skill before proceeding.
## Role detection
This skill applies when the project **is** a Prisma Next extension. Heuristics:
- `package.json` declares `@prisma-next/contract` (or another SPI package) under `dependencies` or `peerDependencies`, and
- the package's `name` matches `^@.*/extension-` (the in-tree convention used by `@prisma-next/extension-pgvector`, etc.), or
- the package is referenced as an `extensions` entry from a sibling app's `prisma-next.config.ts` in the same monorepo.
If the project additionally consumes Prisma Next from its own app code, install the `prisma-next-upgrade` skill (`pnpm dlx skills add prisma/prisma-next/skills/upgrade --all`) and run the user flow first, then this flow in the same session.
If detection is ambiguous, ask the user which role to operate under.
## Version detection
- **From-version.** Read the currently-installed Prisma Next version from `pnpm-lock.yaml` (or `package-lock.json` / `yarn.lock`) by inspecting the resolved version of any `@prisma-next/*` entry. If the lockfile shows multiple `@prisma-next/*` packages at different minors, the lowest minor is the from-version.
- **To-version.** Either the version the user specified, or the latest stable from `npm view @prisma-next/contract dist-tags.latest`.
Report both back to the user before continuing.
## Transition chain
If the from-to delta spans multiple minor versions (e.g. `0.6 → 0.8`), build the chain of one-minor steps:
```text
0.6 → 0.7 → 0.8
```
Apply each step in order, fully: bump, install, run instructions, check pins, validate, commit — before moving to the next. Halt the chain on the first failed step.
## Per-step flow
This flow assumes you are an **external extension author** — your extension lives in its own repo and consumes `@prisma-next/*` from npm. (Extensions inside the `prisma/prisma-next` monorepo itself are bumped via `pnpm bump-minor` / `scripts/set-version.ts`, which rewrites every `workspace:<X.Y.Z>` spec in lockstep with the root version; they do not run this skill.)
For each `(from, to)` step in the chain:
1. **Bump `@prisma-next/*` deps.** Rewrite every `@prisma-next/*` entry in the extension's `package.json` to the exact `<to>` version (e.g. `"0.8.0"` — no caret, no tilde, no range, no `workspace:` specifier; the exact-pin rule below details why). All entries advance to the same version. Cover whichever dep field(s) the extension uses today — `dependencies` and/or `peerDependencies` — and any `optionalDependencies`. The extension-upgrade skill itself ships via `pnpm dlx skills add` (see Step 0); there is no `@prisma-next/extension-upgrade-skill` npm entry to bump. The companion CLI tool is `@prisma-next/extension-author-tools` — leave its pin at the version the extension's CI is currently using; bumping it is independent of the framework upgrade and is normally a no-op.
2. **Install.** Run `pnpm install` (or the project's lockfile-managing command). The extension's source is now broken against the new SPI — the upgrade instructions for `<from> → <to>` exist to fix it.
3. **Check pins.** Run `pnpm exec prisma-next-check-pins` (shipped by `@prisma-next/extension-author-tools`). This sanity check asserts that every `@prisma-next/*` entry across `dependencies`, `peerDependencies`, and `optionalDependencies` is a single exact-version string and that all entries share the same version. If the check fails, the bump step did not rewrite every spec — fix the offending entries and re-run before proceeding.
4. **Read the upgrade instructions.** Load `upgrades/<from>-to-<to>/instructions.md` from this skill package. Parse the YAML frontmatter and pay particular attention to its `changes[]` array.
5. **Apply each change.** For each entry in `changes[]`:
- If the entry has a `detection` block (a glob + content predicate), run it. If no files match, skip this change.
- If the entry has no `detection`, apply unconditionally.
- If the entry names a `script:` (a relative path next to `instructions.md`), invoke it from the project root:
- `*.ts` → `pnpm exec tsx <skill>/upgrades/<from>-to-<to>/<script>`
- `*.sh` → `bash <skill>/upgrades/<from>-to-<to>/<script>`
- codemods → invoke per the script's own `instructions.md` prose.
- If the entry has no `script`, follow the prose body in `instructions.md` directly.
If `changes[]` is empty (the placeholder shape for transitions with no extension-side breaking changes), this sub-step is a no-op — proceed to validation.
6. **Validate.** Run `pnpm build && pnpm test` (or the project's equivalent — the `scripts` field of the extension's `package.json` is the discovery surface). If anything is red, halt the chain. Do **not** auto-roll-back; surface the failure to the user with the failing change's `id` (from the frontmatter), the file paths the change operated on, and the inferred remediation.
7. **Commit.** Create one commit containing this step's changes: the `package.json` bump, the lockfile churn from `pnpm install`, and any source-file rewrites from the applied changes. Use the message:
```text
chore: upgrade @prisma-next/* to <to-version>
```
(Or the extension's own commit-message convention, if it has one.) One commit per step — never squash steps.
Move on to the next step. Repeat.
## Exact-pin rule
Prisma Next extensions pin every `@prisma-next/*` dependency to a single **exact** version (no `^`, no `~`, no range, no wildcard, no `workspace:` specifier in the published `package.json`). All `@prisma-next/*` entries share the same version. The pin advances only after a successful upgrade run against the new minor.
`prisma-next-check-pins` (shipped by `@prisma-next/extension-author-tools` — install with `pnpm add -D @prisma-next/extension-author-tools`) enforces the rule. Run it locally with:
```bash
pnpm exec prisma-next-check-pins
```
Wire it into the extension's CI alongside the build/test step so an accidental range pin fails the PR before it lands.
## When the chain is done
Report back to the user: the number of steps applied, the SHAs of the commits you made, and any open follow-ups.
## Failure surfaces
When a step fails:
- Surface a structured error with code `PN-UPGRADE-NNNN`, the failing change's `id`, the file paths the change touched (or the lockfile, or the pin check, or the validation command), and the inferred remediation.
- Do not retry automatically.
- Do not auto-roll-back the commit. The user can revert if they want a clean slate.
From prisma/prisma-next at 55458c4, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at 55458c4Files
- SKILL.md8.7 KB · 08401f7bdc51
- README.md3.3 KB · 660b11dd1225
- upgrades/
- 0.10-to-0.11/
- instructions.md15 KB · 033f9c93db7e
- 0.11-to-0.12/
- instructions.md43 KB · e721783fdcfd
- migrate-contract-testing-imports.ts2.9 KB · fb516ca39c84
- regenerate-extension-public-baseline.ts7.3 KB · 032ce7fa6960
- strip-migration-labels-hints.ts13 KB · 405e43eb274c
- 0.12-to-0.13/
- instructions.md15 KB · 60b34de018f3
- 0.13-to-0.14/
- instructions.md27 KB · 49abc59dbe31
- migration-op-factories-to-methods.ts10 KB · 50eb9b4b3c2d
- uuid-preset-rename.ts1.3 KB · 3c792a22ceed
- 0.14-to-0.15/
- instructions.md49 KB · 721526a68bba
- 0.15-to-0.16/
- instructions.md15 KB · 5b865d7fd985
- 0.16-to-0.17/
- instructions.md38 KB · 90927c467c2b
- strip-sha256-hash-prefixes.ts15 KB · 1d02707ff195
- 0.7-to-0.8/
- instructions.md188 B · 0815967474a2
- 0.8-to-0.9/
- instructions.md5.3 KB · 51fdee306182
- strip-inline-contracts.ts8.0 KB · 56047244523a
- 0.9-to-0.10/
- instructions.md8.9 KB · 920fc965eede
- stamp-storage-types-kind.ts13 KB · f9c6c709a93b
20 files, 298 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 55458c4More from Prisma
prisma-8
This skill helps agents work with Prisma 8, a contract-first data layer for TypeScript projects.
Contains scripts
Claude Code, Codex, Cursor +3 · about 3.5K tokens · pinned 6 days ago
adr-review
This skill reviews Architecture Decision Records (ADRs) from a fresh perspective, identifying clarity and structural issues, then rewrites them for future…
Claude Code, Codex, Cursor +4 · about 590 tokens · pinned 6 days ago
ast-visitor-pattern
This skill teaches agents to use the visitor pattern with frozen subclasses for discriminated unions that need multiple dispatch sites.
Claude Code, Codex, Cursor +4 · about 710 tokens · pinned 6 days ago
bumping-biome
Updates the biome code formatter package to a specified version using pnpm, renames configuration files to biome.jsonc format, updates schema references, and…
Claude Code, Codex, Cursor +4 · about 290 tokens · pinned 6 days ago
contrib-pr
This skill guides external contributors through opening a pull request against prisma-next by following the project's contribution guidelines.
Claude Code, Codex, Cursor +4 · about 2.2K tokens · pinned 6 days ago
create-pr
This skill creates a GitHub pull request with a Linear-ticket-prefixed title and a decision-led narrative description for the prisma-next repository.
Claude Code, Codex, Cursor +4 · about 4.3K tokens · pinned 6 days ago
Related in Coding workflow
prisma-next-build
This skill integrates Prisma Next's contract-emit into the Vite build system via the @prisma-next/vite-plugin-contract-emit plugin, automatically re-emitting…
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 6 days ago
prisma-next-feedback
Routes bug reports, feature requests, and team Q&A to the appropriate Prisma Next channel.
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 4.2K tokens · pinned 6 days ago
prisma-next-upgrade
Upgrades Prisma Next dependencies in a user app from one version to the next, applying code translations from per-transition instructions, validating with the…
by PrismaOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 1.9K tokens · pinned 6 days ago
psl-ast-layers
This skill teaches agents how to correctly use the three-layer syntax tree produced by the PSL parser: the green tree for internal storage, the red tree for…
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.2K tokens · pinned 6 days ago
record-upgrade-instructions
Records upgrade instructions in published skill packages whenever a PR makes breaking changes to Prisma Next that require downstream users or extension…
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 4.2K tokens · pinned 6 days ago
planning
This skill orchestrates multi-workflow projects with dependencies and shared data tables by creating a task graph in the orchestrator via the create-tasks tool.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.4K tokens · pinned 6 days ago