Prisma Migrate Guard for Openclaw

A pre-deployment health check tool for Prisma migrations that prevents broken database states in production.

daniellummis
v1.0.0
Mar 6, 2026
0
879
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install prisma-migrate-guard

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install prisma-migrate-guard using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Prisma Migrate Guard?

Prisma Migrate Guard is a specialized Openclaw Skills utility designed to act as a fail-fast mechanism in your CI/CD pipeline. It programmatically inspects the state of your Prisma migrations before any schema changes are actually applied, ensuring that your database is in a healthy, synchronized state.

By integrating this skill, developers can detect drift, failed migrations, and missing environment variables early in the deployment lifecycle. It provides a read-only safety layer that validates the integrity of the database schema without making any accidental modifications, making it a critical component for teams practicing continuous delivery with Openclaw Skills.

Prisma Migrate Guard Use Cases

  • Automated pre-deployment gating in CI/CD pipelines to block releases with migration drift.
  • Verifying database connectivity and schema health before running heavy migration scripts.
  • Catching failed migration history entries that require manual intervention before they cause downtime.
  • Standardizing migration health checks across multiple microservices or monorepos using Openclaw Skills.

How Prisma Migrate Guard Works

  1. Validates the presence of required runtime binaries including Bash, Node, and npx.
  2. Verifies the existence of the database connection string and the specific Prisma schema file path.
  3. Executes a read-only prisma migrate status command against the target database.
  4. Analyzes the command output for specific failure conditions like failed migrations or unapplied local files.
  5. Generates a concise PASS/FAIL report and exits with a non-zero code if blocking issues are detected.

Prisma Migrate Guard Setup

To use this Openclaw Skills entry, ensure your environment has Node.js and Bash installed. You can execute the guard script directly from your CLI:

bash scripts/check-prisma-migrate.sh

For custom project structures, you can configure explicit schema paths and database environment variable names:

PRISMA_SCHEMA_PATH=apps/api/prisma/schema.prisma \
PRISMA_MIGRATE_DB_URL_ENV=POSTGRES_PRISMA_URL \
bash scripts/check-prisma-migrate.sh

Prisma Migrate Guard Data Schema & Taxonomy

The skill utilizes environment variables for configuration and reports status through standard output. The following schema defines the input configuration:

Variable Description Default
PRISMA_SCHEMA_PATH File system path to the Prisma schema prisma/schema.prisma
PRISMA_MIGRATE_DB_URL_ENV The env var key used for DB connection DATABASE_URL
PRISMA_MIGRATE_GUARD_ALLOW_UNAPPLIED Toggle to warn instead of fail on unapplied migrations 0
PRISMA_MIGRATE_GUARD_ALLOW_DRIFT Toggle to warn instead of fail on schema drift 0

Prisma Migrate Guard Advanced Features

  • Customizable fail-fast logic allowing power users to toggle between strict failure and warning modes via environment flags.
  • Support for complex Monorepo architectures through explicit path overrides.
  • Native integration with CI/CD runners like GitHub Actions, GitLab CI, and Jenkins via standard exit codes.
  • Non-destructive execution logic that ensures database integrity is checked without applying pending changes.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins bashnodenpx
Github Stars: 0
forks: 0

Featured*