Generated banner for Prisma Compute
Generated logo for Prisma Compute

Prisma Compute

PrismaOfficialCreated by prisma

  • Skill
  • Tool integration
  • Cloud and DevOps
  • MIT
  • Low risk

From the author

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.
— the description by prisma

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides the workflow for deploying and operating applications on Prisma Compute. It covers the transition from legacy configurations to the modern Prisma Composer architecture, which uses module-based service declarations. It guides users through building, deploying, and managing services, including handling environment variables, custom domains, and service lifecycle operations like rollbacks and logs.

What it does

  • Deploys TypeScript applications to Prisma Compute using the Prisma 8 CLI.
  • Configures service declarations using Prisma Composer modules.
  • Manages service lifecycles including promotion, rollback, and logging.
  • Handles environment variables, custom domains, and database connections.
  • Supports CI/CD integration via GitHub connection and deployment actions.
  • Assists in porting legacy projects from removed CLI commands to the current Composer flow.

When to use it

  • When deploying a new application or updating an existing one on Prisma Compute.
  • When migrating a project that uses legacy configuration files like prisma.compute.ts.
  • When setting up preview stages or configuring automated deployments on push.
  • When troubleshooting deployment failures, 504 errors, or service connectivity issues.
  • When managing operational tasks like viewing logs, promoting versions, or rolling back.

Advantages

  • Provides a unified workflow for modern Prisma 8 deployments.
  • Ensures adherence to current platform requirements and best practices.
  • Facilitates smooth migration from deprecated CLI surface areas.
  • Enables consistent management of preview and production environments.

Usage examples

“How do I deploy my app to Prisma Compute?”
The agent will guide you to build your application, ensure your module.ts and prisma.config.ts are correctly configured, and run npx prisma deploy module.ts.
“My deployment is failing with a 504 error, what should I do?”
The agent will help you check your service logs and verify that your application is correctly binding to 0.0.0.0 and responding within the 60-second first-byte limit.
“How do I rollback my service to a previous version?”
The agent will instruct you to use the service version rollback command with the specific service name and version ID to revert your deployment.
“I have a legacy prisma.compute.ts file, how do I update it?”
The agent will provide steps to port your configuration to the new module.ts and composer-based structure required by Prisma 8.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/prisma/prisma-compute/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip prisma-compute.zip -d .agents/skills

Documentation by prisma

Prisma Compute

Deploy TypeScript apps to Prisma Compute and operate them afterwards. Every deploy goes through a Prisma Composer app (a module.ts root module) and the Prisma 8 CLI, prisma.

Verified against prisma 8.0.0-rc.21 (published identically as @prisma/cli), @prisma/composer and @prisma/composer-prisma-cloud 0.28.0, @prisma/compute 0.1.0-beta.0, and create-prisma 0.14.1. Re-checked against prisma 8.0.0-rc.23, whose command surface matches rc.21, and Composer 0.30.0, which adds node()'s dependencies option (0.29.0) and narrows the supported Node.js versions. The CLI moves fast: run npx prisma <group> --help before using a flag this skill does not show.

Version-Matched Skills

The installed packages ship their own agent skills, matched to the installed version:

  • prisma-platform-core-concepts, inside prisma: projects, branches, services, versions, env vars, deploy on push.

  • prisma-composer-core-concepts, inside @prisma/composer: declaring services, modules, databases, and builds; dev, deploy, and teardown.

npx prisma skills sync copies them into the agent skill directories (.claude/skills, .cursor/skills, .agents/skills, .devin/skills), and npx prisma skills list shows what is installed. npx prisma init does the same and adds a postinstall hook that keeps them current. When those skills are installed, use them for API details. This skill covers the deploy and operations workflow and its pitfalls.

Removed Surface

The Compute CLI from before Composer is gone. Its commands fail with CLI.UNKNOWN_COMMAND (removed flags with CLI.INVALID_ARGUMENTS), its config files are not read, and its environment variables are ignored:

