prisma-postgres

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

2|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/MahdiaMayati/spotlight --skill prisma-postgres-mahdiamayati
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/MahdiaMayati/spotlight/tree/main/spotlight-backend/.windsurf/skills/prisma-postgres
Command: npx skills add https://github.com/MahdiaMayati/spotlight --skill prisma-postgres-mahdiamayati

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 choosing the wrong workflow wastes time or produces misconfigured connections. This Skill guides you through the correct provisioning and management path for each scenario. ## 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 (https://api.prisma.io/v1) or the typed @prisma/management-api-sdk with service tokens or OAuth for automation and multi-tenant flows. - Project Linking & Connections: Link existing databases with prisma postgres link, retrieve direct TCP connection strings, and choose the right adapter (@prisma/adapter-pg vs @prisma/adapter-ppg). - Use Case: You need a throwaway Postgres database for a CI preview. Run npx create-db@latest --ttl 2h --json to get a connection string that auto-deletes, or claim it via the claim URL to keep it permanently. ## Quick Start Ask the AI 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 to provision a database instantly, with aliases create-pg and create-postgres. Use flags like --region, --ttl, --json, or --env to control region, auto-deletion, output format, and writing DATABASE_URL to a .env file.

How to 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 at https://api.prisma.io/v1 is the raw REST surface authenticated with service tokens or OAuth. The @prisma/management-api-sdk wraps it with typed endpoints and optional OAuth token refresh, reducing boilerplate in TypeScript integrations.

Do temporary create-db databases get deleted automatically?▼

Yes, databases created with create-db are temporary and auto-delete after about 24 hours unless claimed. You can shorten this with the --ttl flag (for example 30m or 2h), or open the claim URL to keep the database permanently.

Which Prisma adapter should I use for serverless runtimes?▼

For standard Node.js apps, use @prisma/adapter-pg with the direct TCP connection string including sslmode=require. For edge or serverless runtimes, use @prisma/adapter-ppg with @prisma/ppg only when you specifically need the Prisma Postgres serverless driver.

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

Connection credentials and workspace service tokens are returned exactly once at creation for security. Later list calls show only metadata and a valueHint, so store the value immediately in a secret store and never log the creation response.