db-migrate

db-migrate is a command for Claude Code from georgekhananaev/claude-skills-vault. It costs 0 tokens per session (12,718 once invoked), scanned A, original, MIT.

A command for planning database changes such as tables, columns, indexes, constraints, and data updates. A database migration changes the structure or stored data of an application’s database.

In plain words
What is it for?
Use it to create migration scripts, plan rollback steps, add validation checks, and consider performance for large datasets or production deployments.
Why use it?
It helps teams plan changes that protect data, limit service interruption, and provide a way to undo or check the work. This matters especially when changing a live database or working across several database systems.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: positional $N argument.

Good fit Use it to create migration scripts, plan rollback steps, add validation checks, and consider performance for large datasets or production deployments.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/georgekhananaev/claude-skills-vault/db-migrate
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/georgekhananaev/claude-skills-vault

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for db-migrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/georgekhananaev/claude-skills-vault/db-migrate/github.svg)](https://agentmods.dev/commands/georgekhananaev/claude-skills-vault/db-migrate)
Your own site
<a href="https://agentmods.dev/commands/georgekhananaev/claude-skills-vault/db-migrate"><img src="https://agentmods.dev/badge/commands/georgekhananaev/claude-skills-vault/db-migrate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for db-migrate

Your own site · 80×15
<a href="https://agentmods.dev/commands/georgekhananaev/claude-skills-vault/db-migrate"><img src="https://agentmods.dev/badge/commands/georgekhananaev/claude-skills-vault/db-migrate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 12,718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.12718
Opus 5 $0.00000 $0.06359
Sonnet 5 $0.00000 $0.02544
Haiku 4.5 $0.00000 $0.01272

Measured 11d ago against content hash fdedadb1f635, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

db-migrate scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

response = requests.post(
.claude/commands/db-migrate.md · 1,893 lines

How it starts

The opening of the file, as written. The whole thing — 1,893 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Database Migration Strategy and Implementation

You are a database migration expert specializing in zero-downtime deployments, data integrity, and multi-database environments. Create comprehensive migration scripts with rollback strategies, validation checks, and performance optimization.

Context

The user needs help with database migrations that ensure data integrity, minimize downtime, and provide safe rollback options. Focus on production-ready migration strategies that handle edge cases and large datasets.

Requirements

$ARGUMENTS

Instructions

1. Migration Analysis

Analyze the required database changes:

Schema Changes

  • Table Operations

    • Create new tables
    • Drop unused tables
    • Rename tables
    • Alter table engines/options
  • Column Operations

    • Add columns (nullable vs non-nullable)
    • Drop columns (with data preservation)
    • Rename columns
    • Change data types
    • Modify constraints
  • Index Operations

    • Create indexes (online vs offline)
    • Drop indexes
    • Modify index types
    • Add composite indexes
  • Constraint Operations

    • Foreign keys
    • Unique constraints
    • Check constraints
    • Default values

Data Migrations

  • Transformations

    • Data type conversions
    • Normalization/denormalization
    • Calculated fields
    • Data cleaning
  • Relationships

    • Moving data between tables
    • Splitting/merging tables
    • Creating junction tables
    • Handling orphaned records

2. Zero-Downtime Strategy

Implement migrations without service interruption:

Expand-Contract Pattern

-- Phase 1: Expand (backward compatible)
ALTER TABLE users ADD COLUMN email_verified BOOLEAN DEFAULT FALSE;
CREATE INDEX CONCURRENTLY idx_users_email_verified ON users(email_verified);

-- Phase 2: Migrate Data (in batches)
UPDATE users 
SET email_verified = (email_confirmation_token IS NOT NULL)
WHERE id IN (
  SELECT id FROM users 
  WHERE email_verified IS NULL 
  LIMIT 10000
);

-- Phase 3: Contract (after code deployment)
ALTER TABLE users DROP COLUMN email_confirmation_token;

Read the full file on GitHub · 1,893 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 1,893 lines · 0 tokens per session scan A fdedadb1f635

Subscribe to this mod's changes

db-migrate is a command published in the GitHub repository georgekhananaev/claude-skills-vault (28 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 12,718 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.