prisma-postgres

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

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/rhorba/RestoLedger --skill prisma-postgres-rhorba
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/rhorba/RestoLedger/tree/main/api/.windsurf/skills/prisma-postgres
Command: npx skills add https://github.com/rhorba/RestoLedger --skill prisma-postgres-rhorba

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—Prisma Console, the create-db CLI, the Management API, and its TypeScript SDK—and choosing the wrong workflow or mishandling one-time credentials leads to lost connection strings and broken automation. ## Core Features & Use Cases - Instant database provisioning: Create temporary or persistent Prisma Postgres databases with npx create-db, including region selection, TTL, JSON output, and .env file writing. - Programmatic management: Use the Management API or @prisma/management-api-sdk for workspace, project, branch, and database automation with service tokens or OAuth 2.0. - Connection and Console guidance: Link existing projects with prisma postgres link, configure direct TCP connections with sslmode=require, and choose between @prisma/adapter-pg and serverless drivers. - Use Case: A backend developer needs a Postgres database for a CI preview environment. They run npx create-db@latest --json --ttl 2h to get a machine-readable connection string that auto-deletes after the pipeline finishes. ## Quick Start Ask the assistant to provision a new Prisma Postgres database in a specific region 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` to provision a database instantly, with aliases `create-pg` and `create-postgres`. Use flags like `--region`, `--json`, `--env .env`, or `--ttl 2h` to control region, output format, env file writing, and auto-deletion timing.

How do I connect 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` flags, 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 surface 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 Prisma adapter should I use for serverless runtimes?▼

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 Prisma Postgres serverless driver is specifically needed.

Why can't I see my connection string or service token after creation?▼

Connection credentials and service token values are returned exactly once at creation time and are redacted in later reads. Store the value immediately in a secret store and never log the full creation response.