prisma-cli

Reference Prisma ORM CLI commands for migrations, client generation, and database workflows.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/AlvaroCG123/BancoAtividade --skill prisma-cli-alvarocg123
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/AlvaroCG123/BancoAtividade/tree/main/AtividadeBanco/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/AlvaroCG123/BancoAtividade --skill prisma-cli-alvarocg123

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM need accurate, current guidance on CLI commands like init, generate, migrate, and db push, including correct flags, configuration via prisma.config.ts, and safe handling of destructive operations. ## Core Features & Use Cases - Command Reference: Covers the full Prisma ORM CLI surface including init, generate, migrate dev/deploy/reset/status/diff/resolve, db pull/push/seed/execute, dev, studio, validate, format, debug, complete, and mcp. - AI Safety Checkpoint: Documents the consent workflow required before destructive commands like migrate reset or db push --force-reset when an AI agent is detected. - Use Case: When setting up a new project, follow the init reference to scaffold prisma.config.ts, run prisma dev for a local Postgres database, apply schema changes with migrate dev, and generate the client explicitly. ## Quick Start Ask the assistant to show how to create and apply a named Prisma migration and then regenerate the Prisma Client.

Frequently Asked Questions about prisma-cli

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

FAQPage Schema
How do I create and apply a Prisma migration in development?▼

Run prisma migrate dev with an optional --name flag to create and apply a migration from your schema changes. It uses a shadow database for drift detection, and you should run prisma generate explicitly afterward when you need refreshed client output.

What is the difference between prisma db push and prisma migrate dev?▼

db push syncs the schema directly without creating migration files or history, making it suited for prototyping and MongoDB. migrate dev creates tracked migration files with rollback capability and is the standard for team development workflows.

How do I run Prisma CLI with Bun?▼

Use bunx --bun before Prisma commands, such as bunx --bun prisma init or bunx --bun prisma generate. The --bun flag ensures Prisma runs with the Bun runtime instead of falling back to Node.js because of the CLI shebang.

Why is prisma migrate reset blocked when an AI agent runs it?▼

Prisma detects AI agent environments and blocks destructive commands like migrate reset and db push --force-reset until the user gives explicit consent. The agent must explain the data-loss impact, obtain consent immediately before running, and pass the exact consent text via PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION.

Does prisma migrate dev automatically run generate and seed?▼

No, in current Prisma versions you must run prisma generate and prisma db seed explicitly after migrate dev when you need refreshed client output or seed data. The seed script is configured in prisma.config.ts under the migrations section.

When should I use prisma migrate deploy instead of migrate dev?▼

Use migrate deploy in production, staging, and CI/CD pipelines because it only applies pending migrations without prompts, drift detection, or a shadow database. Never run migrate dev in production environments.