prisma-postgres

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

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/mousetailor/doker_and_cd_pipeline --skill prisma-postgres-mousetailor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/mousetailor/doker_and_cd_pipeline/tree/main/packages/db/.agents/skills/prisma-postgres
Command: npx skills add https://github.com/mousetailor/doker_and_cd_pipeline --skill prisma-postgres-mousetailor

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 SDK—and choosing the wrong workflow or mishandling one-time credentials leads to lost connection strings and broken environments. ## Core Features & Use Cases - Instant Provisioning: Create temporary databases with npx create-db using flags like --region, --ttl, --json, and --env, or claim them permanently via the claim URL. - Programmatic Management: Use the Management API at https://api.prisma.io/v1 or the typed @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 @prisma/adapter-ppg. - 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 command line?

Run npx create-db@latest to provision a database instantly, with aliases create-pg and create-postgres. Use flags like --region, --json, --env, and --ttl to control region, output format, env file writing, and auto-deletion time.

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 service token and OAuth?

A service token is best for server-to-server operations within your own workspace, sent as a Bearer token. OAuth 2.0 is used when acting on behalf of users across workspaces, involving an authorize redirect and token exchange flow.

Does create-db support programmatic usage in Node.js?

Yes, the create-db npm package exposes create() and regions() functions for programmatic provisioning. The create() result can be checked with isDatabaseSuccess or isDatabaseError, and defaults to us-east-1 if no region is passed.

Why is my Prisma Postgres connection string no longer visible?

Connection secrets and service token values are returned exactly once at creation and are redacted in later reads. Store the URL immediately when created; if lost, rotate or create a new connection via the Management API.

Which adapter should I use for Prisma Postgres in serverless runtimes?

Standard Node.js apps should use @prisma/adapter-pg with the direct TCP URL and sslmode=require. Edge or serverless runtimes should use @prisma/adapter-ppg with @prisma/ppg only when the Prisma Postgres serverless driver is specifically needed.