prisma-cli

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

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/Rithika135/watchtower-360 --skill prisma-cli-rithika135
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/Rithika135/watchtower-360/tree/main/watchtower360-backend/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/Rithika135/watchtower-360 --skill prisma-cli-rithika135

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 project setup, schema migrations, client generation, and database management, including safe handling of destructive operations. ## 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. - 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 project, follow the init reference to create prisma.config.ts, run prisma migrate dev to create migrations, then run prisma generate and prisma db seed explicitly. ## Quick Start Ask the assistant to show how to create and apply a named Prisma migration 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?

Run prisma migrate dev --name your_migration_name during development to create and apply a migration. 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 and rollback capability, suited for team development.

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

How do I seed the database after running Prisma migrations?

Configure a seed command in prisma.config.ts under migrations.seed, such as tsx prisma/seed.ts, then run prisma db seed explicitly. Current Prisma versions do not run seeds automatically after migrate dev or migrate reset.