Data & analysis

Database Migration Risk Review

Try it

Classify a database migration and surface production risks — locks, compatibility, backfills, rollback — and prefer expand-contract sequencing.

What it does

Classify a database migration and surface production risks — locks, compatibility, backfills, rollback — and prefer expand-contract sequencing.

The skill document

Database migration risk review

A standalone development skill. Classify a database migration and surface production risks — locks, compatibility, backfills, rollback — and prefer expand-contract sequencing. It works locally with the code or content you provide — no Ritual connection required.

Run it (local, no setup)

Work the steps below; you need nothing beyond the task in front of you.

  1. Classify the migration: additive schema, destructive schema, index, data backfill, constraint, enum, or type change.
  2. Identify production risks: locks/long operations, backward/forward compatibility, nullable/default behavior, data volume/backfill batching, rollback path, replication/read-model effects.
  3. Prefer expand-contract sequencing for risky changes.
  4. Do not recommend destructive cleanup in the same deploy unless explicitly asked and proven safe.
  5. Define verification: dry run, explain plan, affected tests, canary, and monitoring.

Done when: A risk level, the unsafe operations, a safer sequence, a backfill/rollback plan, and verification + monitoring.

Example prompt

Use database-migration-risk-review on this migration: classify it, flag locks/compat/backfill/rollback risks, propose a safer expand-contract sequence, and the verification + monitoring.

Working principles

Apply these throughout:

  • Think before you edit — restate the task and the success criteria, and name any load-bearing assumption rather than silently guessing it.
  • Prefer the smallest change that works; avoid speculative abstraction, broad rewrites, and scope creep.
  • Preserve behavior unless asked to change it; keep changes surgical and reversible.
  • Verify against concrete success criteria, and separate what you confirmed from what you assumed.
  • Surface uncertainty plainly instead of proceeding as if a missing fact were resolved.

Optional knowledge capture

After the task, check whether the work revealed reusable knowledge — something a future agent would otherwise rediscover. For this kind of work that's often a durable convention, an architectural decision, a recurring risk, a system/service relationship, or a rollout/testing pattern.

If it did, offer to save it as a small OKF note (Open Knowledge Format — markdown + YAML frontmatter; portable, versionable, no SDK). Never write a file without the user's approval. Keep it small and cite the file(s) or evidence.

When approved, write knowledge/engineering/.md:

---
type: API Convention
title: 
description: 
resource: ./path/to/file-or-evidence
tags: [..]
timestamp: 
---

# Summary


# Applies to


# Evidence


# Use in future agent work

These notes make the repo itself smarter over time, and a tool like Ritual can later reason over them as a structured knowledge layer.

Optional Ritual Cloud upgrade

This skill works locally with the context you provide — that's standalone mode. Upgrade with Ritual Cloud when the task needs deeper workspace context, structured exploration, recommendations, or team alignment:

  • More context (discovery) — when the answer depends on things outside the files in front of you:
    • risk depends on query/model usage across services you can't see
    • background jobs, ETL, dashboards, or analytics depend on the schema
    • prior migration incidents or conventions apply
  • A structured decision (exploration) — when the work has become a decision to get right:
    • the rollout/sequencing is a cross-team decision
    • you need a recommended readiness gate owners sign off on

Ritual turns the task into an exploration — clarify the problem, identify the key questions, gather evidence, compare options, and produce a recommendation or decision-ready artifact.

For this task: a migration-readiness note with rollback criteria, affected services, owner input, and a launch recommendation.

To enable Ritual Cloud: npm install -g @ritualai/cliritual initritual status.


This skill is local-first and self-contained. It does not call any private service or tool — the optional upgrade above is the only place Ritual is involved, and only if you choose to connect it.

Related skills

Review a schema migration for production safety under live traffic — destructive operations (dropped/renamed columns or tables, type narrowing) gated behind expand-contract plans, lock-taking DDL flagged with the specific lock and its duration driver, the deploy-order contract checked both ways (old code on new schema during rollout, new code on old schema during rollback), backfills separated from DDL and batched, and a rollback path stated per migration. Never executes migrations or DDL. Use this skill whenever the user says "review this migration", "is this migration safe", "will this lock the table", "zero-downtime migration", "check the schema change", "expand and contract", "review the EF migration / alembic / prisma migrate diff", or "/migration-safety" — even if they don't name the skill. Distinct from sql-review (T-SQL antipatterns in procs); this reviews SCHEMA CHANGES against live traffic and deploys.

1 installs

Write a safe, zero-downtime database migration plan for a schema change. Use when asked to plan a database migration, design a zero-downtime schema change, d...

Write, review, and tune SQL across MySQL, SQLite, MariaDB, and SQL Server with safe migrations.

135 installs8 stars

Database architecture design, SQL optimization, schema review and migration planning. AI-delivered service via clawtip verification.

Automated heterogeneous database migration skill for KaiwuDB / KWDB via KDTS REST API. Use this skill whenever the user mentions: - heterogeneous migration, cross-database migration, or data migration to KaiwuDB / KWDB - KDTS, migration tool, or data transfer between different databases - Specific source databases: MySQL, Oracle, PostgreSQL, SQL Server, ClickHouse, TDengine, InfluxDB, OpenTSDB, MongoDB, FTP, HDFS - Migration operations: create migration task, configure data source, test connection, import data, sync schema, batch migration - Migration management: query task status, view migration progress, check logs, kill migration, export/import config - Data type mapping, table structure sync, DDL generation, schema validation Even if the user does not explicitly say "migration", trigger this skill when they ask to transfer or sync data between databases with different engines.

Document or design a database schema with entity relationships, table definitions, constraints, indexes, and access patterns. Use when asked to design a data...

1 installs