prisma-composer-core-concepts

Explains Prisma Composer concepts for declaring, wiring, testing, and deploying typed service graphs.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/hafisalrizal/aymartech-technical-test-solution --skill prisma-composer-core-concepts-hafisalrizal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-composer-core-concepts
Source: https://github.com/hafisalrizal/aymartech-technical-test-solution/tree/main/packages/backend/.cursor/skills/prisma-composer-core-concepts
Command: npx skills add https://github.com/hafisalrizal/aymartech-technical-test-solution --skill prisma-composer-core-concepts-hafisalrizal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with @prisma/composer involves non-obvious concepts—typed service declarations, provision-time wiring, secret channels, replay-only migrations, and alchemy-based deploy convergence—that cannot be discovered from code or CLI help output alone. ## Core Features & Use Cases - Conceptual Reference: Covers declarations (compute, module, rawPostgres), the two input channels (deps vs input schema), contracts and RPC with provisioned service keys and idempotency, and build rules for single-file ESM and Next.js standalone outputs. - Deploy & Migration Guidance: Explains converge-not-script deploys, stages as Prisma Cloud branches, destroy semantics, and the replay-only migration loop (contract emit, migration plan, commit, deploy). - Testing & Troubleshooting: Documents mockService and bootstrapService testing seams plus a failure-mode quick reference covering effect version conflicts, 401 RPC responses, scale-to-zero reconnects, and MIGRATION_PATH_NOT_FOUND. - Use Case: When a deploy fails with DEPLOY.ENGINE_FAILED or a wired RPC call returns 401, consult this Skill to diagnose whether the cause is wiring, build output, or expected platform behavior. ## Quick Start Explain how to wire a Postgres dependency and secret input into a Prisma Composer service and deploy it to a 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 dependencies between services in Prisma Composer?

Declare what a node needs with deps and what it offers with expose, then connect them in a Module builder via provision(). The compiler type-checks every wire, so mismatched producers or missing RPC handlers fail tsc before deploy.

How do Prisma Composer migrations work with postgres()?

Deploys are replay-only: edit contract.prisma, run prisma contract emit, then prisma migration plan to author the migration, commit migrations/, and deploy. Skipping the plan step causes MIGRATION_PATH_NOT_FOUND at deploy time.

Why does a deployed Prisma Composer RPC endpoint return 401?

Composer mints a per-binding service key 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 load() and input() with typed doubles, 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 newer effect from the app or a dependency halts every command. Match the app's effect to @prisma/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 PRISMA_SERVICE_TOKEN.