prisma-postgres-setup — скилл для Claude Code: что делает
Подключает Prisma Postgres к проекту или создаёт временную базу данных без регистрации. Пригодится, когда приложению нужна база с нуля или через Vercel Marketplace.
npx skills add prisma/skills --skill prisma-postgres-setup -a claude-codeЧто делает prisma-postgres-setup
Скилл проверяет проект: установленные пакеты, драйверы и файлы переменных окружения, не выводя секреты в чат. Если база уже есть, он повторно использует её подключение. Для новых проектов без настроенного провайдера агент предлагает создать временную базу через npx create-db@latest либо развернуть постоянную базу. Временная база удаляется через 24 часа, если не привязать её к бесплатному аккаунту Prisma.
Учётные данные сохраняются в локальный .env-файл, который обязательно должен быть в .gitignore. Настройку схемы и клиента Prisma скилл передаёт субагенту prisma-orm-setup. Если в проекте явно выбран другой инструмент вроде Drizzle или драйвера pg, скилл сохраняет этот выбор и не навязывает Prisma ORM.
Перед завершением работы агент выполняет проверочный запрос только на чтение к базе данных. Если для создания базы не хватает квот или прав доступа, процесс останавливается: скилл прямо сообщает об ошибке и не пытается менять рабочие пространства или удалять чужие ресурсы.
Какие задачи решает
- развернуть временную базу данных через
npx create-dbбез регистрации - подключить существующий инстанс Prisma Postgres к проекту
- настроить переменные окружения для работы с базой в Vercel Marketplace или v0
- проверить подключение к базе тестовым запросом на чтение без утечки секретов
Примеры запросов агенту
- Мне нужна база данных Postgres для этого приложения
- Подключи Prisma Postgres к проекту через npx create-db
- Настрой подключение к базе данных, но оставь Drizzle в качестве ORM
Как установить prisma-postgres-setup
1Через Skills CLI (Vercel)
npx skills add prisma/skills --skill prisma-postgres-setup -a claude-code2Вручную: положить файлы
~/.claude/skills/prisma-postgres-setup/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/prisma-postgres-setup/
1Через Skills CLI (Vercel)
npx skills add prisma/skills --skill prisma-postgres-setup -a codex2Вручную: положить файлы
.agents/skills/prisma-postgres-setup/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add prisma/skills --skill prisma-postgres-setup -a cursor2Вручную: положить файлы
.cursor/skills/prisma-postgres-setup/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install prisma/skills prisma-postgres-setup2Вручную: положить файлы
.github/skills/prisma-postgres-setup/SKILL.md1Через Skills CLI (Vercel)
npx skills add prisma/skills --skill prisma-postgres-setup -a gemini-cli2Командой платформы
gemini skills install https://github.com/prisma/skills --path prisma-postgres-setupВручную: положить файлы
.devin/skills/prisma-postgres-setup/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add prisma/skills --skill prisma-postgres-setup -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора5
Весь набор →Похожие
Вопросы о prisma-postgres-setup
Как установить prisma-postgres-setup в Claude Code?
Выполните команду npx skills add prisma/skills --skill prisma-postgres-setup -a claude-code. Конфигурация запишется в ~/.claude/skills/prisma-postgres-setup/SKILL.md.
Что делает скилл prisma-postgres-setup?
Он проверяет конфигурацию проекта, находит существующую базу или создаёт новую Prisma Postgres, а затем тестирует подключение безопасным запросом на чтение.
Что происходит с временной базой, созданной через npx create-db?
Такая база данных автоматически удаляется через 24 часа. Чтобы сохранить её навсегда, её нужно закрепить за бесплатным аккаунтом Prisma.
Исходный текст
SKILL.md · MIT
---
name: prisma-postgres-setup
description: Obtain or reuse a Prisma Postgres database and connect an application. Use when the user needs a database and has none configured ("I need a database", "add a Postgres database", "set up a database for this app"), runs or mentions `create-db` or `npx create-db`, or asks to set up or connect Prisma Postgres, including in v0 and the Vercel Marketplace. Hands Prisma ORM configuration to prisma-orm-setup; reuses an existing connection first and honors an explicit provider, driver, alternative ORM, or database-only choice.
license: MIT
metadata:
author: prisma
version: "2.2.0"
---
# Prisma Postgres setup
Connect the intended database, then verify it from the application. Keep provisioning separate from ORM configuration so an existing database is reused.
## 1. Inspect the project
Check the user's requested ORM or driver, installed packages, database connection, and environment-loading files. Check secret presence without printing values.
- Honor explicit choices such as Drizzle, `pg`, or database-only setup.
- For query or schema work in an already configured app, use its version-matched ORM guidance; do not restart setup.
## 2. Reuse or obtain a database
| Situation | Action |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Existing connection or connected integration | Verify its project, database, and environment; reuse it. |
| v0, Vercel Marketplace, or a Vercel project | Read [Marketplace setup](references/vercel-marketplace.md) and use the native integration flow. |
| No database yet and no provider named | Offer `npx create-db@latest` for a working database now with no account (it is deleted after 24 hours unless claimed, and claiming needs a free Prisma account; read the create-db section in [provisioning](references/provisioning.md)), or a persistent database through [provisioning](references/provisioning.md). Ask which one when the request does not say. |
| Standalone persistent database | Read [provisioning](references/provisioning.md); use an authenticated CLI, MCP tool, Console, or Management API. |
| Temporary development database requested | Read the `create-db` section in [provisioning](references/provisioning.md), including expiry and claiming. |
Resolve the workspace, project, and region before creation. If several resources fit, ask which one to use. If provisioning is blocked by permissions or quota, report the blocker; do not delete another resource or switch workspaces to get around it.
## 3. Connect the application
Use the connection appropriate to the chosen driver and runtime. Store it in the project's secret environment configuration, never source code or chat. Preserve unrelated entries, update the intended variable once, and ensure local secret files are ignored by Git.
Application processes and CLI commands may load different environment files. For example, a framework may load `.env.development.local` while a shell command does not. A variable missing from the shell does not mean the database is missing: load the intended file for that command without displaying credentials, and do not provision another database.
## 4. Configure the ORM and verify
For Prisma ORM setup, read [prisma-orm-setup/SKILL.md](https://github.com/prisma/skills/blob/main/prisma-orm-setup/SKILL.md) directly, or load the installed `prisma-orm-setup` skill when the host resolves sibling skills by name. It owns ORM version selection and configuration. If that handoff is unavailable, report it.
For an explicitly selected alternative, keep that ORM or driver and use its documented setup. For database-only setup, stop after verifying connectivity.
Run a read-only query against the intended database through the application's chosen ORM or driver. Report what was connected, the selected ORM/version, and the query result without secrets. If any step is blocked or untested, say so instead of claiming setup is complete.
For Studio, SDK integrations, or database operations beyond initial setup, read [operations](references/operations.md).
© prisma · MIT · prisma/skills