prisma-cli

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

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/dlptho356/TTTN --skill prisma-cli-dlptho356
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/dlptho356/TTTN/tree/main/DATN/backend/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/dlptho356/TTTN --skill prisma-cli-dlptho356

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, and this Skill provides that reference directly in context. ## Core Features & Use Cases - Command Reference: Covers the full Prisma CLI surface including init, generate, migrate, db push/pull/seed/execute, dev, studio, validate, format, debug, and mcp. - Migration Workflows: Detailed guidance on development migrations (migrate dev), production deployments (migrate deploy), drift detection, baselining, and recovery with migrate resolve. - Use Case: When setting up a new backend project, use this Skill to initialize Prisma with the correct datasource provider, configure prisma.config.ts, run your first migration, and generate the Prisma Client with the correct output paths. ## 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 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 afterward to refresh the 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 tracking history, making it ideal for prototyping and MongoDB. migrate dev creates versioned migration files with rollback capability and is the correct choice for team development and production-bound schemas.

How do I apply Prisma migrations in production or CI/CD?

Use prisma migrate deploy, which applies pending migrations without prompts, shadow databases, or drift detection. Run prisma migrate status first to verify state, and never use migrate dev in production environments.

Does Prisma CLI work with the Bun runtime?

Yes, but you must run commands with bunx --bun, for example bunx --bun prisma generate. Without the --bun flag, the CLI falls back to Node.js because of its shebang.

How do I fix a failed Prisma migration in production?

Resolve the underlying issue, then run prisma migrate resolve --rolled-back <migration_name> to mark it as failed, or --applied if it actually succeeded. After resolving, re-run prisma migrate deploy to continue.

When should I not use this Prisma CLI skill?

Do not use it for Prisma Compute app deployment tasks such as @prisma/cli app deploy, compute:deploy, or managing Compute apps, logs, and domains. Those scenarios belong to the separate prisma-compute skill.