data-migration

data-migration is a skill for Claude Code, Codex from arjunprabhulal/devops-skills. It costs 116 tokens per session (1,594 once invoked), scanned A, original, MIT.

A guide to changing a database’s structure or the shape of stored data while the application stays available. It uses staged changes so old and new versions can work together during the transition.

In plain words
What is it for?
Planning expand-then-contract migrations, including adding new fields or tables, copying existing data in batches, writing to both old and new structures, and removing the old structure safely.
Why use it?
It avoids downtime and broken reads or writes during a schema change. Each step can be paused, checked, or reversed independently.

Skill for Claude CodeCodex

Part of the devops-skills plugin — 56 skills shipped together

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.

agentmods
npx agentmods add skills/arjunprabhulal/devops-skills/data-migration
Any agent
npx skills add arjunprabhulal/devops-skills --skill data-migration
Clone the repo
git clone --depth 1 https://github.com/arjunprabhulal/devops-skills

Made for: Claude Code, Codex.

Or install devops-skills, the plugin that ships this one along with the rest of its 56 skills.

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 data-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/arjunprabhulal/devops-skills/data-migration.svg)](https://agentmods.dev/skills/arjunprabhulal/devops-skills/data-migration)
Your own site
<a href="https://agentmods.dev/skills/arjunprabhulal/devops-skills/data-migration"><img src="https://agentmods.dev/badge/skills/arjunprabhulal/devops-skills/data-migration.svg" alt="Measured on agentmods" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00116 $0.01594
Opus 5 $0.00058 $0.00797
Sonnet 5 $0.00023 $0.00319
Haiku 4.5 $0.00012 $0.00159

Measured 3d ago against content hash b49574be87b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-migration 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 3d 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.

skills/data/data-migration/SKILL.md · 130 lines

How it starts

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

Data Migration

The instinct when a schema needs to change is to write one migration that gets the database from old shape to new shape and run it. That instinct is exactly what causes downtime: a single atomic cutover means the old code and the new code cannot both be correct at the same moment, so somewhere in the deploy there is a window where reads or writes are wrong.

The fix is to stop treating "old schema" and "new schema" as two states connected by one migration, and instead treat the migration as a sequence of states where old and new coexist, each individually safe, each individually undoable.

A migration that cannot be paused halfway through, with both old and new still working, is not actually a migration — it is a scheduled outage with a script attached.

For a worked SQL walkthrough of the expand, backfill, and contract phases, read references/expand-contract.md.

1. Split every migration into expand, migrate, contract

Expand-then-contract is the pattern underneath every zero-downtime schema change: add the new thing without touching the old thing, move the data, then remove the old thing only once nothing depends on it anymore.

  • Expand: add the new column, table, or field alongside the existing one. Nothing reads or depends on it yet, so this step alone cannot break anything running in production.
  • Migrate: backfill historical data and start writing to both old and new. This is the phase with real risk, and it is where the rest of this skill's sections apply.
  • Contract: once every reader has moved to the new shape and it has run correctly for a observation period, remove the old column, table, or field.

Each phase ships as its own deploy, sequenced with normal rollout controls — see deployment-strategies for how to stage and gate a rollout, since migration phases are just deploys with an extra constraint: the previous phase must already be stable in production.

Done when: the migration is written as three separate, independently deployable changes, not one script that jumps from old shape to new shape.

Read the full file on GitHub · 130 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 130 lines · 116 tokens per session scan A b49574be87b7

Subscribe to this mod's changes

data-migration is a skill published in the GitHub repository arjunprabhulal/devops-skills (2 stars, last pushed 9d ago), licensed MIT. It adds 116 tokens to every session and 1,594 once invoked, about $0.0006 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 skills, from other repositories

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

bigquery-bigframes

Generates Python code using BigQuery DataFrames (BigFrames), the pandas/scikit-learn-style API over BigQuery. Use when writing BigFrames code or doing pandas-style dataframe/ML work against BigQuery (e.g. in a notebook). Don't use for SQL-first workflows or the google-cloud-bigquery client library — use…

google/skills · 76 tokens

bigtable-basics

Assists in provisioning instances/tables, designing performant schemas, and querying data in Bigtable. Use when designing Bigtable row keys, configuring column families, writing SQL queries or client library code (Java, Go, Python) for Bigtable, or diagnosing performance/hotspotting issues. Also use when provisioning…

google/skills · 87 tokens

cloud-databases-onboarding

Guides users through discovering their database requirements, recommends a Google Cloud database based on a recommendation matrix, and assists in database creation. Use when a user asks 'What database service should I use?', 'Help me pick a database', or when a user wants to create a new database on Google Cloud.…

google/skills · 83 tokens

cloud-sql-basics

This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source…

google/skills · 108 tokens