Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

db-migrations

Skill by ParadevAI

Guides an assistant through creating a Drizzle database migration on a fresh Neon branch and checking it is safe for production under load. Aimed at developers changing the packages/db schema or reviewing migrations.

  • Score 90
  • 17k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install db-migrations

Built from the published package, never by AI.

git clone --depth 1 https://github.com/ParadevAI/Paradev /tmp/Paradev && mkdir -p ~/.claude/skills && cp -r /tmp/Paradev/.agents/skills/db-migrations ~/.claude/skills/db-migrations

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install db-migrations in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill walks an assistant through generating a Drizzle migration in packages/db on a new Neon branch. It covers a safety checklist to clear before opening a pull request, including checking table sizes in production, lock ordering, column type changes and avoiding long ACCESS EXCLUSIVE locks on hot tables. It also explains how to hand-order statements and how the production deploy job retries on deadlocks and lock timeouts.

It includes rules drawn from a September 2026 incident in which migration 0119 caused an API outage, plus a procedure for rehearsing risky migrations on a Neon branch under load with pgbench. The skill is aimed at developers working on the packages/db schema who generate or review Drizzle migrations for a production Postgres database on Neon.

Written from the project's SKILL.md and checked against it.

What it can do

  • Generate migrationsChanges the schema in packages/db/src/schema and runs drizzle-kit generate.
  • Safety checklistChecks production table sizes, column type changes, lock order and statement duration before a PR.
  • Lock orderingExplains taking child table locks before parent tables to avoid deadlocks with inserts.
  • Hot table guidanceLists tables that jobs and requests hold or read constantly, and how to migrate them safely.
  • Load rehearsalDescribes rehearsing a migration on a production-child Neon branch with pgbench under load.
  • Data move ruleRequires moving data in the same release when reads switch to a new table or column.
  • Preview branch resetExplains deleting a reused Neon preview branch so the database check runs for real.

What you need

  • A Neon project with NEON_ORG_ID and NEON_PROJECT_ID in .env
  • Bun runtime for bunx and bun commands
  • Drizzle Kit and drizzle-orm (0.45.2 is referenced)
  • pgbench for load rehearsals

Try asking

  • Create a Drizzle migration for a new column in packages/db on a fresh Neon branch.
  • Review this migration for lock order and production safety before I open a PR.
  • Check production table sizes for the tables my migration touches.

Good to know

  • Migrations must not be hand-edited without explicit user confirmation.
  • Any single statement over 60 seconds fails the production deploy by design.
  • Load rehearsal is required only when a migration locks a hot table or scans a large one.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/db-migrations/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md8 KB

Alternatives to db-migrations

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

db-migrations: common questions

Does this skill apply migrations to production?

No. The source says migrations should never be applied to a shared or production database directly. Those go through the production deploy flow.

What timeouts does the production migration deploy use?

The deploy job sets lock_timeout to 5 seconds and statement_timeout to 60 seconds. It retries up to 8 times, only when the log shows a deadlock or lock timeout.

Why rehearse under load instead of on a quiet branch?

The source says a quiet rehearsal of migration 0119 passed in 2.3 seconds and missed a deadlock that pgbench under load found immediately.

How do I install db-migrations?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is db-migrations free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is db-migrations safe to use?

It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to db-migrations?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

db-migrations Install

Add to stack

Loading.