AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to managing database connections for applications. It prioritizes reusing existing database resources before provisioning new ones. It handles various environments, including Vercel Marketplace and v0, and supports both persistent database setup and temporary development databases via create-db. The skill ensures secure handling of environment variables and delegates ORM-specific configuration to dedicated tools.
What it does
- Inspects existing project configurations to identify current database or ORM setups.
- Reuses existing database connections when available to avoid redundant provisioning.
- Provisions new persistent databases using authenticated CLI, Console, or Management API tools.
- Sets up temporary development databases with automatic expiry using create-db.
- Configures application environment variables securely for database connectivity.
- Verifies database connectivity by running a read-only query through the application's ORM or driver.
When to use it
- When a user needs to add a Postgres database to an application that currently has none.
- When a user explicitly requests to set up or connect a Prisma Postgres database.
- When working within v0 or Vercel Marketplace environments requiring native integration.
- When a user needs a temporary database for development purposes.
Advantages
- Prevents accidental duplicate database creation by checking existing resources first.
- Maintains security by keeping credentials out of source code and chat logs.
- Integrates seamlessly with existing ORM workflows by delegating configuration.
- Supports diverse deployment scenarios from local development to cloud platforms.
Usage examples
- “I need a database for this app.”
- The agent inspects the project for existing connections, then offers to provision a new database or use create-db if no account is available.
- “Set up a Postgres database for my project.”
- The agent identifies the environment, checks for existing credentials, and proceeds to provision a persistent database, storing the connection string in the project's secrets.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/prisma/prisma-postgres-setup/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip prisma-postgres-setup.zip -d .agents/skills
Documentation by prisma
Prisma Postgres setup
Connect the intended database, then verify it from the application. Keep provisioning separate from ORM configuration so an existing database is reused.
1. Inspect the project
Check the user's requested ORM or driver, installed packages, database connection, and environment-loading files. Check secret presence without printing values.
Honor explicit choices such as Drizzle,
pg, or database-only setup.For query or schema work in an already configured app, use its version-matched ORM guidance; do not restart setup.
2. Reuse or obtain a database
| Situation | Action |
|---|---|
| Existing connection or connected integration | Verify its project, database, and environment; reuse it. |
| v0, Vercel Marketplace, or a Vercel project | Read Marketplace setup and use the native integration flow. |
| No database yet and no provider named | Offer npx create-db@latest for a working database now with no account (it is deleted after 24 hours unless claimed, and claiming needs a free Prisma account; read the create-db section in provisioning), or a persistent database through provisioning. Ask which one when the request does not say. |
| Standalone persistent database | Read provisioning; use an authenticated CLI, MCP tool, Console, or Management API. |
| Temporary development database requested | Read the create-db section in provisioning, including expiry and claiming. |
Resolve the workspace, project, and region before creation. If several resources fit, ask which one to use. If provisioning is blocked by permissions or quota, report the blocker; do not delete another resource or switch workspaces to get around it.
3. Connect the application
Use the connection appropriate to the chosen driver and runtime. Store it in the project's secret environment configuration, never source code or chat. Preserve unrelated entries, update the intended variable once, and ensure local secret files are ignored by Git.
Application processes and CLI commands may load different environment files. For example, a framework may load .env.development.local while a shell command does not. A variable missing from the shell does not mean the database is missing: load the intended file for that command without displaying credentials, and do not provision another database.
4. Configure the ORM and verify
For Prisma ORM setup, read prisma-orm-setup/SKILL.md directly, or load the installed prisma-orm-setup skill when the host resolves sibling skills by name. It owns ORM version selection and configuration. If that handoff is unavailable, report it.
For an explicitly selected alternative, keep that ORM or driver and use its documented setup. For database-only setup, stop after verifying connectivity.
Run a read-only query against the intended database through the application's chosen ORM or driver. Report what was connected, the selected ORM/version, and the query result without secrets. If any step is blocked or untested, say so instead of claiming setup is complete.
For Studio, SDK integrations, or database operations beyond initial setup, read operations.
Files
- ATTRIBUTION.mdAdded by AutoGineer879 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md4.3 KiB
- references/operations.md1.7 KiB
- references/provisioning.md4.8 KiB
- references/vercel-marketplace.md10.3 KiB
references/provisioning.md
Standalone provisioning
First reuse an existing connection or resource. For v0 or Vercel Marketplace, use the native integration flow instead.
Persistent databases
Choose an available authenticated surface: Prisma Console, the Prisma Platform CLI, a connected Prisma MCP server, or the Management API. Reuse existing authentication; do not ask the user to paste tokens into chat.
Console: select the intended workspace and project at Prisma Console, then obtain the database's connection details.
Platform CLI: inspect the current command help before mutation. The Platform commands ship in the Prisma 8 CLI (
prisma8, also published as@prisma/cli); thepostgresgroup of a Prisma 7prismabinary only links an existing database. Start withnpx -y @prisma/cli@latest postgres --help; discover list, create, and connection commands from that version.MCP: discover available tools and their input schemas. Confirm the workspace and resource context before invoking a provisioning tool. Missing tools or authentication are blockers, not permission to switch accounts.
Management API: use the current schema at
https://api.prisma.io/v1, or installed SDK types, for exact endpoints and payloads. Do not copy an older project/database response shape blindly.
List available regions and select one consistent with the user's location requirements and application. Resolve the intended workspace, project, and, where required, branch before creating a database. Follow pagination when listing resources. If creation is asynchronous, poll the returned resource until ready with a bounded wait; report a timeout without creating a replacement. Before retrying an ambiguous creation request, check whether it succeeded to avoid duplicates.
Store returned connection credentials immediately in the intended secret environment. Some credentials are shown only once. Select the direct or pooled endpoint appropriate to the chosen driver and runtime; inspect the returned connection details instead of assuming every endpoint is interchangeable.
Authentication and errors
For server-to-server API access, use a workspace service token from the user's secret environment. If one is needed, direct the user to Workspace Settings → Service Tokens in Console and have them store it locally or in their secret manager. Use the bearer token without logging it. For an integration acting on behalf of users, use OAuth instead; see operations.
| Failure | Response |
|---|---|
| Authentication or permission denied | Explain which authentication or access is missing. |
| Resource not found | Verify the resource ID and workspace; do not create a replacement automatically. |
| Invalid request | Check the current schema and selected region. |
| Rate limit or transient read failure | Retry with bounded backoff, honoring retry guidance. |
| Quota exhausted | Report the limit and available options. |
Temporary databases with create-db
Use create-db when the user needs a working database now and has no connection or Prisma account. By default, the database is available for 24 hours and is automatically deleted if unclaimed. Claim it through the returned claim URL before its expiry to keep it; claiming requires a Prisma account. Use the returned expiry as the deadline if a different lifetime was selected. See the documented lifecycle.
Inspect the current commands when selecting a region or a non-default lifetime:
npx create-db@latest create --help
npx create-db@latest regions --helpChoose a supported region and lifetime. Store the connection string and claim URL privately, outside source code and shared logs. Then give the user the claim URL itself and the expiry from the returned lifecycle information: the database is deleted unless they open that URL and claim it. Do not promise persistence until claiming is complete. Avoid flags that print credentials into shared output.
For programmatic provisioning, the create-db package exposes create() and regions(). Check the installed types, handle success and error results, and store returned connection/claim information without logging it. See the create-db documentation.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- prisma
- Publisher
- Prisma (Official)
- Source
- prisma/skills · prisma-postgres-setup · commit 8ea289b
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by prisma or Prisma.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download prisma-postgres-setup.zip