prisma-cli

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

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/Sahil-Showket/ShopSphere --skill prisma-cli-sahil-showket
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/Sahil-Showket/ShopSphere/tree/main/services/product-service/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/Sahil-Showket/ShopSphere --skill prisma-cli-sahil-showket

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 for project setup, schema migrations, client generation, and database management, and this Skill provides a structured command reference that prevents misuse of destructive operations and outdated workflows. ## Core Features & Use Cases - Command Reference: Covers the full Prisma ORM CLI surface including init, generate, migrate, db push/pull/seed/execute, dev, studio, validate, format, debug, complete, and mcp. - 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 microservice database, use this Skill to initialize Prisma with the correct datasource provider, create and apply migrations with migrate dev, generate the client, and seed data following the current explicit-command workflow. ## Quick Start Ask the assistant to show how to create and apply a new Prisma migration named add_users_table and then generate the 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 --name your_migration_name to create and apply a migration from 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 correct choice for team development and production-bound changes.

Does Prisma CLI work with Bun runtime?▼

Yes, but you must add the --bun flag so Prisma runs with the Bun runtime instead of falling back to Node.js due to the CLI shebang. Use bunx --bun prisma init and bunx --bun prisma generate.

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 obtain consent immediately before running the command.

How do I apply Prisma migrations in production?▼

Use prisma migrate deploy, which applies pending migrations without prompts or shadow databases and is safe for CI/CD pipelines. Never use migrate dev in production, and check prisma migrate status first to verify pending migrations.

When should I not use prisma db push?▼

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