prisma-postgres

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

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/Shofikul-Isl4m/trading-app --skill prisma-postgres-shofikul-isl4m
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/Shofikul-Isl4m/trading-app/tree/main/packages/db/.agents/skills/prisma-postgres
Command: npx skills add https://github.com/Shofikul-Isl4m/trading-app --skill prisma-postgres-shofikul-isl4m

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 right workflow for interactive, CI, or programmatic provisioning is error-prone without consolidated guidance. ## Core Features & Use Cases - Instant database provisioning: Create temporary Prisma Postgres databases with npx create-db, including region selection, TTL, JSON output, and .env writing for CI pipelines. - Programmatic management: Use the Management API or @prisma/management-api-sdk with service tokens or OAuth to manage workspaces, projects, branches, databases, backups, and connections. - Project linking and connections: Link existing databases with prisma postgres link, retrieve direct TCP or pooled connection strings, and choose the right adapter (@prisma/adapter-pg vs @prisma/adapter-ppg). - Use Case: A backend developer needs a throwaway Postgres database for a preview deployment. They run npx create-db --ttl 2h --json in CI, capture the connection string, and let it auto-delete after the pipeline finishes. ## Quick Start Ask the assistant to create a temporary 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 (aliases: create-pg, create-postgres) to provision a database instantly. 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 Prisma Management API and the Management API SDK?

The Management API is the REST surface at api.prisma.io/v1 authenticated with service tokens or OAuth. The SDK (@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 roughly 24 hours unless claimed via the claim URL shown in the output. You can shorten this with the --ttl flag, such as --ttl 2h.

Which adapter should I use for Prisma Postgres connections?

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 need the serverless driver.

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

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