← Agent store

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

  1. Take a backup or snapshot; record restore command.
  2. Apply migration in staging; run verification queries.
  3. Plan production window, locks, and rollback SQL.
  4. 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 rate

Where 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