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.

referencescli-command-map.md

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

cli-command-map

The Prisma 8 CLI commands an agent uses to deploy and operate a Compute app, with the flags, output, and targeting rules that matter.

Priority

CRITICAL

Why It Matters

Agents trained on the earlier Compute CLI reach for @prisma/cli app deploy, build logs, and database ..., which no longer exist. The current CLI also refuses to guess: it needs explicit targets, exact consent tokens for destructive actions, and the Prisma 8 binary.

Verified with prisma 8.0.0-rc.21 and @prisma/cli 8.0.0-rc.21 (same commands; the @prisma/cli binary is named prisma-cli).

Which Binary Runs

Situation Run
Composer app with prisma 8.x in devDependencies npx prisma <command> (or bunx prisma, pnpm exec prisma)
No local prisma, or a Prisma 6/7 project npx @prisma/cli@latest <command>

A Prisma 6 or 7 prisma binary has no auth, project, service, branch, git, or deploy commands. In Prisma 7, dev starts a local Prisma Postgres server and postgres only links an existing database. npx prisma --version prints the version; in a non-terminal it prints a JSON envelope with result.version.

Commands

Command Subcommands and flags Notes
auth login, logout, whoami, workspace list, workspace use [id-or-name], workspace logout <id-or-name> login opens a browser. logout ends every stored session
project list, show [id-or-name], create <name> [--region], link [id-or-name], rename <name>, delete <id-or-name>, transfer <id-or-name> create and link write .prisma/local.json and gitignore it
project env add [KEY=VALUE|KEY], update, list, delete <key>; scope with --role production|preview or --branch <git-name>; --file <dotenv> for add/update Values are write-only
postgres list, show, create <name> [--region] [--branch], usage, delete, backup list|restore, connection list|create|rotate|delete Connection URLs print once
bucket list, create [--name] [--branch], delete <bucket-id>, key list|create|delete Keys print once
branch list No create or delete
git connect [git-url], disconnect connect needs an interactive terminal
service list, create <name> [--region] [--branch], show <service>, open <service>, logs <service>, delete <service> --project, --branch on each
service version list <service>, show <id>, promote <id>, rollback <service> [--to <id>], start <id>, stop <id>, delete <id> Version ids look like cpv_...
service domain add, show, wait [--timeout], retry, delete, each <hostname> --service <service> Production branch only
deploy <entry> --name, --stage, --report <path>, --build-id <id> Composer app; does not build
dev <entry> --name, --fresh Composer app, local, no credentials
init --skills <agents>, --postinstall/--no-postinstall Local only; never edits an existing prisma.config.ts
skills sync [--disable|--enable], list Copies package-shipped skills
feedback <message> --email <address> Anonymous unless --email

contract, db, migration, orm, lsp, and telemetry belong to Prisma ORM and the CLI itself; they are outside this skill. There is no destroy, log, app, build, database, agent, or compute command.

Global Flags

Every command accepts these:

  • --json (same as --format json), or --format human|json|markdown
  • --interactive / --no-interactive
  • --yes: accept prompt defaults; it cannot grant consent
  • --confirm <token>: grant one consent prompt; repeat for several
  • --config <path>: read another config file instead of ./prisma.config.ts
  • --log-level error|warn|info|verbose, -v, -q, --color/--no-color

When stdout is not a terminal the CLI already writes JSON; pass --json anyway so the intent is explicit. When CI is set (and not false), prompts are off.

JSON Output

Each command prints one envelope:

{"kind":"result","envelope":{"ok":false,"commandId":"","error":{"code":"CLI.UNKNOWN_COMMAND","summary":"No command registered for `app`","nextActions":[{"kind":"run-command","command":"prisma --help"}]},"nextActions":[]}}

On success, envelope.ok is true and envelope.result holds the data. On failure, branch on envelope.error.code; codes are a stable contract and messages are not. Codes you will meet:

Code Meaning
CLI.UNKNOWN_COMMAND The command does not exist in this CLI version
CLI.INVALID_ARGUMENTS Unknown flag or bad argument
CLI.CONSENT_REQUIRED A destructive action needs --confirm <token>
CLI.INTERACTION_REQUIRED The command needs an interactive terminal (git connect, auth login)
CLI.CREDENTIALS_REQUIRED No stored session and no PRISMA_SERVICE_TOKEN
PROJECT.SETUP_REQUIRED No --project and no .prisma/local.json link
SERVICE.TARGET_REQUIRED The service argument is missing
SERVICE.NO_PREVIOUS_VERSION rollback without --to found nothing to roll back to
CLI.CONFIG_UNREADABLE prisma.config.ts failed to evaluate (often an effect version conflict)

deploy --json also emits step events and ends with envelope.result.summary.nodes[].entities[], where each entity has kind (compute-service, postgres-database), id, and, for services, url.

Targeting

  • Project: --project <id-or-name>, else the .prisma/local.json link, else PROJECT.SETUP_REQUIRED. Only project create and project link write the link; deploy does not.
  • Branch: --branch <git-name>. Without it, commands target the project's default branch, which is production. The current Git branch is not consulted.
  • Service: the first positional argument. There is no picker and no environment fallback.
  • Version: version ids are globally unique, so service version show|promote|start|stop|delete <id> need no other scope.

Environment variables the CLI reads for the Platform: PRISMA_SERVICE_TOKEN (overrides stored sessions; a set-but-empty value is an error), PRISMA_WORKSPACE_ID (the workspace for a service token), PRISMA_REGION (region for a project the first deploy creates), and PRISMA_COMPOSER_REPORT_FILE (same as --report). PRISMA_SKILLS_CHECK=0 silences the out-of-date skills notice. It does not read PRISMA_PROJECT_ID, PRISMA_APP_ID, or PRISMA_SERVICE_ID.

Consent Tokens

These commands stop at a consent prompt. In a non-interactive run, pass the token with --confirm; --yes fails with CLI.CONSENT_REQUIRED.

Command Token
project delete <project> Project id
project transfer <project> Project id
postgres delete <database> Database id
postgres backup restore <database> --backup <id> Target database id
postgres connection rotate <connection-id> Connection id
postgres connection delete <connection-id> Connection id
bucket delete <bucket-id> Bucket id
service delete <service> Service name
service version delete <version-id> Version id
service version rollback <service> --to <version-id> Target version id
service domain delete <hostname> Hostname
npx prisma service version rollback api --project my-app --to cpv_123 --confirm cpv_123 --json

Run a consent-gated command only when the user asked for that specific action.

Bad

bunx @prisma/cli@latest app deploy --prod --yes --env .env
npx prisma service delete api --yes

app deploy fails with CLI.UNKNOWN_COMMAND, and --yes cannot answer the consent prompt for service delete.

Good

npm run build
npx prisma deploy module.ts --stage feat-search --json
npx prisma service delete api --branch feat-search --confirm api --json

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.