db-migration

Solid

Apply schema migrations safely: detect the tool, classify the change by risk, gate destructive ones behind approval, back up in prod, preview-apply-verify, roll back on failure.

AI & Automation 22 stars 4 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
45
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Database Migration <!-- routing-eval reads this line; it lives in the BODY so the always-on skill LISTING stays inside Claude Code's budget (1% of the context window) — an overflowing listing gets descriptions truncated or dropped, which strips the very keywords a match depends on. --> Trigger phrases: "migration", "schema change", "update database", "add column", "create table", "alter table" A migration is very often a **one-way gate**: once applied, going back is expensive or impossible unless it was planned for. That is why the heart of the flow is not running a command, but **classifying the change by risk class before it passes through the gate** — let the safe one flow through, stop and get approval for the destructive one, and keep a rollback path ready in every case. The skill works with all common ORM/migration tools. > **Kit adaptation (local, .claude/):** Default stack is **EF Core + PostgreSQL**. `database-expert-csk` > applies it; **a destructive migration requires explicit approval (§4.5)**, commit/push with explicit approval (§4.4). Authorization/IDOR > impact → **security-expert-csk**; personal-data retention → **privacy-agent-csk**. §4 Prohibitions apply. ## Checklist - [ ] Tool detected, pending migrations listed - [ ] Every change classified (additive / destructive / ambiguous) - [ ] Destructive/ambiguous changes approved by the user - [ ] Backup taken (mandatory in prod, verified) - [ ] Preview (dry-run) shown and approved - [ ] Applied, s...

Details

Author
byerlikaya
Repository
byerlikaya/claude-starter-kit
Created
1 months ago
Last Updated
yesterday
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category