prisma-postgres

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

Updated May 23, 2026
One-click install
npx skills add https://github.com/kveperedo/website --skill prisma-postgres-kveperedo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/kveperedo/website/tree/main/.agents/skills/prisma-postgres
Command: npx skills add https://github.com/kveperedo/website --skill prisma-postgres-kveperedo

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Setting up and managing Prisma Postgres databases involves multiple workflows—Console UI, CLI provisioning, and programmatic APIs—and choosing the wrong path wastes time or breaks automation. This Skill consolidates the correct commands, flags, and integration patterns for each workflow. ## Core Features & Use Cases - Instant CLI Provisioning: Spin up temporary databases with npx create-db, control regions, TTL, JSON output, and write connection strings directly to .env files. - Programmatic Management: Use the Prisma Management API with service tokens or OAuth, or the typed @prisma/management-api-sdk for token refresh and endpoint calls. - 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: You are bootstrapping a CI preview environment. Run npx create-db@latest --json --ttl 2h to provision a temporary database, capture the connection string, and let it auto-delete 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 command line?▼

Run npx create-db@latest to provision a database instantly. Use flags like --region to pick a location, --env to write DATABASE_URL into a .env file, and --json for machine-readable CI output.

How to provision Prisma Postgres programmatically in Node.js?▼

Use the create-db npm package's create() function, which returns a connection string, claim URL, and deletion date. For full workspace management, use @prisma/management-api-sdk with a service token or OAuth flow.

What is the difference between service token and OAuth for the Prisma Management API?▼

Service tokens are best for server-to-server operations within your own workspace. OAuth 2.0 is used when acting on behalf of users across workspaces, requiring an authorize redirect and token exchange at auth.prisma.io.

How long do create-db temporary databases last?▼

Unclaimed databases are auto-deleted after approximately 24 hours. You can shorten this with the --ttl flag (for example --ttl 2h), or claim the database via the claim URL to keep it permanently.

Which Prisma adapter should I use for Prisma Postgres connections?▼

Standard Node.js apps should use @prisma/adapter-pg with a 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.

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

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