prisma-postgres

Provision and manage Prisma Postgres databases via CLI, Console, and Management API.

1|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/Sima-Malla/Digital_Menu --skill prisma-postgres-sima-malla
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/Sima-Malla/Digital_Menu/tree/main/my-app/.windsurf/skills/prisma-postgres
Command: npx skills add https://github.com/Sima-Malla/Digital_Menu --skill prisma-postgres-sima-malla

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires create-db, @prisma/management-api-sdk, @prisma/cli, and includes references (resource) components.

What problem does it solve? Setting up and managing Prisma Postgres databases involves multiple surfaces—Console, CLI tools, and APIs—and it is easy to pick the wrong workflow or miss critical details like one-time connection secrets and claim URLs. ## Core Features & Use Cases - Instant Provisioning: Create temporary databases with npx create-db (aliases create-pg, create-postgres), with flags for region, TTL, JSON output, and .env writing. - Programmatic Management: Use the Management API or @prisma/management-api-sdk with service tokens or OAuth for workspace, project, branch, and database automation. - Project Linking & Connections: Link existing databases with prisma postgres link, configure direct TCP connections with sslmode=require, and choose between @prisma/adapter-pg and serverless drivers. - Use Case: A developer bootstrapping a new app runs npx create-db@latest --env .env to get a database instantly, then later switches to the Management API SDK to automate per-tenant database provisioning in production. ## Quick Start Ask the assistant to provision a new Prisma Postgres database using create-db and write the connection string into your project's .env file.

Frequently Asked Questions about prisma-postgres

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Prisma Postgres database from the terminal?

Run `npx create-db@latest` (or the aliases `create-pg` / `create-postgres`) to provision a database instantly. Use flags like `--region`, `--env .env`, `--json`, or `--ttl` to control region, env file output, machine-readable output, and auto-deletion timing.

How do I link an existing Prisma Postgres database to a local project?

Run `prisma postgres link` to wire a local project to an existing database, which updates your `.env` with `DATABASE_URL`. For CI, pass `--api-key` and `--database` non-interactively, then run `prisma generate` and `prisma migrate dev`.

What is the difference between the Management API and the Management API SDK?

The Management API is the raw REST API at `https://api.prisma.io/v1` authenticated with service tokens or OAuth. The `@prisma/management-api-sdk` npm package wraps it with typed endpoint methods and optional OAuth token refresh handling.

Do temporary create-db databases get deleted automatically?

Yes, databases created with create-db are temporary by default and unclaimed databases are auto-deleted after about 24 hours. Use the claim URL shown in the output to keep the database permanently, or set a shorter TTL with `--ttl`.

Which adapter should I use for Prisma Postgres connections?

Standard Node.js apps should use `@prisma/adapter-pg` with the direct TCP connection string including `sslmode=require`. Edge or serverless runtimes should use `@prisma/adapter-ppg` with `@prisma/ppg` only when the serverless driver is specifically needed.

Why can't I retrieve my database connection string again later?

Connection secrets are one-time view: they are revealed only at creation and cannot be re-read from later API GET requests. Store the connection URL immediately, and prefer the structured `endpoints.direct` and `endpoints.pooled` fields over the deprecated flat `connectionString`.