RemovedUse instead
@prisma/cli app deploy, app build, app runYour own build script, then npx prisma deploy module.ts; npx prisma dev module.ts to run locally
prisma.compute.ts, prisma.compute.json, defineComputeConfigmodule.ts, a service.ts per server declared with compute(), and the composer section of prisma.config.ts
init writing a compute confignpx prisma init now writes a prisma.config.ts with only a skills section, adds prisma as a dev dependency, and syncs skills. Add the composer section yourself
compute:deploy scriptnpx prisma deploy module.ts, or the deploy script current create-prisma generates
app deploy --branch <name>npx prisma deploy module.ts --stage <name>
app deploy --prod, --no-promote, app promoteNo --stage deploys production; service version promote <version-id>
app show, app open, app list-deploys, app show-deployservice show <service>, service open <service>, service version list <service>, service version show <version-id>
app logsservice logs <service>
app rollback --to <id> --yesservice version rollback <service> --to <id> --confirm <id>
app domain ...service domain ... --service <service>
app removeRemove the provision() from module.ts and deploy, or service delete <service> --confirm <service>
build logs <build-id>The GitHub Actions run log or the Console; GET /v1/builds/{buildId} for state and failing step
database ...postgres ...
project env removeproject env delete
auth logout --workspace <id>auth workspace logout <id>
agent install, agent update, agent statusnpx skills add prisma/skills --skill prisma-compute; npx prisma skills sync for package skills
PRISMA_PROJECT_ID, PRISMA_APP_ID, PRISMA_SERVICE_ID--project <id-or-name>, the service as a positional argument, and .prisma/local.json from project link
/v1/apps REST endpoints/v1/services (the /v1/apps paths are deprecated)

A repository with prisma.compute.ts or a compute:deploy script was set up for the removed flow. Port it to Composer (app-composer-setup.md) instead of running the old commands.

When to Apply

  • Deploying a new or existing app to Prisma Compute

  • Porting a project that uses prisma.compute.ts, compute:deploy, or @prisma/cli app deploy

  • Setting up preview stages, deploy on push, or CI deploys

  • Reading service logs, listing versions, promoting, or rolling back

  • Managing env vars, custom domains, Prisma Postgres databases, or buckets in a Compute project

  • Debugging a failed deploy, an unreachable service, a 504, or work that stops when an instance sleeps

Rule Categories by Priority

PriorityCategoryImpactPrefix
1CLI surfaceCRITICALcli-
2App declarationCRITICALapp-
3RuntimeCRITICALruntime-
4DeployHIGHdeploy-
5OperationsHIGHops-
6DebuggingHIGHdebug-
7AutomationMEDIUMautomation-

Quick Reference

1. CLI surface (CRITICAL)
  • cli-prisma-8-binary - Platform and deploy commands exist only in the Prisma 8 CLI. In a Prisma 6 or 7 project, npx prisma runs that version's ORM CLI, which has no auth, project, service, or deploy; Prisma 7's dev starts a local database instead. Check npx prisma --version; outside a Prisma 8 project use npx @prisma/cli@latest <command>.

  • cli-help-first - Command groups are auth, project (with project env), postgres, bucket, branch, git, and service (with service version and service domain), plus deploy, dev, init, skills, and feedback. Read --help before using a flag.

  • cli-json - Pass --json, and --no-interactive in scripts. Branch on error.code (NAMESPACE.SUBCODE) and follow nextActions; do not parse messages.

  • cli-explicit-targets - Name the service as the first argument, the project with --project (or link the directory), and a preview with --branch. Without --branch a command targets the production branch; the CLI does not read the current Git branch.

  • cli-consent-tokens - Destructive commands need --confirm <token> with an exact id, name, or hostname. --yes cannot grant consent. Run them only when the user asked for that action.

2. App declaration (CRITICAL)
  • app-composer-required - A deployable app has module.ts (default export module(name, ...)), a service.ts per server (compute({ name, deps, build })), and a composer section in prisma.config.ts with prismaCloud(), nodeBuild() (plus nextjsBuild() for Next.js), and state: prismaState().

  • app-build-adapter - node({ module: import.meta.url, entry }) for one self-contained bundle, node({ module, dir, entry }) for a built directory, nextjs({ module, appDir }) for Next.js standalone. Add dependencies: "external" to node() when the build leaves packages as imports. See app-framework-builds.md.

  • app-region - The first deploy creates the project and needs a region: prismaCloud({ region: "eu-central-1" }) or PRISMA_REGION. The region cannot change later.

  • app-databases - rawPostgres() (package root) delivers { url }; postgres(contract) from @prisma/composer-prisma-cloud/orm adds a typed client and applies committed migrations on deploy. Read both through service.load(), not process.env.DATABASE_URL.

  • app-names - Provision ids and service names allow [A-Za-z0-9] only, and the platform rejects ids shorter than three characters. The root module name becomes the project name.

