Index of every page on this site: llms.txt
All skills
prisma avatar

/prisma-compute

@a6f1929 official
by prismaprisma/skills80 stars
8
Run it yourself

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.

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

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesapp-framework-builds.md

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

app-framework-builds

Each framework deploys through a build adapter in its service.ts that points at the output your own build produced.

Priority

CRITICAL

Why It Matters

Neither prisma deploy nor the deploy action detects a framework or runs a build. The service declaration names the built output, and a mismatch between it and what the build writes fails at assemble time or at boot. There are no framework keys any more (--framework nextjs and similar belonged to the removed CLI).

Adapters

Adapter Import Use for
node({ module: import.meta.url, entry }) @prisma/composer/node One self-contained ESM file with every dependency inlined except runtime built-ins (bun, bun:*, node:*)
node({ module: import.meta.url, dir, entry }) @prisma/composer/node A built directory copied as-is; entry is a file inside dir
nextjs({ module: import.meta.url, appDir }) @prisma/composer/nextjs A Next.js app built with output: "standalone"; add nextjsBuild() to the composer extensions
dependencies: "external" on either node() form @prisma/composer/node A build that leaves packages as imports. The deploy traces entry and stages the installed packages it imports, which can take minutes. Composer 0.29.0 and later

Paths are relative to the service module. With the default dependencies: "bundled", the deploy copies only what the build produced and never ships the project's node_modules, for a single file and for a dir build alike, so a package left as an import fails at boot with Cannot find package. Bundle it, or set dependencies: "external". A dir tree must contain no symlinks and entry must not leave dir. Two services in one package need two separate builds, one per entry.

Per Framework

The shapes create-prisma 0.14.1 generates, with service.ts at the project root:

Framework Build script build: in service.ts Requirements
Hono, Elysia, NestJS, plain server Bundle to one file (bun build src/index.ts --target=bun --outfile dist/server.mjs, or tsdown bundling every non-built-in dependency) node({ module: import.meta.url, entry: "./dist/server.mjs" }) The entry starts the HTTP server itself
Next.js next build nextjs({ module: import.meta.url, appDir: "." }) output: "standalone" in next.config.*; nextjsBuild() in prisma.config.ts
Nuxt nuxt build node({ module: import.meta.url, dir: "./.output", entry: "server/index.mjs" }) Default Nitro Node server preset
TanStack Start vite build node({ module: import.meta.url, dir: "./.output", entry: "server/index.mjs" }) nitro() from nitro/vite in the Vite plugins
Astro astro build node({ module: import.meta.url, dir: "./dist", entry: "server/entry.mjs", dependencies: "external" }) output: "server", adapter: node({ mode: "standalone" }) from @astrojs/node. The adapter leaves packages as imports, so Composer 0.29.0 and later need dependencies: "external"; create-prisma 0.14.x pins Composer 0.28.0 and omits it
SvelteKit vite build node({ module: import.meta.url, dir: "./build", entry: "index.js" }) @sveltejs/adapter-node, with ssr: { noExternal: true } in vite.config.ts so the build inlines packages; without it, add dependencies: "external"
Turborepo turbo run build node({ module: import.meta.url, entry: "./apps/server/dist/server.mjs" }) One compute() per deployable app

Verify the actual output path after a local build before writing entry or dir.

Host and Port

The runtime exports the reserved port as PORT and sets HOST to 0.0.0.0 when it is unset. Code you write reads service.port() and binds 0.0.0.0. Framework servers that read PORT themselves (Next.js standalone, Nitro, Astro's Node adapter, SvelteKit's Node adapter) work without changes. Never set HOST or HOSTNAME to localhost or 127.0.0.1 in deploy env.

// Elysia
app.listen({ port: service.port(), hostname: "0.0.0.0" });

// NestJS
await app.listen(service.port(), "0.0.0.0");

Next.js Pages That Read the Service

A page, route handler, or server action that calls service.load() or service.input() needs export const dynamic = "force-dynamic". The runtime environment does not exist at build time, and Next.js does not re-read it for prerendered routes.

Bad

build: node({ module: import.meta.url, entry: "./src/index.ts" }),

The entry is source, not a self-contained build. Imports from node_modules fail at boot.

Good

build: node({ module: import.meta.url, entry: "./dist/server.mjs" }),

with "build": "bun build src/index.ts --target=bun --outfile dist/server.mjs".

References

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts10d3 checks · Risk SAFE
  • Gen Agent Trust Hub11d

    The skill provides comprehensive instructions for deploying and managing applications on Prisma Compute using the Prisma 8 CLI. It follows security best practices, such as redacting environment variables before display and warning against sharing secrets. All external resources and tools originate from trusted Prisma domains and repositories.

  • Socket10d

    No alerts

  • Snyk11d

    Risk: LOW · No issues

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

Last checked against GitHub last week.

Activeupdated 2 weeks ago
metadata
{
  "author": "prisma",
  "version": "2.1.0"
}

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.