agentleFS
jgamaraalvjgamaraalv/delivery-loop/.claude/skills/prisma-postgres/SKILL.md

prisma-postgres

Skill0 starsChanged 4 months agoMITView on GitHub

Prisma Postgres setup and operations — Console, create-db CLI, Management API, and the TypeScript SDK. Use when provisioning Prisma Postgres databases, linking a local project, or integrating programmatic provisioning with service tokens or OAuth.

  • Reads credentials
  • Installs packages

10 other projects use a version of this, 9 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use prisma-mongodb-upgrade, prisma-driver-adapter-implementation and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • prismaSkill

    prisma-mongodb-upgrade

    Decision and migration guide for Prisma ORM MongoDB projects on v6, which have no upgrade path to v7. Use when a MongoDB project asks about upgrading Prisma, when "upgrade to prisma 7" comes up in a project with provider = "mongodb", or when evaluating a move to Prisma 8. Triggers on "upgrade prisma mongodb", "prisma 7 mongodb", "mongodb prisma migration", "prisma 8 mongodb".

    Also in 5 projects that use this

  • adrianhajdinSkill

    prisma-driver-adapter-implementation

    Required reference for Prisma v7 driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter/Transaction interfaces. Contains critical contract details not inferable from code examples — including the transaction lifecycle protocol, error mapping requirements, and verification checklist. Existing implementations do not replace this skill.

    Also in 7 projects that use this

  • adrianhajdinSkill

    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".

    Also in 6 projects that use this

  • prismaSkill

    prisma-compute

    Deploy and operate apps on Prisma Compute with the Prisma 8 CLI. Use whenever the user mentions Prisma Compute, deploying or hosting a Prisma app, `prisma deploy`, `prisma dev module.ts`, Prisma Composer apps (`module.ts`, `compute()`, the `composer` section of `prisma.config.ts`), preview stages, deploy on push (`prisma git connect`, `prisma/cloud-deploy-action`), `prisma service` logs, versions, rollback, or custom domains, `project env`, `PRISMA_SERVICE_TOKEN`, regions, 504s, sleeping instances, or `waitUntil`; also when a project still uses the removed `@prisma/cli app deploy`, `prisma.compute.ts`, `defineComputeConfig`, `compute:deploy`, or `build logs` surface.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 4 are common, 1 is distinctive, and 3 are very specific to this project.

  • 4

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Use Prisma Console for manual setup and operations:

    line 14
  2. Common:

    Create/select workspace and project

    line 17
  3. Common:

    Use Studio in the project sidebar to view/edit data

    line 18
  4. Very specific:

    Use create-db when you need a database immediately:

    line 23
  5. Very specific:

    Use prisma postgres link when the database already exists and you want to wire a local project to it:

    line 42
  6. Common:

    Use API endpoints on:

    line 58
  7. Very specific:

    Use createManagementApiClient for existing tokens, or createManagementApiSdk for OAuth + token refresh.

    line 82
  8. Distinctive:

    Read a reference only when the task needs that depth:

    line 86

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prisma Postgres

Guidance for creating, managing, and integrating Prisma Postgres across interactive and programmatic workflows.

Core Workflows

1. Console-first workflow

Use Prisma Console for manual setup and operations:

  • Open https://console.prisma.io
  • Create/select workspace and project
  • Use Studio in the project sidebar to view/edit data
  • Retrieve direct connection details from the project UI

2. Quick provisioning with create-db

Use create-db when you need a database immediately:

npx create-db@latest

Aliases:

npx create-pg@latest
npx create-postgres@latest

For app integrations, you can also use the programmatic API (create() / regions()) from the create-db npm package.

Temporary databases auto-delete after ~24 hours unless claimed.

3. Link an existing local project

Use prisma postgres link when the database already exists and you want to wire a local project to it:

prisma postgres link

For CI or other non-interactive environments:

prisma postgres link --api-key "<your-api-key>" --database "db_..."

This flow updates your local .env with DATABASE_URL, then you can run prisma generate and prisma migrate dev.

4. Programmatic provisioning with Management API

Use API endpoints on:

https://api.prisma.io/v1

Explore the schema and endpoints using:

  • OpenAPI docs: https://api.prisma.io/v1/doc
  • Swagger Editor: https://api.prisma.io/v1/swagger-editor

Auth options:

  • Service token (workspace server-to-server)
  • OAuth 2.0 (act on behalf of users)

5. Type-safe integration with Management API SDK

Install and use:

npm install @prisma/management-api-sdk

Use createManagementApiClient for existing tokens, or createManagementApiSdk for OAuth + token refresh.

References

Read a reference only when the task needs that depth:

  • references/create-db-cli.md — instant databases and current CLI flags (--ttl, --copy, --quiet, --open) · read for fast setup.
  • references/management-api.md — service-token and OAuth API workflows · read for programmatic provisioning.
  • references/management-api-sdk.md — typed SDK usage with token storage · read when integrating from TypeScript/JavaScript.
  • references/console-and-connections.md — Console operations, prisma postgres link, direct TCP connections, serverless-driver choices.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.