skills/prisma/postgres/SKILL.md
Prisma Postgres: setup via Console, create-db CLI, Management API, and SDK for provisioning and integration. Trigger: When creating Prisma Postgres databases, provisioning with create-db, or using the Management API.
npx skillsauth add johnnystefan/test-saas-business prisma-postgresInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guidance for creating, managing, and integrating Prisma Postgres across interactive and programmatic workflows.
Reference this skill when:
create-dbprisma postgres link@prisma/management-api-sdk in TypeScript/JavaScript| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | CLI Provisioning | CRITICAL | create-db-cli |
| 2 | Management API | CRITICAL | management-api |
| 3 | Management API SDK | HIGH | management-api-sdk |
| 4 | Console and Connections | HIGH | console-and-connections |
create-db-cli - instant databases and current CLI flags (--ttl, --copy, --quiet, --open)management-api - service token and OAuth API workflowsmanagement-api-sdk - typed SDK usage with token storageconsole-and-connections - Console operations, prisma postgres link, direct TCP connections, and serverless-driver choicesUse Prisma Console for manual setup and operations:
https://console.prisma.ioUse create-db when you need a database immediately:
npx create-db@latest
Aliases:
npx create-pg@latest
npx create-postgres@latest
For app integrations, you can also use the programmatic API (create() / regions()) from the create-db npm package.
Temporary databases auto-delete after ~24 hours unless claimed.
Use prisma postgres link when the database already exists and you want to wire a local project to it:
prisma postgres link
For CI or other non-interactive environments:
prisma postgres link --api-key "<your-api-key>" --database "db_..."
This flow updates your local .env with DATABASE_URL, then you can run prisma generate and prisma migrate dev.
Use API endpoints on:
https://api.prisma.io/v1
Explore the schema and endpoints using:
https://api.prisma.io/v1/dochttps://api.prisma.io/v1/swagger-editorAuth options:
Install and use:
npm install @prisma/management-api-sdk
Use createManagementApiClient for existing tokens, or createManagementApiSdk for OAuth + token refresh.
Detailed guidance lives in:
references/console-and-connections.md
references/create-db-cli.md
references/management-api.md
references/management-api-sdk.md
Start with references/create-db-cli.md for fast setup, then switch to references/management-api.md or references/management-api-sdk.md when you need programmatic provisioning.
tools
Zustand 5 state management patterns. Trigger: When implementing client-side state with Zustand (stores, selectors, persist middleware, slices).
databases
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
development
Vitest unit testing patterns with React Testing Library. Trigger: When writing unit tests for React components, hooks, or utilities.
tools
Vite 8 (Rolldown-powered) build tool configuration, plugin API, SSR, and migration guide. Trigger: When working with vite.config.ts, Vite plugins, building libraries, or SSR apps with Vite.