3. Runtime (CRITICAL)
  • runtime-bind-all-interfaces - Listen on service.port() (also exported as PORT, default 3000) and bind 0.0.0.0. A loopback listener is unreachable.

  • runtime-bun - Services run on Bun. By default (dependencies: "bundled") a deploy ships only the build output, never the project's node_modules, so the build must inline every dependency except runtime built-ins. A build that leaves packages as imports (tsc, Astro's Node adapter) sets dependencies: "external" on node(), and the deploy stages the installed packages its entry imports.

  • runtime-first-byte-60s - A request that sends no bytes for 60 seconds gets 504 Gateway Time-out and is cancelled. Respond first, then continue under waitUntil or from a queue.

  • runtime-sleep - Idle instances are snapshotted and resumed. Timers and floating promises can stall. waitUntil and KeepAwakeGuard from @prisma/compute keep an instance awake on a best-effort basis; they do not make work durable.

  • runtime-no-websockets - WebSocket servers are not supported.

4. Deploy (HIGH)
  • deploy-build-first - deploy and dev do not build. Run the build, then npx prisma deploy module.ts.

  • deploy-dev-first - npx prisma dev module.ts runs the whole app locally with no credentials. Verify each local URL before deploying.

  • deploy-production-intent - A deploy without --stage, and a push to the default branch of a connected repository, change production. Get the user's go-ahead first; use --stage <name> for previews.

  • deploy-auth - On a workstation the user runs npx prisma auth login (browser). In CI set PRISMA_SERVICE_TOKEN and PRISMA_WORKSPACE_ID. Check npx prisma auth whoami --json (envelope.result.authenticated, envelope.result.workspace) before deploying.

  • deploy-link-after - deploy finds or creates the project by the root module name (or --name) and does not write .prisma/local.json. Run npx prisma project link <app-name> afterwards, or pass --project, before service, git, or project env commands.

  • deploy-on-push - Deploy on push needs both npx prisma git connect (interactive) and a workflow running prisma/cloud-deploy-action@v1. Connecting alone deploys nothing.

  • deploy-verify-url - Take each service URL from the deploy output (--json result or --report <path>) and request it.

5. Operations (HIGH)
  • ops-logs - service logs <service> reads the live version; --version-id <id> reads another, --follow streams. Build output lives in the CI log or the Console, not the CLI.

  • ops-versions - service version promote <version-id> rebuilds with production env vars. service version rollback <service> --to <id> --confirm <id> switches back without a rebuild.

  • ops-env-write-only - project env add|update|list|delete with --role production, --role preview, or --branch <name>. Values are never returned and apply on the next deploy.

  • ops-domains - service domain add <hostname> --service <service>, create the CNAME it reports, then service domain wait. Production branch only.

  • ops-secrets-once - postgres create, postgres connection create|rotate, and bucket key create print credentials once. Store them; never echo them.

6. Debugging (HIGH)
  • debug-error-code-first - Read error.code and nextActions from --json output, or failure.code from the --report file, before changing anything.

  • debug-public-url - Test the printed public URL, not localhost. A deploy that converged but does not answer is usually host binding, the port, or a crash at boot; read service logs.

  • debug-report-cli-bugs - Report unresolvable CLI failures with npx prisma feedback "<message>" without secrets.

7. Automation (MEDIUM)
  • automation-create-prisma - create-prisma scaffolds a new Prisma 8 project that is already a Composer app. Its --json mode deploys unless --no-deploy is passed.

  • automation-control-api - @prisma/composer/control exposes deploy, destroy, dev, and log. Teardown of a stage is destroy; it reads only PRISMA_SERVICE_TOKEN and PRISMA_WORKSPACE_ID.

  • automation-rest-api - Use /v1/services, /v1/deployments/{deploymentId}/logs, and /v1/builds from https://api.prisma.io/v1/doc. Do not build new deploy tooling on @prisma/compute-sdk.

Preferred Workflow

  1. Inspect package.json (is prisma 8.x a dev dependency, are @prisma/composer and @prisma/composer-prisma-cloud installed?), module.ts, prisma.config.ts, the build script, and leftovers from the removed flow (prisma.compute.ts, compute:deploy).

  2. Install what is missing and sync the package skills:

    npm install @prisma/composer @prisma/composer-prisma-cloud
    npm install -D prisma
    npx prisma skills sync
  3. Declare or port the app: app-composer-setup.md and app-framework-builds.md.

  4. Build, run npx prisma dev module.ts, and request each local URL it prints.

  5. Run npx prisma auth whoami --json. If envelope.result.authenticated is false, ask the user to run npx prisma auth login.

  6. Deploy a preview with npm run build && npx prisma deploy module.ts --stage <name> --json, or production without --stage once the user confirms. A new project needs a region.

  7. Request each printed URL, then npx prisma project link <app-name> and npx prisma service list --json (add --branch <stage> for a preview).

  8. Report the app name, stage, service ids, URLs, and database ids. Never report secret values.

