prisma-migrate-safety

Validate Prisma migrations against a staging database before production deployment.

1|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/mattbutlerengineering/mattbutlerengineering --skill prisma-migrate-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-migrate-safety
Source: https://github.com/mattbutlerengineering/mattbutlerengineering/tree/main/services/users/.claude/skills/prisma-migrate-safety
Command: npx skills add https://github.com/mattbutlerengineering/mattbutlerengineering --skill prisma-migrate-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prisma migrations can fail in staging or production, or introduce unintended destructive changes; this Skill helps you validate and deploy migrations more safely for the users service.

Core Features & Use Cases

  • Staging validation before deploy: Uses a staging database to preview and catch issues early.
  • Migration integrity checks: Verifies migration status and scans migration SQL for potentially destructive operations unless explicitly marked as safe.
  • Rollback plan via pre-deploy tagging: Creates a git tag before deploying so you have a clear rollback point if anything goes wrong.

Use case example: You need to release a schema change to the users database and want to prevent accidental data loss or schema breakage during the production rollout.

Quick Start

Run the pre-flight checks, validate against the staging database using the preview deploy, and then deploy with a pre-created git rollback tag for the users service.

Frequently Asked Questions about prisma-migrate-safety

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

FAQPage Schema
How do I prevent destructive database changes when deploying Prisma migrations?

To prevent destructive changes during Prisma migrations, you can scan migration SQL for operations like DROP TABLE or DROP COLUMN and require them to be explicitly marked as safe before proceeding with the deployment.

How do I safely deploy Prisma migrations to production?

Safely deploy Prisma migrations by validating them against a staging database first, inspecting migration status, scanning SQL for destructive operations, and creating a git tag for rollback before running the production deploy command.

Does Prisma migration safety require a staging database preview?

Yes, staging validation is required. You must preview the deployment on a staging database to catch migration issues early and verify integrity checks before applying changes to the production environment.

How do I create a rollback plan for Prisma database migrations?

Create a rollback plan by generating a pre-deploy git tag before running the production database migration, providing a clear and predictable restoration point if the schema deployment fails or causes issues.

What is the best way to validate Prisma migration integrity before release?

The best way to validate Prisma migration integrity is to preview the release on a staging database, inspect the migration status, and scan the SQL files for potentially destructive operations prior to production rollout.

Why do Prisma migrations fail in production and how can I prevent it?

Prisma migrations fail in production due to unvalidated schema changes or destructive operations. Prevent this by running staging validation, checking migration status, and scanning SQL for destructive operations before deployment.