All skills
prisma avatar

/prisma-postgres-setup

@b491588 official
by prismaprisma/skills66 stars
7

Obtain or reuse a Prisma Postgres database and connect an application. Use for "set up Prisma Postgres", "connect my app to Prisma Postgres", or Prisma Postgres setup in v0 and Vercel Marketplace. Hands Prisma ORM configuration to prisma-orm-setup; honors an explicit driver, alternative ORM, or database-only choice.

Use this Skill: https://skilld.dev/gh/prisma/skills/prisma-postgres-setup

This session only. Nothing lands on disk.

referencesoperations.md

≈440 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Console and programmatic operations

Read this only for work beyond connecting one application.

Console and database operations

Use Prisma Console to inspect the selected project and open its database in Studio. Use links returned by the API or UI rather than constructing Console URLs from guessed ID formats.

For usage, backups, connections, or restoration, inspect current Platform CLI help or the Management API schema. Resolve resource IDs before acting. Database deletion, restoration, and credential revocation are separate actions requiring the user's authorization; they are not routine setup steps.

Management API SDK

Use @prisma/management-api-sdk for a typed API integration. Its installed types define current routes and request/response shapes independently of ORM versions.

  • createManagementApiClient({ token }) uses an existing token. Check HTTP errors before reading response data and follow pagination on collection routes.
  • createManagementApiSdk(...) supports OAuth and token refresh. Implement persistent, protected token storage; do not copy a no-op storage example into an application.
  • In the OAuth flow, persist and validate state and the verifier, handle the callback, and store refreshed tokens securely.
  • Service-token and connection creation can return credentials once. Save them to the intended secret store without logging the response. Listing token metadata does not recover the original value.

For exact interfaces and a complete integration, use the SDK documentation and installed package types. Keep ORM schema and migration work in the version-matched ORM skill.

Source: SKILL.md on GitHub

No alertstoday4 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill is a database setup utility authored by Prisma. It follows security best practices by instructing the agent to handle credentials securely, avoid logging secrets, and utilize official vendor tools and repositories. The external resources and packages identified are all official Prisma-owned assets.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at b491588. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 days ago
metadata
{
  "author": "prisma",
  "version": "2.0.0"
}
  • Database
  • prisma
  • postgres
  • provisioning
  • management-api
  • connection-string
  • nodejs

README badge

README badge for prisma/skills/prisma-postgres-setup

Provisions a new Prisma Postgres database via the Management API and configures it in a local Node.js project with Prisma 7. Handles service token authentication, region selection, project creation, schema definition, and end-to-end connection verification.

Generated from the current SKILL.md.

Does this skill work with existing databases, or only new ones?
This skill provisions new Prisma Postgres databases via the Management API. For existing databases that are already connected, use standard Prisma CLI tasks (schema/migration work). For CI/CD preview databases or multi-tenant setups, use the dedicated skills `prisma-postgres-cicd` or `prisma-postgres-integrator`.
What authentication does this require?
You need a workspace service token from Prisma Console (Workspace Settings > Service Tokens). The skill checks for the token in your initial prompt, the PRISMA_SERVICE_TOKEN environment variable, or `.env` file before asking you to create one.
Does this set up Prisma 7?
Yes. The skill installs `@prisma/adapter-pg` (Prisma 7's driver adapter for direct PostgreSQL), creates `prisma.config.ts` for Prisma 7 configuration, and ensures connection URLs are managed there instead of in the schema.
What happens if I hit my database limit?
The skill lists your existing projects as an interactive menu, lets you pick one to delete, then retries the creation.
Does this create migration files?
Yes. When you define or confirm your schema, the skill runs `npx prisma migrate dev --name init`, which generates migration files in `prisma/migrations/` and the Prisma client in one step. This is required for CI/CD and production deployments.

Generated from the current SKILL.md. These answers refresh after source changes.