Install the "data-migration" agent skill from https://github.com/FerroxLabs/wayland/tree/main/src/process/resources/skills-library/bodies/skills/data-engineering/data-migration into .claude/skills/data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-migration", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add FerroxLabs/wayland --skill data-migration -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "data-migration" agent skill from https://github.com/FerroxLabs/wayland/tree/main/src/process/resources/skills-library/bodies/skills/data-engineering/data-migration into .agents/skills/data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-migration", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add FerroxLabs/wayland --skill data-migration -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "data-migration" agent skill from https://github.com/FerroxLabs/wayland/tree/main/src/process/resources/skills-library/bodies/skills/data-engineering/data-migration into .cursor/skills/data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-migration", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add FerroxLabs/wayland --skill data-migration -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "data-migration" agent skill from https://github.com/FerroxLabs/wayland/tree/main/src/process/resources/skills-library/bodies/skills/data-engineering/data-migration into .gemini/skills/data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-migration", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add FerroxLabs/wayland --skill data-migration -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "data-migration" agent skill from https://github.com/FerroxLabs/wayland/tree/main/src/process/resources/skills-library/bodies/skills/data-engineering/data-migration into .github/skills/data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-migration", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add FerroxLabs/wayland --skill data-migration -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "data-migration" agent skill from https://github.com/FerroxLabs/wayland/tree/main/src/process/resources/skills-library/bodies/skills/data-engineering/data-migration into .opencode/skills/data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-migration", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
SKILL.md covers Overview, Migration Strategy Decision Tree, Zero-Downtime Migration and Dual-Write Pattern, plus 10 more sections
Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
Data migration best practices
What it does
Data Migration is an agent skill from FerroxLabs/wayland. Database migration expertise covering zero-downtime migration strategies, dual-write patterns, shadow tables, data reconciliation, schema evolution, backward compatibility, rollback strategies, large table migration, and cross-database migration for safely moving data between systems without service disruption. Use when the user asks about data migration, data migration best practices, or needs guidance on data migration implementation. Do NOT use when the user needs a different specialized skill or is asking…
Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Databases, covering Database migrations and Accounting and bookkeeping. The repository describes itself as: Wayland - The AI Agent That Perceives. Reasons. Acts. Evolves. The licence is Apache-2.0.
When your agent uses it
The user asks about data migration
Data migration best practices
Needs guidance on data migration implementation
The user needs a different specialized skill
Example prompts
“/data-migration”
Requirements
Python 3
What it can do on your machine
Read from SKILL.md and the folder at commit 4c030c7. It shows what the files ask for, not the result of running them.
Tool permissions
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Runs code
No scripts in the folder and no shell commands in SKILL.md (its code samples are sql, python, bash and markdown).
From the folder's file list and the shell code blocks in SKILL.md.
Network
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Data Migration loads about 3.7k tokens when it runs. Until then it costs about 142 tokens; SKILL.md has 451 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~142
When it runs· the whole SKILL.md, loaded when a task matches
~3.7k
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
Safety
Auto-check passed
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
Download SKILL.mdSave it as .claude/skills/data-migration/SKILL.md (or your agent's skills folder).
name
data-migration
description
Database migration expertise covering zero-downtime migration strategies, dual-write patterns, shadow tables, data reconciliation, schema evolution, backward compatibility, rollback strategies, large table migration, and cross-database migration for safely moving data between systems without service disruption.
Use when the user asks about data migration, data migration best practices, or needs guidance on data migration implementation.
Do NOT use when the user needs a different specialized skill or is asking about an unrelated technology domain.
license
Apache-2.0
metadata.author
foundry-skills
metadata.version
1.0.0
metadata.tags
data-science sql guide
metadata.category
data-engineering
metadata.subcategory
pipelines-etl
metadata.disclaimer
none
metadata.difficulty
intermediate
Data Migration Specialist
Overview
Database migration is one of the highest-risk operations in software engineering. A failed migration can mean data loss, extended downtime, or corrupt state. This skill covers the strategies, patterns, and safety mechanisms needed to migrate databases reliably, often with zero downtime.
Migration Strategy Decision Tree
Is downtime acceptable?
YES -> How long?
< 1 hour -> Simple dump & restore with maintenance window
< 15 min -> Blue-green with quick switchover
Any length -> Stop-the-world migration
NO -> Zero-downtime migration required
What is changing?
Schema only -> Online schema migration (pt-osc, gh-ost, pg_repack)
Database engine -> Dual-write + shadow read migration
Data model -> Expand-contract pattern
Cloud provider -> Replicate + cutover migration
Zero-Downtime Migration
The Expand-Contract Pattern
This is the safest pattern for schema changes in production systems.
Phase 1 - EXPAND: Add new structure alongside old
Phase 2 - MIGRATE: Backfill data, dual-write
Phase 3 - SWITCH: Point reads to new structure
Phase 4 - CONTRACT: Remove old structure
Timeline:
Deploy 1 (Expand) Deploy 2 (Switch) Deploy 3 (Contract)
|------ dual write ------|---- reads from new ----|
|-- backfill old data ---| |
|-- verify correctness --|
|-- drop old --|
Example: Splitting a Column
sql
-- Goal: Split "full_name" into "first_name" and "last_name"
-- Phase 1: EXPAND - Add new columns (non-breaking)
ALTER TABLE customers ADD COLUMN first_name VARCHAR(100);
ALTER TABLE customers ADD COLUMN last_name VARCHAR(100);
-- Phase 2: MIGRATE - Deploy code that writes to both old and new
-- Application code:
-- def save_customer(customer):
-- customer.full_name = f"{customer.first_name} {customer.last_name}"
-- # Writes to all three columns
-- db.save(customer)
-- Backfill existing data
# ... (condensed) ...
WHERE first_name IS NULL OR last_name IS NULL;
-- Should return 0
-- Phase 4: CONTRACT - Remove old column (after verification period)
ALTER TABLE customers DROP COLUMN full_name;
Example: Changing a Column Type
sql
-- Goal: Change "price" from INTEGER (cents) to NUMERIC(10,2) (dollars)
-- Phase 1: EXPAND
ALTER TABLE products ADD COLUMN price_decimal NUMERIC(10,2);
-- Phase 2: BACKFILL + DUAL-WRITE
UPDATE products SET price_decimal = price / 100.0 WHERE price_decimal IS NULL;
-- Deploy: application writes to both columns
-- CREATE TRIGGER for safety:
CREATE OR REPLACE FUNCTION sync_price() RETURNS TRIGGER AS $$
BEGIN
IF NEW.price IS DISTINCT FROM OLD.price THEN
NEW.price_decimal := NEW.price / 100.0;
# ... (condensed) ...
-- Phase 3: SWITCH reads to price_decimal
-- Phase 4: Drop trigger, rename column, drop old
DROP TRIGGER price_sync ON products;
ALTER TABLE products DROP COLUMN price;
ALTER TABLE products RENAME COLUMN price_decimal TO price;
Dual-Write Pattern
Used when migrating between databases (e.g., MySQL to PostgreSQL, monolith to microservice).
python
class DualWriteService:
"""Write to both old and new database during migration."""
def __init__(self, old_db, new_db, mode='shadow'):
self.old_db = old_db
self.new_db = new_db
self.mode = mode # shadow, dual, cutover
def write(self, entity):
if self.mode == 'shadow':
# Old DB is primary, async write to new DB
result = self.old_db.save(entity)
try:
self.new_db.save(entity)
# ... (condensed) ...
f"old={primary_result}, new={secondary}")
except Exception as e:
metrics.increment("shadow_read.errors")
threading.Thread(target=compare, daemon=True).start()
Migration Mode Progression
Week 1-2: shadow mode
- Write old (primary) + new (async)
- Read old only
- Monitor mismatch rate
Week 3: dual mode
- Write both (synchronous)
- Read old
- Mismatch rate should be ~0%
Week 4: cutover mode
- Write new (primary) + old (async)
- Read new
- Monitor for issues
Week 5+: decommission
- Remove old DB writes
- Archive old DB
Data Reconciliation
python
import hashlib
from typing import Dict, List, Tuple
class DataReconciler:
"""Compare data between source and target databases."""
def __init__(self, source_engine, target_engine):
self.source = source_engine
self.target = target_engine
def reconcile_counts(self, table_pairs: List[Tuple[str, str]]) -> List[dict]:
"""Compare row counts between source and target tables.
Note: Table/column names are interpolated via f-strings because SQL
# ... (condensed) ...
'target': float(t_val) if t_val else None,
'pct_difference': round(pct_diff, 4),
'match': pct_diff < 0.01, # Within 0.01%
}
return results
Schema Evolution
Backward and Forward Compatibility Rules
BACKWARD COMPATIBLE (safe to deploy new code first):
+ Add nullable column
+ Add column with default value
+ Widen column type (INT -> BIGINT, VARCHAR(50) -> VARCHAR(100))
+ Add new table
+ Add index
NOT BACKWARD COMPATIBLE (requires expand-contract):
- Remove column
- Rename column
- Narrow column type
- Add NOT NULL constraint to existing column
- Change column type (INT -> VARCHAR)
FORWARD COMPATIBLE (safe to deploy old code with new schema):
+ Remove column (if old code does not reference it)
+ Add nullable column (old code ignores it)
-- V005__split_name_columns_expand.sql
-- Expand phase: add new columns
ALTER TABLE customers ADD COLUMN first_name VARCHAR(100);
ALTER TABLE customers ADD COLUMN last_name VARCHAR(100);
-- Add trigger for dual-write during transition
CREATE OR REPLACE FUNCTION sync_name_columns()
RETURNS TRIGGER AS $$
BEGIN
IF NEW.full_name IS NOT NULL AND (NEW.first_name IS NULL OR TG_OP = 'INSERT') THEN
NEW.first_name := SPLIT_PART(NEW.full_name, ' ', 1);
NEW.last_name := SUBSTRING(NEW.full_name FROM POSITION(' ' IN NEW.full_name) + 1);
END IF;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER trg_sync_names
BEFORE INSERT OR UPDATE ON customers
FOR EACH ROW EXECUTE FUNCTION sync_name_columns();
Rollback Strategies
Schema Rollback
sql
-- Every migration should have a corresponding rollback script
-- V005__split_name_columns_expand.sql -> V005__rollback.sql
-- V005__rollback.sql
DROP TRIGGER IF EXISTS trg_sync_names ON customers;
DROP FUNCTION IF EXISTS sync_name_columns();
ALTER TABLE customers DROP COLUMN IF EXISTS first_name;
ALTER TABLE customers DROP COLUMN IF EXISTS last_name;
Data Rollback
python
class MigrationWithRollback:
"""Migration with automatic rollback on failure."""
def __init__(self, source_engine, target_engine):
self.source = source_engine
self.target = target_engine
self.rollback_log = []
def migrate_with_snapshot(self, table, migration_fn):
"""Take snapshot before migration for safe rollback.
Note: Table names are interpolated via f-strings below because SQL
parameters cannot be used for identifiers. Validate that table names
are never derived from user input.
# ... (condensed) ...
def rollback(self, table, snapshot_table):
"""Restore table from snapshot."""
with self.target.begin() as conn:
conn.execute(f"DROP TABLE IF EXISTS {table}")
conn.execute(f"ALTER TABLE {snapshot_table} RENAME TO {table}")
Large Table Migration
Online DDL Techniques
shell
# gh-ost (GitHub Online Schema Tester) for MySQL
gh-ost \
--host=primary-db \
--database=production \
--table=orders \
--alter="ADD COLUMN shipping_status VARCHAR(20) DEFAULT 'pending'" \
--allow-on-master \
--chunk-size=1000 \
--max-load="Threads_running=25" \
--critical-load="Threads_running=50" \
--exact-rowcount \
--concurrent-rowcount \
--default-retries=120 \
--postpone-cut-over-flag-file=/tmp/gh-ost.postpone \
--execute
# How gh-ost works:
# 1. Creates ghost table with new schema
# 2. Copies rows from original to ghost in chunks
# 3. Applies binary log events for ongoing changes
# 4. Atomically swaps tables when caught up
sql
-- PostgreSQL: pg_repack for table reorganization
-- Does not require ACCESS EXCLUSIVE lock for the full duration
-- Install extension
CREATE EXTENSION pg_repack;
-- Repack a table (remove bloat, apply new storage parameters)
-- Run from command line:
-- pg_repack --table orders --no-superuser-check -d production
Chunked Data Migration
python
def migrate_large_table(source_engine, target_engine, table,
key_column, chunk_size=10000):
"""
Migrate large table in chunks with progress tracking and resumability.
Note: Table/column names are interpolated via f-strings because SQL
parameters cannot be used for identifiers. Ensure these values are
never derived from user input.
"""
# Get total count and max key for progress tracking
total = pd.read_sql(f"SELECT COUNT(*) AS c FROM {table}", source_engine).iloc[0]['c']
# Get resume point
last_key = get_checkpoint(table)
# ... (condensed) ...
migrated += len(chunk)
progress = migrated / total * 100
print(f"Progress: {migrated}/{total} ({progress:.1f}%)")
return migrated
Full backup of source database verified and tested
Target environment provisioned and tested
Schema migration scripts reviewed and tested on staging
Data migration scripts tested with production-like data volume
Rollback plan documented and tested
Application compatibility verified (old code + new schema)
Monitoring and alerting configured for migration metrics
Communication plan sent to stakeholders
Maintenance window scheduled (if applicable)
During Migration
Monitoring dashboards open and watched
Progress tracking active
Error rates within acceptable thresholds
Data reconciliation checks passing
Application health checks passing
Post-Migration
Row count reconciliation across all tables
Checksum verification for critical tables
Aggregate value comparison (sums, counts)
Application functional tests passing
Performance benchmarks within acceptable range
Monitoring confirms normal operation for 24+ hours
Old infrastructure decommissioning scheduled
Documentation updated
Runbook updated with lessons learned
Show full SKILL.md (198 more words)Show less
When to Use
Use this skill when:
Designing or implementing data migration solutions
Reviewing or improving existing data migration approaches
Making architectural or implementation decisions about data migration
Learning data migration patterns and best practices
Troubleshooting data migration-related issues
Do NOT use this skill when:
The question is about a fundamentally different technology domain
A more specific sibling skill covers the exact topic needed
The user needs a complete hands-on tutorial rather than expert guidance
Output Format
markdown
# Data Migration Analysis
## Context Assessment
[Situation summary and constraints]
## Recommended Approach
[Primary recommendation with rationale]
## Implementation Steps
1. [Step with specific details]
2. [Step with specific details]
3. [Step with specific details]
## Trade-offs and Considerations
- [Key trade-off 1]
- [Key trade-off 2]
## Next Steps
- [Immediate action item]
- [Follow-up action item]
Example
Input: "Help me implement data migration for a medium-scale production application"
Output: A structured analysis covering current state assessment, recommended data migration approach with specific patterns, implementation roadmap with milestones, and risk mitigation strategies tailored to the application scale and constraints.
Edge Cases
Legacy system integration: When data migration must coexist with legacy approaches, provide a gradual migration path rather than a complete rewrite
Scale mismatch: When the solution complexity exceeds the project scale, recommend a simpler approach and note when to revisit
Team skill gaps: When the team lacks experience with the recommended approach, include learning resources and simpler alternatives
Conflicting requirements: When constraints conflict (e.g., performance vs. maintainability), explicitly state the trade-off and recommend based on stated priorities
Data Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
Design and harden Roblox client/server networking with RemoteEvent, RemoteFunction, and UnreliableRemoteEvent; server authority, argument and Instance validation, rate limits, proximity/ownership…
A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…
Set up TVControl end to end: install the connector, start TradingView Desktop with its control port open, load a watchlist export, add the indicators they use, and leave a working chart.
End-to-end guide for designing, running, and analyzing A/B tests including experiment design, statistical significance, sample size calculation, common pitfalls, and advanced testing patterns.
Complete academic writing guide covering thesis and dissertation structure, journal article format using IMRaD, literature review methodology, citation management, the peer review process, and…
Database migration expertise covering zero-downtime migration strategies, dual-write patterns, shadow tables, data reconciliation, schema evolution, backward compatibility, rollback strategies…. Data Migration is an agent skill from FerroxLabs/wayland. Database migration expertise covering zero-downtime migration strategies, dual-write patterns, shadow tables, data reconciliation, schema evolution, backward compatibility, rollback strategies, large table migration, and cross-database migration for safely moving data between systems without service disruption.
When should I use Data Migration?
Data Migration fits situations like: the user asks about data migration; data migration best practices; needs guidance on data migration implementation; the user needs a different specialized skill.
How do I install Data Migration in Claude Code?
Run `npx skills add FerroxLabs/wayland --skill data-migration -a claude-code`. Or copy the skill folder (src/process/resources/skills-library/bodies/skills/data-engineering/data-migration in FerroxLabs/wayland) into .claude/skills/data-migration in your project. Claude Code loads it when a task matches its description.
How do I install Data Migration in Codex?
Run `npx skills add FerroxLabs/wayland --skill data-migration -a codex`. Or copy the skill folder (src/process/resources/skills-library/bodies/skills/data-engineering/data-migration in FerroxLabs/wayland) into .agents/skills/data-migration in your project. Codex loads it when a task matches its description.
Can I use Data Migration in Cursor, Gemini CLI or GitHub Copilot?
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add FerroxLabs/wayland --skill data-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/data-migration, .gemini/skills/data-migration, .github/skills/data-migration and .opencode/skills/data-migration in your project.
What does Data Migration need to run?
SKILL.md names no scripts, command-line tools or credentials: Data Migration is instructions for the agent only. Our summary lists: Python 3.
Does Data Migration access the network?
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Is Data Migration safe to install?
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
What licence does Data Migration use?
Data Migration is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Data Migration use?
About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
What are the alternatives to Data Migration?
Skills that share tags, products or a category with Data Migration: Roblox Networking (gamedev-skills/awesome-gamedev-agent-skills, 1.3k stars), Erpclaw (LeoYeAI/openclaw-master-skills, 2.2k stars), Self Awareness (JimLiu/science-skills, 227 stars) and Evolving The Data Model (TriliumNext/Trilium, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Data Migration?
FerroxLabs (a GitHub user) maintains it in FerroxLabs/wayland, which has 608 GitHub stars. The repository holds 1,194 skills in this directory. The repository was last updated on October 6, 2026.
Source: FerroxLabs/wayland on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.