prisma-composer-core-concepts

Explains Prisma Composer concepts for composing, deploying, and testing typed service applications.

Updated Sep 16, 2026
One-click install
npx skills add https://github.com/roswell23/TodoFlow --skill prisma-composer-core-concepts-roswell23
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-composer-core-concepts
Source: https://github.com/roswell23/TodoFlow/tree/main/server/.cursor/skills/prisma-composer-core-concepts
Command: npx skills add https://github.com/roswell23/TodoFlow --skill prisma-composer-core-concepts-roswell23

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Prisma Composer apps are built from typed declarations whose wiring, deploy, and testing rules cannot be inferred from code or CLI help output alone. This Skill supplies the conceptual model—declarations, ports, contracts, migrations, stages, and failure modes—needed to correctly build, deploy, and debug a Prisma Composer application. ## Core Features & Use Cases - Architecture guidance: Explains services, resources, modules, typed ports, and how the compiler verifies every wire before deploy. - Deploy and environment workflows: Covers converge-based deploys, stages, destroy semantics, the alchemy engine underneath, and local development with dev. - Testing and troubleshooting: Details mockService and bootstrapService testing seams plus a quick reference of common failure modes like MIGRATION_PATH_NOT_FOUND and effect version conflicts. - Use Case: When deploying a Prisma Cloud app with @prisma/composer, use this Skill to correctly wire a postgres database dependency, author migrations with prisma migration plan, and diagnose why a deployed /rpc/<method> returns 401 to unwired callers. ## Quick Start Ask the AI to explain how to wire a Postgres database dependency into a Prisma Composer service and deploy it to a new stage.

Frequently Asked Questions about prisma-composer-core-concepts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I wire a Postgres database into a Prisma Composer service?

Declare the dependency with `deps: { db: rawPostgres() }` or `postgres(dataContract)` for a Prisma-ORM-typed client, then wire it at `provision()` in the module builder. The service reads the binding via `service.load()`, receiving `{ url }` or `{ url, client }` respectively.

How do Prisma Composer database migrations work?

Deploys are replay-only: edit `contract.prisma`, run `prisma contract emit`, then author the migration with `prisma migration plan --name <slug>` and commit `migrations/` before deploying. Skipping the plan step causes deploy to refuse with `MIGRATION_PATH_NOT_FOUND`.

Why does a deployed Prisma Composer RPC endpoint return 401?

Composer mints a distinct service key per consumer-to-provider binding at deploy, and `serve()` returns 401 to any unwired caller before the handler runs. This is expected behavior, not a broken deploy; debug through a wired consumer or locally where nothing is enforced.

How do I test a Prisma Composer service in isolation?

Use `mockService` from `@prisma/composer/testing` to substitute typed dependency doubles and input values, wiring the substitution with your runner's module mock. For real boot-path tests, use `bootstrapService` from `@prisma/composer-prisma-cloud/testing` and drive it over real HTTP.

Why does every prisma-composer command fail with an effect version conflict?

The alchemy engine pins an exact `effect` version, and a hoisted different version from your app or a dependency halts every command. Match your app's `effect` to Composer's pin or force it with `overrides` in package.json, then reinstall.

What are the limitations of Prisma Composer contracts?

RPC over HTTP is the only contract kind; there is no gRPC, WebSocket, or streaming support, and no in-memory bindings without HTTP. The CLI also has no interactive login, authenticating deploys only via a static `PRISMA_SERVICE_TOKEN`.