All skills
prisma avatar

/prisma-compute

@1123817 official
by prismaprisma/skills66 stars
7

Prisma Compute deployment and hosting guide. Use whenever the user mentions Prisma Compute, `prisma.compute.ts`, `defineComputeConfig`, deploying or hosting a Prisma app, `@prisma/cli app deploy`, `compute:deploy`, `create-prisma --deploy`, `PRISMA_SERVICE_TOKEN`, Compute auth/workspaces, apps/deployments/build logs/domains, localhost vs `0.0.0.0`, deploy port binding, or framework deploy readiness for Hono, Elysia, Next.js, TanStack Start, Astro, Nuxt, Svelte, Nest, Turborepo, or custom/prebuilt artifacts.

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

This session only. Nothing lands on disk.

referencescreate-prisma.md

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

create-prisma Compute Flow

Use this reference when creating a new app with Prisma and optionally deploying it to Prisma Compute.

Do not use create-prisma as the deploy path for an existing app. For existing projects, use the generated compute:deploy script when present, or call bunx @prisma/cli@latest app deploy directly.

Reference

Useful scaffold checks:

bunx create-prisma@latest --help
bunx create-prisma@latest --version

Use create-prisma@latest for new-project scaffolding.

Supported Templates

create-prisma@latest scaffolds hono, elysia, nest, next, svelte, astro, nuxt, tanstack-start, and turborepo.

Integrated --deploy support applies to hono, elysia, nest, next, astro, nuxt, tanstack-start, and turborepo. For turborepo, the generated config target is usually api.

The scaffold template name is nest, but the Compute deploy framework/config key is nestjs.

svelte is scaffold-only for Compute because @prisma/cli app deploy --framework has no svelte key.

Basic Commands

Interactive creation:

bunx create-prisma@latest

Non-interactive scaffold only:

bunx create-prisma@latest \
  --name my-api \
  --template hono \
  --provider postgresql \
  --no-install \
  --no-generate \
  --no-migrate-and-seed \
  --no-deploy

Create and deploy a supported template:

bunx create-prisma@latest \
  --name my-api \
  --template hono \
  --provider postgresql \
  --deploy

PostgreSQL and Database Behavior

With PostgreSQL, no explicit --database-url, and no --no-prisma-postgres, the Compute flow can create:

  • a Prisma Compute project
  • a main Prisma Postgres database on the main branch
  • a .env file containing DATABASE_URL
  • an initial Compute deployment with env vars loaded from .env

create-prisma is the new-project path. If the user needs a later preview branch deploy, use the generated compute:deploy script or @prisma/cli app deploy --branch <git-name> after the app exists. Keep branch names aligned across app deploy --branch, database create --branch, and project env ... --branch.

For unattended local tests, pass --no-prisma-postgres unless you intentionally want provisioning:

bunx create-prisma@latest \
  --name smoke-app \
  --template hono \
  --provider postgresql \
  --no-prisma-postgres \
  --database-url "postgresql://USER:PASSWORD@HOST:PORT/DB" \
  --no-deploy

Do not deploy placeholder database URLs. If DATABASE_URL came from a placeholder default, omit it from deploy env and ask the user for a real production database.

Generated Deploy Script

When the deploy flow is selected, create-prisma can add:

{
  "scripts": {
    "compute:deploy": "bunx @prisma/cli@latest app deploy --prod --yes ..."
  }
}

Use the actual generated script from package.json; do not reconstruct it from memory. The script redeploys app code using generated flags and/or prisma.compute.ts. It does not create a new project, create a new database, run migrations, or seed data. If a scaffolded project does not have compute:deploy, use @prisma/cli app deploy directly.

Inspect the generated package.json, prisma.compute.ts, and README before editing deploy behavior.

Generated Files to Preserve

Preserve generated framework runtime files and prisma.compute.ts unless you are intentionally changing the deploy target. For framework-specific deploy/runtime details, read frameworks.md.

All Prisma 7 scaffolds:

  • use prisma.config.ts
  • load dotenv/config where the runtime supports it
  • generate Prisma Client into a template-local path such as src/generated/prisma
  • use @prisma/adapter-pg with a DATABASE_URL connection string for PostgreSQL

Addon Notes

create-prisma supports --skills, --mcp, and --extension. Those are separate from Compute deployment. Do not imply that enabling skills or MCP deploys the app.

Failure Handling

If --deploy is explicit and setup cannot authenticate, cannot run the Platform CLI, or cannot complete the integrated deploy, report that deploy failed and keep the scaffolded project. Do not delete the user's files.

Source: SKILL.md on GitHub

No alerts23d3 checks · Risk SAFE
  • Gen Agent Trust Hub23d

    This skill provides comprehensive instructions for deploying applications to Prisma Compute using official Prisma tools. It covers project scaffolding, deployment configuration, and infrastructure management. All external resources, packages, and commands identified are official components of the Prisma ecosystem, and the skill includes explicit safety guidelines for handling credentials and sensitive information.

  • Socket23d

    No alerts

  • Snyk23d

    Risk: LOW · No issues

Signed by skilld at 1123817. 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 weeks ago
metadata
{
  "author": "prisma",
  "version": "1.5.1"
}

README badge

README badge for prisma/skills/prisma-compute

Guides agents through deploying TypeScript apps to Prisma Compute using the `@prisma/cli app deploy` command or `create-prisma` scaffolding. Covers framework-specific readiness (Next.js, Hono, Elysia, Astro, Nuxt, etc.), host/port binding, environment variables, branch deployments, and troubleshooting of the Compute CLI surface.

Generated from the current SKILL.md.

Does this skill cover deploying existing apps or only new scaffolds?
Both. It covers deploying existing TypeScript apps using the generated `compute:deploy` script or `@prisma/cli app deploy`, and scaffolding new apps with `create-prisma --deploy`. Prefer the generated script if your project already has one.
What frameworks does Prisma Compute support?
Current CLI deploy support includes Next.js, Hono, TanStack Start, and Bun. The skill covers deploy readiness checks for Elysia, Astro, Nuxt, Svelte, Nest, and Turborepo, but verify current CLI help output before deploying any framework.
Do I need to use `@prisma/cli` or the old Prisma CLI for Compute?
Use `@prisma/cli@latest` for Compute app deployment unless your help output shows the command has moved. Always verify current CLI help before assuming package names or flags.
What do I need to fix if my server won't accept connections after deploying?
Ensure your app binds to all interfaces (`0.0.0.0` or the framework equivalent) and reads the `PORT` environment variable, not hardcoded `localhost` or `127.0.0.1`. Loopback-only listeners appear ready locally but fail in production.
How do I deploy without interactive browser auth?
Use a stored CLI login or set `PRISMA_SERVICE_TOKEN` in your environment. Run with `--json --no-interactive` for agent-readable output. Never print the token.

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