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
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/prisma/prisma-compute/downloadUnzip 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, insideprisma: 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:
| Removed | Use instead |
|---|---|
@prisma/cli app deploy, app build, app run | Your own build script, then npx prisma deploy module.ts; npx prisma dev module.ts to run locally |
prisma.compute.ts, prisma.compute.json, defineComputeConfig | module.ts, a service.ts per server declared with compute(), and the composer section of prisma.config.ts |
init writing a compute config | npx 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 script | npx 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 promote | No --stage deploys production; service version promote <version-id> |
app show, app open, app list-deploys, app show-deploy | service show <service>, service open <service>, service version list <service>, service version show <version-id> |
app logs | service logs <service> |
app rollback --to <id> --yes | service version rollback <service> --to <id> --confirm <id> |
app domain ... | service domain ... --service <service> |
app remove | Remove 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 remove | project env delete |
auth logout --workspace <id> | auth workspace logout <id> |
agent install, agent update, agent status | npx 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 deploySetting 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
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | CLI surface | CRITICAL | cli- |
| 2 | App declaration | CRITICAL | app- |
| 3 | Runtime | CRITICAL | runtime- |
| 4 | Deploy | HIGH | deploy- |
| 5 | Operations | HIGH | ops- |
| 6 | Debugging | HIGH | debug- |
| 7 | Automation | MEDIUM | automation- |
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 prismaruns that version's ORM CLI, which has noauth,project,service, ordeploy; Prisma 7'sdevstarts a local database instead. Checknpx prisma --version; outside a Prisma 8 project usenpx @prisma/cli@latest <command>.cli-help-first- Command groups areauth,project(withproject env),postgres,bucket,branch,git, andservice(withservice versionandservice domain), plusdeploy,dev,init,skills, andfeedback. Read--helpbefore using a flag.cli-json- Pass--json, and--no-interactivein scripts. Branch onerror.code(NAMESPACE.SUBCODE) and follownextActions; 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--brancha 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.--yescannot grant consent. Run them only when the user asked for that action.
2. App declaration (CRITICAL)
app-composer-required- A deployable app hasmodule.ts(default exportmodule(name, ...)), aservice.tsper server (compute({ name, deps, build })), and acomposersection inprisma.config.tswithprismaCloud(),nodeBuild()(plusnextjsBuild()for Next.js), andstate: 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. Adddependencies: "external"tonode()when the build leaves packages as imports. Seeapp-framework-builds.md.app-region- The first deploy creates the project and needs a region:prismaCloud({ region: "eu-central-1" })orPRISMA_REGION. The region cannot change later.app-databases-rawPostgres()(package root) delivers{ url };postgres(contract)from@prisma/composer-prisma-cloud/ormadds a typed client and applies committed migrations on deploy. Read both throughservice.load(), notprocess.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 onservice.port()(also exported asPORT, default 3000) and bind0.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'snode_modules, so the build must inline every dependency except runtime built-ins. A build that leaves packages as imports (tsc, Astro's Node adapter) setsdependencies: "external"onnode(), and the deploy stages the installed packages its entry imports.runtime-first-byte-60s- A request that sends no bytes for 60 seconds gets504 Gateway Time-outand is cancelled. Respond first, then continue underwaitUntilor from a queue.runtime-sleep- Idle instances are snapshotted and resumed. Timers and floating promises can stall.waitUntilandKeepAwakeGuardfrom@prisma/computekeep 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-deployanddevdo not build. Run the build, thennpx prisma deploy module.ts.deploy-dev-first-npx prisma dev module.tsruns 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 runsnpx prisma auth login(browser). In CI setPRISMA_SERVICE_TOKENandPRISMA_WORKSPACE_ID. Checknpx prisma auth whoami --json(envelope.result.authenticated,envelope.result.workspace) before deploying.deploy-link-after-deployfinds or creates the project by the root module name (or--name) and does not write.prisma/local.json. Runnpx prisma project link <app-name>afterwards, or pass--project, beforeservice,git, orproject envcommands.deploy-on-push- Deploy on push needs bothnpx prisma git connect(interactive) and a workflow runningprisma/cloud-deploy-action@v1. Connecting alone deploys nothing.deploy-verify-url- Take each service URL from the deploy output (--jsonresult or--report <path>) and request it.
5. Operations (HIGH)
ops-logs-service logs <service>reads the live version;--version-id <id>reads another,--followstreams. 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|deletewith--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, thenservice domain wait. Production branch only.ops-secrets-once-postgres create,postgres connection create|rotate, andbucket key createprint credentials once. Store them; never echo them.
6. Debugging (HIGH)
debug-error-code-first- Readerror.codeandnextActionsfrom--jsonoutput, orfailure.codefrom the--reportfile, before changing anything.debug-public-url- Test the printed public URL, notlocalhost. A deploy that converged but does not answer is usually host binding, the port, or a crash at boot; readservice logs.debug-report-cli-bugs- Report unresolvable CLI failures withnpx prisma feedback "<message>"without secrets.
7. Automation (MEDIUM)
automation-create-prisma-create-prismascaffolds a new Prisma 8 project that is already a Composer app. Its--jsonmode deploys unless--no-deployis passed.automation-control-api-@prisma/composer/controlexposesdeploy,destroy,dev, andlog. Teardown of a stage isdestroy; it reads onlyPRISMA_SERVICE_TOKENandPRISMA_WORKSPACE_ID.automation-rest-api- Use/v1/services,/v1/deployments/{deploymentId}/logs, and/v1/buildsfromhttps://api.prisma.io/v1/doc. Do not build new deploy tooling on@prisma/compute-sdk.
Preferred Workflow
Inspect
package.json(isprisma8.x a dev dependency, are@prisma/composerand@prisma/composer-prisma-cloudinstalled?),module.ts,prisma.config.ts, the build script, and leftovers from the removed flow (prisma.compute.ts,compute:deploy).Install what is missing and sync the package skills:
npm install @prisma/composer @prisma/composer-prisma-cloud npm install -D prisma npx prisma skills syncDeclare or port the app:
app-composer-setup.mdandapp-framework-builds.md.Build, run
npx prisma dev module.ts, and request each local URL it prints.Run
npx prisma auth whoami --json. Ifenvelope.result.authenticatedisfalse, ask the user to runnpx prisma auth login.Deploy a preview with
npm run build && npx prisma deploy module.ts --stage <name> --json, or production without--stageonce the user confirms. A new project needs a region.Request each printed URL, then
npx prisma project link <app-name>andnpx prisma service list --json(add--branch <stage>for a preview).Report the app name, stage, service ids, URLs, and database ids. Never report secret values.
Avoid
Do not run
@prisma/cli app ...,build logs, ordatabase ..., and do not createprisma.compute.ts.Do not run platform commands through a Prisma 6 or 7
prismabinary.Do not read the port or connection strings from
process.envin a Composer service.Do not expect
deployto build, to migrate arawPostgres()database, or to copy production data into a stage.Do not pass
--yesto destructive commands; it cannot grant consent.Do not run
auth loginorgit connectnon-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
cli-command-map.md: every verified command, global flags, JSON envelope, targeting, consent tokensapp-composer-setup.md: the minimum declaration, region, databases, config and secrets, porting fromprisma.compute.tsapp-framework-builds.md: build output andbuild:adapter per frameworkruntime-requirements.md: Bun, host and port, 60-second first byte, sleep, keep-awake, regionsdeploy-cli-and-ci.md:prisma deploy, stages, credentials, output, CI, teardowndeploy-on-push.md: GitHub connection and theprisma/cloud-deploy-actionworkflowops-services-and-config.md: services, versions, logs, domains, env vars, databases, bucketsdebug-deploy-failures.md: symptoms, causes, and fixesautomation-create-prisma.md: scaffolding a new Composer appautomation-rest-api.md: REST API paths, the control API, and the status of@prisma/compute-sdk
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
- ATTRIBUTION.mdAdded by AutoGineer858 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md16.0 KiB
- references/app-composer-setup.md8.0 KiB
- references/app-framework-builds.md4.9 KiB
- references/automation-create-prisma.md4.0 KiB
- references/automation-rest-api.md5.5 KiB
- references/cli-command-map.md8.0 KiB
- references/debug-deploy-failures.md9.3 KiB
- references/deploy-cli-and-ci.md6.8 KiB
- references/deploy-on-push.md4.6 KiB
- references/ops-services-and-config.md6.6 KiB
- references/runtime-requirements.md4.8 KiB
references/automation-rest-api.md
automation-rest-api
Programmatic access to Compute: the Management REST API, the Composer control API, and what became of @prisma/compute-sdk.
Priority
MEDIUM
Why It Matters
Deploys now go through Composer, so low-level deploy clients from the earlier flow create resources that no module.ts declares. Use the CLI or the control API to deploy, and the REST API to read state, stream logs, and integrate with other tools.
Choose the Surface
| Goal | Use |
|---|---|
| Deploy or tear down an app | prisma deploy, or deploy/destroy from @prisma/composer/control |
| Deploy from GitHub | prisma/cloud-deploy-action (deploy-on-push.md) |
| Read services, versions, builds, logs from your own tool | REST API |
| A coding agent with its own credential and approval policy | Agent enrollment (REST API) |
REST API
Base URL https://api.prisma.io/v1. The current OpenAPI document is at https://api.prisma.io/v1/doc; read it for exact payloads instead of copying shapes from memory. Authenticate with Authorization: Bearer <workspace service token> or an OAuth token. The Compute endpoints are marked experimental and can change.
| Resource | Paths |
|---|---|
| Projects | GET/POST /v1/projects, GET/PATCH/DELETE /v1/projects/{id} |
| Branches | GET/POST /v1/projects/{projectId}/branches (gitName filter), GET/PATCH/DELETE /v1/branches/{branchId} |
| Services | GET/POST /v1/services (filter by projectId, branchId, branchGitName), GET/PATCH/DELETE /v1/services/{serviceId} |
| Versions (deployments) | GET/POST /v1/services/{serviceId}/deployments, GET/DELETE /v1/deployments/{deploymentId}, POST /v1/deployments/{deploymentId}/start, POST /v1/deployments/{deploymentId}/stop |
| Promote and rollback | POST /v1/services/{serviceId}/promote, POST /v1/services/{serviceId}/rollback |
| Logs | GET /v1/deployments/{deploymentId}/logs |
| Builds | GET/POST /v1/builds (filter by projectId, branchId, state), GET/PATCH /v1/builds/{buildId} |
| Domains | GET/POST /v1/services/{serviceId}/domains, GET/DELETE /v1/domains/{domainId}, POST /v1/domains/{domainId}/retry |
| Environment variables | GET/POST /v1/environment-variables (filter by projectId, class, key, branchId), GET/PATCH/DELETE /v1/environment-variables/{envVarId} |
The /v1/apps paths (/v1/apps, /v1/apps/{appId}/deployments, /promote, /rollback, /domains) are deprecated. Use the /v1/services equivalents.
Logs
GET /v1/deployments/{deploymentId}/logs takes tail, from_start, or cursor. A plain GET returns newline-delimited JSON: type: "log" records, then a type: "terminal" record carrying the cursor for the next page. Send Upgrade: websocket to follow live; a live segment ends after 10 minutes with the same terminal record, so reconnect with the cursor.
Builds
A build record is what a deploy reports about itself: the deploy action and prisma deploy both write to it. GET /v1/builds/{buildId} returns its state, failingStep, errorMessage, externalLogUrl (for example the GitHub Actions run), and deployedUrl. There is no build log endpoint; the log lives at externalLogUrl or in the terminal that ran the deploy. prisma deploy --build-id <id> joins a build record your CI created with POST /v1/builds.
Secrets
Environment variable values are write-only: no endpoint returns them. Do not log tokens, connection URLs, or env values.
Control API
@prisma/composer/control runs the CLI's operations in-process and returns { ok: true, value } or { ok: false, failure } with a dotted failure.code:
import { deploy } from "@prisma/composer/control";
import prismaConfig from "./prisma.config.ts";
const result = await deploy({
entry: "module.ts",
config: { value: prismaConfig.composer, file: "prisma.config.ts" },
stage: "pr-42",
});
if (!result.ok) throw new Error(`${result.failure.code}: ${result.failure.message}`);Operations:
deploy,destroy,dev,log.configis required in 0.28.0.deployanddestroyread onlyPRISMA_SERVICE_TOKENandPRISMA_WORKSPACE_ID, never theauth loginsession. Without them they fail withenvironment variable PRISMA_WORKSPACE_ID is required.logtails a locally runningprisma devapp; it is not a platform log reader.The engine's own output still streams to stdio.
@prisma/compute-sdk
@prisma/compute-sdk 0.43.0 is still on npm, and the CLI uses it internally for service operations and log streaming. Its deploy() build strategies and defineComputeConfig belong to the removed flow: no CLI command reads prisma.compute.ts, and its app client calls the deprecated /v1/apps endpoints. Do not start new deploy automation on it, and remove it from projects that used it only for defineComputeConfig.
Bad
import { ComputeClient, PreBuilt } from "@prisma/compute-sdk";
await new ComputeClient(apiClient).deploy({
strategy: new PreBuilt({ appPath: "./dist", entrypoint: "index.js" }),
projectId: "proj_abc",
appName: "my-app",
});This creates an app outside any Composer declaration, through deprecated endpoints.
Good
Deploy with prisma deploy module.ts or the control API, and read the result back with GET /v1/services?projectId=... and GET /v1/deployments/{deploymentId}/logs.
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