Avoid

  • Do not run @prisma/cli app ..., build logs, or database ..., and do not create prisma.compute.ts.

  • Do not run platform commands through a Prisma 6 or 7 prisma binary.

  • Do not read the port or connection strings from process.env in a Composer service.

  • Do not expect deploy to build, to migrate a rawPostgres() database, or to copy production data into a stage.

  • Do not pass --yes to destructive commands; it cannot grant consent.

  • Do not run auth login or git connect non-interactively; both need a person at a browser.

  • Do not push to the default branch of a connected repository without the user's go-ahead; it deploys production.

References

Docs: Compute, Deploy your first app, Composer, CLI reference.

Feedback

npx prisma feedback "<message>" sends anonymous feedback to the CLI team with the CLI version, Node.js version, and OS platform. Add --email <address> for a reply. Never include tokens, connection URLs, or user data.

Files

references/debug-deploy-failures.md

debug-deploy-failures

Diagnose Compute failures from the error code first, then the symptom.

Priority

HIGH

Why It Matters

Most failures carry a structured code and a nextActions list that names the fix. Guessing from the message, or retrying commands from the removed CLI, wastes the user's time and can deploy into the wrong place.

First Checks

npx prisma --version
npx prisma auth whoami --json
npx prisma project show --json
ls module.ts prisma.config.ts
node --version
test -f .env && sed 's/=.*/=<redacted>/' .env

Re-run the failing command with --json (and --report deploy-report.json for deploy) and read error.code, error.why, and nextActions. Never print token or connection-string values.

CLI and Setup

SymptomCauseFix
CLI.UNKNOWN_COMMAND for app, build, database, agent, destroy, computeThe command was removedUse the replacement in the SKILL.md table
Unknown command "auth" or "deploy", or prisma dev starts a database serverA Prisma 6 or 7 prisma binaryInstall prisma 8.x as a dev dependency, or use npx @prisma/cli@latest
ERR_UNKNOWN_FILE_EXTENSIONNode.js too old to load module.ts. Composer supports 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newerUpgrade Node.js
CLI.CONFIG_UNREADABLE with a module error from effectAnother effect version hoisted over the one @prisma/composer pinsMatch the app's effect to @prisma/composer's dependencies.effect, or force it with overrides (npm), pnpm.overrides or pnpm-workspace.yaml overrides (pnpm), resolutions (Yarn); reinstall
CLI.CONFIG_SECTION_INVALID with CONFIG.SECTION_MISSINGNo composer section in prisma.config.tsAdd the section (app-composer-setup.md)
CONFIG.FILE_RETIRED or CONFIG.FIELD_RETIREDA prisma-composer.config.ts or configPath from an older ComposerMove extensions and state into the composer section and delete the old file
ASSEMBLE.EXTENSION_MISSINGA service uses nextjs() but nextjsBuild() is not in extensionsAdd nextjsBuild() from @prisma/composer/nextjs/control
COMPOSE.GRAPH_INVALID naming an idA provision id or service name with a hyphen or other non-alphanumeric characterUse [A-Za-z0-9] only; at least three characters for provision ids
Bun APIs fail while the CLI loads module.tsThe prisma bin runs under Nodebun node_modules/.bin/prisma deploy module.ts

Auth and Project

SymptomCauseFix
CLI.CREDENTIALS_REQUIREDNo session and no service tokenAsk the user to run npx prisma auth login; in CI set PRISMA_SERVICE_TOKEN and PRISMA_WORKSPACE_ID
Error about a blank PRISMA_SERVICE_TOKENThe variable is set but emptyUnset it or provide a token
Commands act in the wrong workspaceAnother stored session is current, or a service token overrides itauth workspace list --json, then auth workspace use <id>; unset PRISMA_SERVICE_TOKEN to use sessions
PROJECT.SETUP_REQUIRED after a successful deploydeploy does not link the directorynpx prisma project link <app-name> or pass --project
project "<name>" does not exist yet and no deploy region is configuredFirst deploy without a regionprismaCloud({ region }) or PRISMA_REGION
Deploy refuses an existing project name (HostedStateBootstrapError, or a project with this name already exists)A project with the module's name exists that this module did not createdeploy --name <unique-name>, or rename the module
Deploy fails immediately naming another holderAnother deploy of the same environment holds the state leaseWait for it; a crashed deploy's lease expires after about a minute

Deploy Pipeline

