Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

prisma-next-upgrade

БесплатноЗапускает вложенные скриптыНе проверен

Upgrade Prisma Next in your app. Bumps every `@prisma-next/*` dependency from the version pinned in the lockfile to the requested target (or npm `latest`)…

prismaот prisma★ 407 звёзд на GitHub

Об этом скилле

Upgrade Prisma Next (user app)

This skill upgrades a project that consumes Prisma Next via the public package API (@prisma-next/postgres, @prisma-next/mongo, the contract files in prisma/, etc.). If the project is itself a Prisma Next extension, use the prisma-next-extension-upgrade skill instead — or both, if the repo contains both an app and an extension package.

Step 0 — Ensure the skill is up to date

Before 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.

If the agent runtime supports an in-session refresh, perform it now. Otherwise, exit and ask the user to re-install (pnpm dlx skills add prisma/prisma-next/skills/upgrade --all), then re-invoke. The upgrade-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.

Pre-flight — extension compatibility

Before changing any code, refuse to upgrade past any installed extension's pinned Prisma Next version. Extensions in Prisma Next pin every @prisma-next/* dependency to a single exact version (no carets, no ranges); that pin is the highest version the extension has been validated against. Upgrading the user app past that pin would silently desynchronise the extension's type identity from the app's.

Steps:

  1. Read prisma-next.config.ts (or its TS-discoverable equivalent at the project root) and enumerate the list of extension packages it imports. Each extensions: [...] entry corresponds to an installed npm package.
  2. For each extension, read its installed package.json from node_modules/<extension-package-name>/package.json and find any @prisma-next/* entry under dependencies, peerDependencies, or optionalDependencies. By construction those entries are exact-version pins (e.g. "0.7.0"), set when the extension author last ran their own upgrade.
  3. Compute the lowest pinned version across all extensions. That is the highest Prisma Next version reachable by this app on its current extension set.
  4. Compare to the user's target. If the target exceeds the lowest pin, halt with a structured message naming each lagging extension and its pinned version, and offer two paths:
    • (a) Wait for the lagging extension to publish a compatible release, then re-run.
    • (b) Re-run with --to=<highest-reachable> (or whatever flag/option the user is using to set the target).

Do not auto-downgrade the target; do not skip the lagging extension; do not bump past it. If the user explicitly overrides the halt, surface the risk clearly first.

If prisma-next.config.ts is absent or names no extensions, skip the pre-flight.

Role detection

This skill applies when the project consumes Prisma Next:

  • package.json declares one or more @prisma-next/* packages under dependencies / devDependencies, and
  • the package is not itself an extension (no @prisma-next/contract (or other SPI) under dependencies/peerDependencies; name does not match ^@.*/extension-; not referenced from a sibling app's prisma-next.config.ts).

If the project also matches the extension-author role, install the prisma-next-extension-upgrade skill (pnpm dlx skills add prisma/prisma-next/skills/extension-author --all) and run this flow first, then that one in the same session. If detection is ambiguous, ask the user.

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/* package. If the lockfile shows multiple @prisma-next/* packages at different minors (already broken), the lowest minor is the from-version.
  • To-version. Either the version the user specified, or the latest stable from npm view @prisma-next/postgres 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:

0.6 → 0.7 → 0.8

Apply each step in order, fully: bump, install, run instructions, validate, commit — before moving to the next. Halt the chain on the first failed step; do not skip ahead.

The chain order does not depend on which extensions are installed; the pre-flight has already established the target is reachable.

Per-step flow

For each (from, to) step in the chain:

  1. Bump @prisma-next/* deps. Rewrite every @prisma-next/* entry in the project's package.json to the exact <to> version (no caret, no tilde). All entries advance to the same version. Cover dependencies and devDependencies. The upgrade skill itself is delivered through pnpm dlx skills add and lives under `.agents/skil
Полный SKILL.md на GitHub

Установить prisma-next-upgrade в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdupgrades/0.10-to-0.11/instructions.mdupgrades/0.11-to-0.12/instructions.mdupgrades/0.11-to-0.12/re-emit-closed-mongo-contracts.tsupgrades/0.11-to-0.12/re-emit-domain-namespaced-contracts.tsupgrades/0.11-to-0.12/re-emit-postgres-public-default.tsupgrades/0.11-to-0.12/strip-migration-labels-hints.tsupgrades/0.12-to-0.13/instructions.mdupgrades/0.12-to-0.13/re-emit-mti-variant-link-columns.tsupgrades/0.13-to-0.14/instructions.mdupgrades/0.13-to-0.14/migration-op-factories-to-methods.tsupgrades/0.13-to-0.14/uuid-preset-rename.tsupgrades/0.14-to-0.15/instructions.mdupgrades/0.15-to-0.16/instructions.mdupgrades/0.16-to-0.17/instructions.mdupgrades/0.16-to-0.17/strip-sha256-hash-prefixes.tsupgrades/0.7-to-0.8/instructions.mdupgrades/0.8-to-0.9/instructions.mdupgrades/0.8-to-0.9/strip-inline-contracts.tsupgrades/0.9-to-0.10/instructions.mdupgrades/0.9-to-0.10/stamp-storage-types-kind.ts

FAQ

Что делает скилл prisma-next-upgrade?

Upgrade Prisma Next in your app. Bumps every `@prisma-next/*` dependency from the version pinned in the lockfile to the requested target (or npm `latest`), applies any required code-translation steps from the per-transition upgrade instructions, validates with the project's own typecheck + tests, and commits each minor step on its own. Use when the user asks to "upgrade Prisma Next", "bump Prisma Next", "move to Prisma Next X.Y", or asks an agent to deal with an `@prisma-next/*` minor bump in their app.

Как установить скилл prisma-next-upgrade?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл prisma-next-upgrade запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить prisma-next-upgrade с