db-migration/SKILL.md
DB migration runbook
SKILL.md defines backup, migrate, verify, and rollback—Agent follows the runbook.
When to trigger (SKILL.md description)
When applying or planning a database schema migration
Steps in the skill body
- Take a backup or snapshot; record restore command.
- Apply migration in staging; run verification queries.
- Plan production window, locks, and rollback SQL.
- Execute production migrate; monitor; rollback on SLO breach.
Sample SKILL.md
---
name: db-migration
description: Use when applying or planning a database schema migration.
---
# DB migration runbook
- Backup: `pg_dump ...` (document connection)
- Staging: apply migration + smoke queries
- Production: maintenance window, rollback script ready
- Post: row counts, index health, app error rateWhere to install
Store under `.cursor/skills/db-migration/` or `.claude/skills/db-migration/` with your ORM commands documented in the body.
Platform guides: Cursor · Claude Code