prisma-cli

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

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/nethangabrielb/tasks-app-practical-exam --skill prisma-cli-nethangabrielb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/nethangabrielb/tasks-app-practical-exam/tree/main/packages/database/.agents/skills/prisma-cli
Command: npx skills add https://github.com/nethangabrielb/tasks-app-practical-exam --skill prisma-cli-nethangabrielb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM need accurate, up-to-date guidance on CLI commands for schema migrations, client generation, and database operations, and this Skill provides a complete command reference with current Prisma 7 behavior and safety rules. ## Core Features & Use Cases - Command Reference: Covers init, generate, migrate, db push/pull/seed/execute, dev, studio, validate, format, debug, complete, and mcp with options and examples. - Migration Workflows: Distinguishes development workflows (migrate dev) from production deployments (migrate deploy) with drift detection and resolution guidance. - AI Safety Checkpoint: Enforces explicit user consent before destructive commands like migrate reset or db push --force-reset when an AI agent is detected. - Use Case: When setting up a new NestJS backend with PostgreSQL, use this Skill to initialize Prisma, create and apply migrations, generate the client, and seed the database with correct current-version commands. ## Quick Start Ask the assistant to show how to create and apply a new Prisma migration for a schema change in your project.

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?▼

Run prisma migrate dev --name your_migration_name during development to create and apply a migration from schema changes. For production, commit the migration files and run prisma migrate deploy, which applies pending migrations without prompts.

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

db push syncs the schema directly without creating migration files or tracking history, making it suited for prototyping and MongoDB. migrate dev creates versioned migration files with drift detection, which is required for team collaboration and production workflows.

Does prisma migrate dev automatically run generate and seed?▼

No. In current Prisma versions you must run prisma generate explicitly after migrate dev when you need refreshed client output, and run prisma db seed explicitly when you need seed data.

Why is prisma migrate reset blocked when run by an AI agent?▼

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 and pass the exact consent text via PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION.

How do I run Prisma CLI with Bun instead of Node.js?▼

Use bunx --bun before Prisma commands, such as bunx --bun prisma init or bunx --bun prisma generate. Without the --bun flag, the CLI falls back to Node.js because of its shebang.

When should I not use prisma db push?▼

Avoid db push in production, in team environments needing trackable changes, and whenever you need rollback capability. Use migrate dev and migrate deploy instead, since db push creates no migration history.