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.

referencesautomation-create-prisma.md

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

automation-create-prisma

create-prisma scaffolds a new Prisma 8 project that is already a Composer app, and can deploy it once.

Priority

MEDIUM

Why It Matters

create-prisma writes a working Composer app in one command, but only for new projects, and its --json mode deploys by default. Older versions generated prisma.compute.ts and a compute:deploy script; current versions generate module.ts, service.ts, and a composer section instead.

Verified with create-prisma 0.14.1.

Commands

npx create-prisma@latest --help
Flag Meaning
[project-name], --name Project directory and root module name
--template minimal, hono, elysia, nest, next, turborepo, svelte, astro, nuxt, tanstack-start
--provider postgres or mongo
--authoring psl or typescript for the data contract
--package-manager npm, pnpm, yarn, bun, deno
--deploy Build and deploy after scaffolding
--workspace Workspace id or name to deploy into
--skills Agents to install package skills for (claude,cursor,agents,devin), or none
--yes Accept defaults; does not deploy
--json One JSON result, non-interactive; deploys unless --no-deploy

When to deploy:

Invocation Deploys
--deploy Yes
--json without --no-deploy Yes
--yes without --deploy or --json No
Interactive Asks
--package-manager deno Never; no Composer files are generated

For an unattended scaffold with no deploy, pass both:

npx create-prisma@latest my-api --template hono --provider postgres --yes --json --no-deploy

What It Generates

  • module.ts provisioning one service named app. With --provider postgres, it also provisions postgres({ name: "database", contract, config: "./prisma.config.ts" }) from @prisma/composer-prisma-cloud/orm, so the deploy applies the generated migrations. With --provider mongo, it binds envSecret("MONGODB_URL") to the service input.
  • service.ts with the build adapter for the template; see app-framework-builds.md.
  • prisma.config.ts with orm, skills, and composer sections. The composer section uses prismaCloud({ region: "us-east-1" }); change the region before the first deploy if the app belongs elsewhere.
  • Scripts: composer:dev (prisma dev module.ts), composer:deploy (prisma deploy module.ts), dev:composer (build, then composer:dev), and deploy (build, then composer:deploy). The deploy script targets production; pass a stage with npx prisma deploy module.ts --stage <name> instead.
  • /.prisma-composer in .gitignore.

Deploy Flow

With deploy enabled, create-prisma runs prisma auth whoami, selects the workspace, checks that no project already has the app's name, runs the build script, and runs prisma deploy module.ts --report <tmp>. Without a session it signs in interactively in a terminal; in --json mode or without a TTY it stops with not_authenticated, keeps the scaffold, and tells the user to sign in and run the deploy script.

Rules

  • Do not run create-prisma inside an existing app to deploy it. Port the app (app-composer-setup.md) and use prisma deploy.
  • Use the scripts the scaffold actually wrote; read package.json rather than reconstructing them.
  • A scaffold's first deploy is production. Ask the user before using --deploy or --json without --no-deploy.

Bad

npx create-prisma@latest my-api --template hono --yes --json

This deploys to production without anyone deciding to.

Good

npx create-prisma@latest my-api --template hono --provider postgres --yes --json --no-deploy
cd my-api
npm run dev:composer

Verify locally, then deploy a stage with npm run build && npx prisma deploy module.ts --stage preview.

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.