prisma-composer-core-concepts

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

Updated Sep 12, 2026
One-click install
npx skills add https://github.com/praveens649/project-management-system --skill prisma-composer-core-concepts-praveens649
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-composer-core-concepts
Source: https://github.com/praveens649/project-management-system/tree/main/server/.agents/skills/prisma-composer-core-concepts
Command: npx skills add https://github.com/praveens649/project-management-system --skill prisma-composer-core-concepts-praveens649

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with Prisma Composer (@prisma/composer) requires understanding non-obvious architectural concepts—typed service declarations, port wiring, secret binding, migration replay, and deploy convergence—that cannot be discovered from code or CLI help output alone. ## Core Features & Use Cases - Architecture Guidance: Explains declarations (services, resources, modules), typed ports, contracts, RPC, and the two-channel input model (dependencies vs. schema-validated input with secrets). - Deploy & Migration Workflows: Covers the converge-based deploy model, stages, destroy semantics, replay-only migrations, and the alchemy engine underneath. - Testing & Troubleshooting: Details mockService and bootstrapService testing seams plus a failure-mode quick reference (effect version conflicts, 401 RPC responses, scale-to-zero connection drops). - Use Case: When deploying a Prisma Cloud app and hitting MIGRATION_PATH_NOT_FOUND or a 401 on an RPC endpoint, consult this Skill to diagnose whether the issue is a missing migration, an unwired caller, or a genuine deploy failure. ## Quick Start Ask 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 database dependency into a Prisma Composer service?

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

How do Prisma Composer migrations work before deploy?

Edit `contract.prisma`, run `prisma contract emit`, then `prisma migration plan --name <slug>` to author the migration, and commit `migrations/` before deploying. Deploys are replay-only and refuse with `MIGRATION_PATH_NOT_FOUND` if no authored path reaches the target contract.

Why does a deployed Prisma Composer RPC endpoint return 401?

Composer mints per-binding service keys at deploy, and `serve()` rejects any caller that is not a wired consumer with 401. 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, or `bootstrapService` from `@prisma/composer-prisma-cloud/testing` to boot the real built entry against a chosen config over real HTTP.

Why do prisma-composer commands fail with an effect version conflict?

The alchemy engine pins an exact `effect` version, and a hoisted different version from your app halts every command. Match your app's `effect` to Composer's pin or force it with package.json `overrides`, 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`.