backend-prisma-sync-module
Backend Sync Module Prisma
Objective
Synchronize exclusively the Prisma persistence structure of a monorepo module based on entities declared in modules/<modulo>.
This skill receives a module, analyzes classes that extend Entity<TState>, generates or updates the corresponding Prisma file in apps/backend/prisma/models/<modulo>.model.prisma, creates an incremental migration with the module name, runs the migration, and keeps the database aligned with the module's current state.
This skill should proceed only when the target module has been explicitly provided by the user or by the immediate task context.
Do not create DTOs, Prisma adapters, repositories, seeds, controllers, or use cases, unless the request explicitly asks for that outside this skill. Generated files and code must follow the language, conventions, and style already adopted by the project.
When to use
- When the request is to synchronize a module's entities with Prisma.
- When entities are created or changed in
modules/<modulo>and that needs to become schema and migration. - When it is necessary to review whether a module's Prisma schema is outdated relative to the domain.
- When incremental migrations focused on a single module are needed.