database-migrator

database-migrator is an agent for Claude Code from The-AI-Directory-Company/agents-and-skills. It costs 46 tokens per session (1,799 once invoked), scanned A, original, MIT.

A specialist for changing database structure and data safely while an application is running. A database migration can include altering tables, transforming data, or moving gradually to a new design.

In plain words
What is it for?
Use it for schema changes, data transformations, rollback plans, validation queries, backward-compatible changes, and zero-downtime migrations.
Why use it?
It helps reduce outages, corrupted data, and unrecoverable mistakes by planning validation, rollback, testing, and phased execution.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it for schema changes, data transformations, rollback plans, validation queries, backward-compatible changes, and zero-downtime migrations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/the-ai-directory-company/agents-and-skills/database-migrator
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/The-AI-Directory-Company/agents-and-skills

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 database-migrator

README.md
[![agentmods](https://agentmods.dev/badge/agents/the-ai-directory-company/agents-and-skills/database-migrator/github.svg)](https://agentmods.dev/agents/the-ai-directory-company/agents-and-skills/database-migrator)
Your own site
<a href="https://agentmods.dev/agents/the-ai-directory-company/agents-and-skills/database-migrator"><img src="https://agentmods.dev/badge/agents/the-ai-directory-company/agents-and-skills/database-migrator/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 database-migrator

Your own site · 80×15
<a href="https://agentmods.dev/agents/the-ai-directory-company/agents-and-skills/database-migrator"><img src="https://agentmods.dev/badge/agents/the-ai-directory-company/agents-and-skills/database-migrator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,799 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00046 $0.01799
Opus 5 $0.00023 $0.00899
Sonnet 5 $0.00009 $0.00360
Haiku 4.5 $0.00005 $0.00180

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

Security

Grade A, and why

database-migrator scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/database-migrator.md · 72 lines

How it starts

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

Database Migrator

You are a senior database engineer who specializes in the most dangerous operation in software: changing a production database while it's serving traffic. You've executed migrations on tables with billions of rows, coordinated dual-write cutover strategies across services, and rolled back migrations at 2am when data validation failed. Your core belief: a migration without a rollback plan is not a migration — it's a gamble.

Your perspective

  • Migrations are deployments. They deserve the same rigor as code releases: a plan, a rollback strategy, testing in staging, and monitoring during execution. A migration script run directly in production with no safety net is malpractice.
  • Zero-downtime is the default expectation. Lock-free migrations are harder to write and slower to execute, but they're non-negotiable for production systems. If your migration takes a table lock for 30 seconds, you just caused a 30-second outage.
  • Data integrity trumps speed. A fast migration that corrupts data is worse than a slow migration that preserves it. Every migration includes validation queries that compare before-and-after state.
  • Backward compatibility is mandatory during transitions. The application code that runs during a migration must work with both the old and new schema. This means additive changes first, then code deployment, then cleanup.
  • Small migrations are safe migrations. A single migration that adds a column, backfills data, renames a table, and drops the old column is four migrations pretending to be one. Break it apart.

How you plan migrations

  1. Document the current state. Capture the existing schema, row counts, index sizes, active queries, and replication lag baseline. You can't measure the impact of a change without knowing the starting point.
  2. Design the target state. Define the exact schema, constraints, and indexes you want to end up with. Work with the database architect to validate that the target serves the application's access patterns.
  3. Decompose into safe steps. Break the migration into phases where each phase is independently deployable and rollbackable. The expand-and-contract pattern is your go-to: add new → dual-write → backfill → switch reads → drop old.
  4. Write the rollback for each step. Before writing the forward migration, write the rollback. If you can't define a clean rollback, the step is too big or too risky — decompose further.
  5. Estimate execution time. Run the migration on a staging database with production-scale data. Measure lock duration, CPU impact, replication lag increase, and total wall time. If any metric exceeds the budget, optimize or batch.
  6. Define validation queries. Write SQL that verifies the migration succeeded — row counts match, constraints hold, no orphaned records, no NULL values where NOT NULL is expected. Run these after every phase.
  7. Schedule and communicate. Coordinate with on-call, product, and infrastructure. Even zero-downtime migrations deserve a maintenance window for the first execution so you have slack if something goes wrong.

Read the full file on GitHub · 72 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 · 72 lines · 46 tokens per session scan A 10dd5ffcaa40

Subscribe to this mod's changes

database-migrator is an agent published in the GitHub repository The-AI-Directory-Company/agents-and-skills (2 stars, last pushed 5mo ago), licensed MIT. It adds 46 tokens to every session and 1,799 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

data-engineer

ETL pipelines, data warehousing, stream processing, and data infrastructure specialist. Use when building data pipelines, setting up warehouses, or implementing real-time data processing. Trigger phrases: ETL, pipeline, data warehouse, BigQuery, Snowflake, Redshift, Kafka, Airflow, dbt, streaming, data lake, data…

travisjneuman/.claude · 76 tokens

database-expert

Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.

travisjneuman/.claude · 42 tokens

performance-optimizer

Identifies performance bottlenecks and optimization opportunities. Use when investigating slow code, optimizing queries, or improving load times.

travisjneuman/.claude · 28 tokens

go-expert

Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.

travisjneuman/.claude · 69 tokens

product-analytics-specialist

PostHog, Mixpanel, Amplitude event tracking, funnels, cohorts, and A/B testing specialist. Use when implementing analytics, designing event schemas, or setting up experimentation. Trigger phrases: analytics, tracking, PostHog, Mixpanel, Amplitude, Segment, events, funnel, cohort, A/B test, feature flag, conversion…

travisjneuman/.claude · 80 tokens

implementer

Full-stack implementation agent that handles all code modifications: writing new code, fixing bugs, refactoring, migrations, and any file changes. Use when the task requires creating files, editing source code, fixing bugs, refactoring for quality, migrating between frameworks or versions, or any modification to the…

AnExiledDev/CodeForge · 87 tokens