db-migration-review
Review a database schema migration for production safety: lock contention, backfill strategy, online vs offline, rollback path, foreign-key timing…
Skill by ShaileshRawat1403
Chalk Labs
Need help deploying db-migration-review?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/shaileshrawat1403-db-migration-review
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/db-migration-review
What's inside
- Skill name
db-migration-review- Description
- Review a database schema migration for production safety: lock contention, backfill strategy, online vs offline, rollback path, foreign-key timing, replication lag. Returns impact-ordered findings tables.
- License
- MIT
- Instructions
- 91 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# DB Migration Review
Use this skill when the task is to review a schema migration before it runs against a production database. Migration bugs are silent — they often pass tests against an empty schema and then break under load or scale.
## Use when
- a migration is about to ship in a release
- a migration ran against staging and the user wants a second opinion before production
- a previous migration caused an outage and the new one is being scrutinized
- the database is large enough that "just run it" is no longer safe
## Workflow
1. **Identify the database and engine.** Postgres, MySQL, SQLite, MSSQL, or other. Migration tooling (Flyway, Liquibase, Alembic, Diesel, ActiveRecord, custom). Engine version. Replication setup if any.
2. **Inventory the migration.**
- Schema changes: tables created/dropped/renamed, columns added/dropped/renamed, type changes
- Index changes: created, dropped, renamed
- Constraint changes: foreign keys, checks, uniques
- Data changes: backfills, deletions, transforms
- The order of operations within the migration file
3. **Locking risk.**
- Postgres: `ALTER TABLE ... ADD COLUMN ... NOT NULL` rewrites the table — flag for any non-trivial table size
- MySQL: `ALTER TABLE` lock semantics depend on engine and version — call out the specific risk
- Adding an index without `CONCURRENTLY` / `ONLINE` will block writes on large tables
- Foreign key creation requires a full table scan with a lock by default
4. **NOT NULL with default.**
- In modern Postgres (11+), a NOT NULL column with a constant default is fast. With a *volatile* default (e.g., `now()`), it rewrites the table.
- In MySQL and older Postgres, NOT NULL with default always rewrites.
- Flag the version-specific risk and the recommended pattern (add nullable, backfill, then add constraint).
5. **Backfill strategy.**
- For tables larger than a few million rows, backfills must be batched and idempotent.
- Each batch should commit and pause to let replication catch up.
- Backfill should be rerunnable from the last committed batch.
- Flag in-transaction backfills against large tables.
6. **Foreign-key timing.**
- `NOT VALID` + `VALIDATE CONSTRAINT` pattern (Postgres) avoids the full lock — flag missing use.
- Adding FK to a high-write child table requires careful ordering with the backfill.
7. **Drop vs rename.**
- Dropping columns / tables is irreversible in production — flag missing rollback path.
- Renaming a column the application still references will break instantly — flag unless the rename is the second step of a multi-deploy migration.
8. **Multi-deploy patterns.**
- Risky migrations should be split: deploy code that tolerates both shapes, run migration, deploy code that uses the new shape.
- Flag single-deploy migrations that change a contract the running code depends on.
9. **Rollback path.**
- Every migration should have a written rollback procedure, even if it's "redeploy the prior code; data is unchanged."
- DROP COLUMN has no rollback — flag and require a paired backup plan or feature-flagged rollout.
10. **Replication impact.**
- Long-running migrations create replication lag on read replicas — estimate the impact and time-of-day appropriate to run.
11. **Test evidence.**
- The migration ran against a realistic dataset (not just an empty schema).
- Rollback was tested if rollback is claimed.
- The application's existing tests pass against both pre- and post-migration schemas where multi-deploy applies.
## Checks
- Flag findings as Critical only when the migration *will* cause outage or data loss in production
- Distinguish "Postgres N+" from "Postgres N-" version-specific risks — be explicit about which version the project runs
- Do not flag standard nullable-column additions on small tables — they are safe and common
- For SQLite, the lock model is fundamentally different; do not paste Postgres advice
## Output contract
Findings follow [docs/skills/OUTPUT_CONTRACT.md](../../docs/skills/OUTPUT_CONTRACT.md).
Return:
1. **Verdict** — one line + a small table:
- `Engine`, `Engine version`, `Approx. table size(s) touched`, `Replication?`, `Single-deploy or multi-deploy?`
2. **Counts** — Critical/High/Medium/Low/Info totals
3. **Findings** — one table per category, ordered by impact:
- Locking and rewrites
- NOT NULL and constraint timing
- Backfill strategy
- Foreign-key timing
- Drop / rename / irreversibility
- Multi-deploy ordering
- Rollback path
- Replication and timing
4. **Open questions / assumptions** — engine version, dataset size, replication topology, when the migration will run
5. **Residual risk** — what can only be verified against the real production data
6. **Next actions** — concrete fixes; for Critical findings, propose the exact rewrite
## Evidence to collect
- Migration file path + line for every statement
- The exact DDL/DML verbatim for flagged statements
- Engine version (read from `SELECT version()` or the project's config)
- Table row-count estimates (read from project docs, dashboards, or `pg_stat_user_tables` when accessible)
- Whether the project has a prior migration for the same table (to spot patterns)From ShaileshRawat1403/dax, MIT.
More from ShaileshRawat1403/dax
- 0.619score
skill-builder
ShaileshRawat1403
Create and improve DAX skills.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
mcp-server
ShaileshRawat1403
Create high-quality MCP (Model Context Protocol) servers that extend DAX's tool capabilities.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
agentic-loop-audit
ShaileshRawat1403
Audit an agent's main loop for halting conditions, mutation budgets, loop breakers, sensitive-path guards, error recovery, and replayability.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
artifact-audit
ShaileshRawat1403
Inspect release artifacts, generated outputs, screenshots, and manifests for completeness, consistency, and operator value.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
ci-cd-audit
ShaileshRawat1403
Audit CI/CD workflows for correctness, caching, action pinning, secret hygiene, and job-graph health.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
deploy-readiness
ShaileshRawat1403
Production readiness audit for a service: health checks, rollback strategy, runbook presence, observability wiring, capacity, dependencies.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
eval-suite-audit
ShaileshRawat1403
Audit an AI eval suite for coverage, leakage between datasets, deterministic vs stochastic measurement, ladder correctness, and signal quality.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
gh-actions-security
ShaileshRawat1403
Security-focused review of GitHub Actions workflows: pull_request_target misuse, expression injection, privileged token misuse, supply-chain exposure.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
observability-audit
ShaileshRawat1403
Audit observability for a service or system: structured logging, metrics for golden signals, distributed tracing, dashboard quality, alert noise, SLO…
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
prompt-audit
ShaileshRawat1403
Audit prompts and system instructions across a repo for hygiene: hardcoded model assumptions, secret leakage, drift between surfaces, length budget, injection…
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
release-pipeline-audit
ShaileshRawat1403
Audit the tag-triggered release pipeline for reproducibility, provenance, signing, supply-chain integrity, and rollback.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
release-readiness
ShaileshRawat1403
Check whether a DAX release is coherent, verifiable, and safe to ship across package, docs, diagnostics, and release artifacts.
SkillAFreshness: A★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 16, 2026 (5 months ago)
- Last release
- Oct 8, 2026 (22 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ShaileshRawat1403/dax
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ShaileshRawat1403
- 0.619score
skill-builder
ShaileshRawat1403
Create and improve DAX skills.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
mcp-server
ShaileshRawat1403
Create high-quality MCP (Model Context Protocol) servers that extend DAX's tool capabilities.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
agentic-loop-audit
ShaileshRawat1403
Audit an agent's main loop for halting conditions, mutation budgets, loop breakers, sensitive-path guards, error recovery, and replayability.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
ci-cd-audit
ShaileshRawat1403
Audit CI/CD workflows for correctness, caching, action pinning, secret hygiene, and job-graph health.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
deploy-readiness
ShaileshRawat1403
Production readiness audit for a service: health checks, rollback strategy, runbook presence, observability wiring, capacity, dependencies.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
artifact-audit
ShaileshRawat1403
Inspect release artifacts, generated outputs, screenshots, and manifests for completeness, consistency, and operator value.
SkillAFreshness: A★ 5Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get db-migration-review running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
db-migration-review skill. Agent Mart. https://agentmart.dev/skills/shaileshrawat1403-db-migration-review (last updated 2026-10-24)