prisma-postgres-setup
Set up a new Prisma Postgres database and connect it to a local project using the Management API. Use when asked to "set up a database", "create a Prisma Postgres project", "get a connection string", "connect my app to Prisma Postgres", or "provision a database".
Security Assessment
Detected risks:
About prisma-postgres-setup
The prisma-postgres-setup skill is designed to streamline the process of provisioning a new Prisma Postgres database and connecting it to a local project. It solves the common challenge developers face when trying to set up a Postgres database in a Prisma environment, ensuring that the database is properly created via the Management API and that the correct connection string is provided for local development. By automating the steps and guiding users through authentication, region selection, and project creation, this skill simplifies what could otherwise be a complex, error-prone task.
Key features of this skill include step-by-step guidance for authenticating with a Prisma service token, listing available deployment regions, and creating a new project with an attached Postgres database. It provides explicit instructions for handling API responses, extracting project and database IDs, and obtaining the direct PostgreSQL connection string. The skill emphasizes user experience by recommending interactive selection mechanisms for user choices, avoiding manual input errors, and ensuring smooth integration with local projects. It also clearly outlines prerequisites, such as Node.js 18+ and an existing Prisma Postgres workspace.
This skill is particularly useful for developers who are starting a new project requiring a Postgres database managed by Prisma. Target users include individual developers, small teams, and those working in local development environments who need quick, reliable database provisioning. Common use cases include creating a new Prisma Postgres project, obtaining connection strings for local development, and provisioning databases programmatically via the Management API. The skill is not intended for CI/CD database setup, multi-tenant integration, or operations on existing connected databases, making it ideal for initial setup tasks in development workflows.
FAQ
How do I authenticate when using prisma-postgres-setup?
You can authenticate using a Prisma service token. First, check if the user provided a token in their prompt. If not, check the PRISMA_SERVICE_TOKEN environment variable or .env file. If no token is available, instruct the user to create one in Prisma Console under Workspace Settings → Service Tokens.
Which Node.js version is required for this skill?
Node.js version 18 or higher is required to use prisma-postgres-setup.
Can I use this skill to set up CI/CD preview databases?
No, for CI/CD preview databases you should use the prisma-postgres-cicd skill instead.
How do I select the region for my database deployment?
The skill fetches a list of available regions via the Management API and recommends presenting them as an interactive menu so the user can select a region easily without manually typing IDs.
Which connection string should I use for my local project?
Use the direct PostgreSQL connection string from the API response under data.database.connections[0].endpoints.direct.connectionString. Do not use pooled or accelerated endpoints.
Install prisma-postgres-setup
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
prisma/skills