SymptomCauseFix
ASSEMBLE.BUILD_FAILEDThe built entry or directory is missing or invalid (no build, wrong path, symlinks in a dir build)Run the build and check that entry/dir match its output, relative to service.ts
ASSEMBLE.SERVICE_MISSINGThe module provisions no serviceProvision at least one compute() service
DEPLOY.STAGE_INVALIDThe stage is not a valid Git ref nameRename the stage
A connection input "declares param ..., but its producer ... did not supply it"An authored connection or extension does not supply a declared valueFix the producer's outputs; mark the param optional only if absent is valid
Deploy fails early naming a missing variableAn envParam/envSecret name is unset on the stage and in the shellExport it in the deploying shell or set it with project env add
MIGRATION_PATH_NOT_FOUNDA postgres(contract) schema change has no committed migrationprisma contract emit, prisma migration plan --name <slug>, commit migrations/
DEPLOY.ENGINE_FAILEDThe deploy engine or the platform rejected the generated stackRead the engine lines in the error; it names .prisma-composer/alchemy.run.ts and a command that reproduces the failure
DEPLOY.BUILD_REQUIRED from destroydestroy packages the built app tooBuild, then destroy

Deployed but Not Working

SymptomCauseFix
Public URL times out or returns 502 at onceListener on localhost, wrong port, or a crash at bootBind 0.0.0.0 on service.port(); read npx prisma service logs <service>
Cannot find package, Cannot find module, or ENOENT while resolving package in logsThe build left a package as an import, and the default dependencies: "bundled" ships only the build outputBundle every dependency (bun build --target=bun), or set dependencies: "external" on node() so the deploy stages the installed packages
502s in a loop after the app was idleA database client dies when idle connections closeSmall reconnect-friendly pool; log uncaughtException and unhandledRejection instead of exiting
504 Gateway Time-out with an openresty body after about 60 secondsThe handler sent nothing for 60 secondsRespond first, continue under waitUntil, or queue the work
Background work stops or never finishesThe instance sleptwaitUntil or KeepAwakeGuard from @prisma/compute; persist progress
401 from a deployed /rpc/<method>Composer's service-key check; only wired consumers may callTest through a consumer or locally; not a deploy failure
RUNTIME.TEMPORAL_UNAVAILABLE or a failure on the first timestamp readNo global Temporal on the runtimeImport a Temporal polyfill at the server entry, or use string column types
Next.js page shows build-time or missing values from service.load()The route was prerenderedexport const dynamic = "force-dynamic"
ECONNRESET calling another serviceThe callee was cold-startingRetry
A changed env var has no effectValues resolve at deploy timeRedeploy (or promote)
A resource disappeared after a deployIts provision() was removed from module.tsRestore the declaration and redeploy
A preview's database is emptyStages get their own empty databasesSeed it; production data is never copied

Deploy on Push

SymptomCauseFix
Push builds nothing, no errorNo workflow on the pushed branchAdd .github/workflows/prisma-deploy.yml (deploy-on-push.md)
Green run with skipped-no-credentialRepository not connected, no id-token: write, or a forknpx prisma git connect, add the permission
CLI.UNKNOWN_COMMAND inside the actionAction release v1.5.0 or olderUse prisma/cloud-deploy-action@v1 (v1.9.0 or later)
Install step fails on pnpm or YarnThe action auto-detects npm and Bun onlySet install-command

Custom Domains

npx prisma service domain show <hostname> --service <service> --json prints the state and the DNS record it expects. SERVICE.DOMAIN_DNS_NOT_CONFIGURED means the CNAME is not visible yet; create it, then run add again. After fixing DNS on a failed domain, run service domain retry. SERVICE.BRANCH_NOT_DEPLOYABLE means a preview branch was targeted; domains are production only.

Local Development

  • dev lists services from other apps: the emulators are shared machine-wide daemons. Ignore names not in your module.ts.

  • dev --fresh fails for an app with a database in this release. Follow the reset steps in Local development.

  • Windows is not supported for the local stack.

Report CLI Bugs

When a failure survives these checks or the CLI reports an internal error, send it to the CLI team without secrets:

npx prisma feedback "deploy failed with DEPLOY.UNEXPECTED: <first error line>"

Bad

Retrying bunx @prisma/cli@latest app deploy --prod --yes after CLI.UNKNOWN_COMMAND, or editing code before reading error.code.

Good

Re-run with --json --report deploy-report.json, read error.code or failure.code, apply the fix this table names, rebuild, and deploy again.

References

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-compute · 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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download prisma-compute.zip