database-migrations
Create, review, apply, squash, or validate shared PostgreSQL migrations in this monorepo. Use when changing `packages/db/src/schema.ts`, generating Drizzle…
by Kilo-Org★ 25 GitHub stars
Install database-migrations in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Shared PostgreSQL migrations
This skill covers shared PostgreSQL migrations only. It does not govern Durable Object SQLite or Wrangler migrations. Read packages/db/AGENTS.md first; it is canonical for shared PostgreSQL and Drizzle invariants. Use the git-rebase skill for migration conflicts during a rebase.
Workflow
- Read
packages/db/AGENTS.mdand inspect relevant schema and migration files. - Change
packages/db/src/schema.tsfirst. - Generate artifacts with
pnpm drizzle generate. - Inspect generated SQL.
- Review generated DDL for destructive operations and data loss. Prefer additive or staged schema changes. If generated DDL is unsafe, wrong, or too broad, correct the schema and regenerate. Do not hand-edit generated DDL, snapshots, or journal entries.
- Append only intentional
UPDATEorINSERTdata backfills after generated DDL, separated with--> statement-breakpoint. - Apply migrations with
pnpm drizzle migrateor runpnpm drizzle:verify-bootstrapwhen relevant. - Run
pnpm formatand targeted schema or migration checks. - Prefer one generated migration per unshipped feature branch. To squash migrations before shipping, remove the branch-local migration SQL, snapshots, and journal entries, then regenerate once from the current schema. Re-append intentional backfills afterward.
Keep generated artifacts generated. packages/db/AGENTS.md also covers shared-schema PII requirements and DB-backed timestamp serialization.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the database-migrations skill do?
Create, review, apply, squash, or validate shared PostgreSQL migrations in this monorepo. Use when changing `packages/db/src/schema.ts`, generating Drizzle migrations, adding backfills, or checking migration bootstrap behavior.
How do I install the database-migrations skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the database-migrations skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…