data-migration-best-practices

data-migration-best-practices is a skill for Claude Code, Codex from OKHP3/skillz. It costs 74 tokens per session (842 once invoked), scanned A, original, MIT.

Operational guidance for treating a data migration as a temporary production system with checks for correctness, capacity, progress, and recovery. It covers snapshots, live changes, batching, reconciliation, and cutover.

In plain words
What is it for?
Designing resumable backfills, synchronizing live changes, comparing source and target data, and safely switching systems.
Why use it?
It helps prevent stale, missing, duplicated, or inconsistent data during large moves between schemas, databases, services, or storage systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Designing resumable backfills, synchronizing live changes, comparing source and target data, and safely switching systems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okhp3/skillz/data-migration-best-practices
View source ↗ OKHP3/skillz
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.

Any agent
npx skills add OKHP3/skillz --skill data-migration-best-practices
Clone the repo
git clone --depth 1 https://github.com/OKHP3/skillz

Made for: Claude Code, Codex.

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-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/okhp3/skillz/data-migration-best-practices/github.svg)](https://agentmods.dev/skills/okhp3/skillz/data-migration-best-practices)
Your own site
<a href="https://agentmods.dev/skills/okhp3/skillz/data-migration-best-practices"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/data-migration-best-practices/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 data-migration-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/okhp3/skillz/data-migration-best-practices"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/data-migration-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 842 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.00074 $0.00842
Opus 5 $0.00037 $0.00421
Sonnet 5 $0.00015 $0.00168
Haiku 4.5 $0.00007 $0.00084

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

Security

Grade A, and why

data-migration-best-practices 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 6d 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.

community/data-migration-best-practices/SKILL.md · 63 lines

How it starts

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

Data Migration Best Practices

Treat migration as a temporary production system with explicit correctness, capacity, observability, and retirement criteria. It changes persisted behavior and is not automatically a refactoring.

Workflow

  1. Define source authority, target contract, transformations, invariants, data classification, and tolerated downtime/staleness.
  2. Choose a stable snapshot boundary or high-water mark and start durable capture of live changes before they can escape the snapshot.
  3. Expand the target schema compatibly; keep old and new application versions interoperable during rolling deployment.
  4. Backfill in bounded, idempotent, resumable batches with deterministic progress and explicit bad-row handling.
  5. Apply captured deltas without allowing stale snapshot data to overwrite newer writes.
  6. Reconcile availability, counts, identities, values, and domain invariants against a declared watermark.
  7. Cut over only when freshness and discrepancy gates pass; monitor and retain a reversal or forward-repair path.
  8. Contract old fields, code paths, capture infrastructure, and temporary permissions only after an observation window.

Decision Rules

  • Prefer direct transactional SQL for small same-database transformations that fit the lock and deployment budget.
  • Prefer an offline bulk importer for heterogeneous stores or transformations that need application code.
  • Prefer lazy/on-read migration only when incomplete migration is acceptable indefinitely and concurrent misses use atomic upsert.
  • Combine a bounded snapshot with Outbox, CDC, or event capture when writes must continue during a long migration.
  • Use expand-and-contract for online schema changes: add compatible shape, deploy tolerant readers/writers, populate, validate, switch authority, then remove legacy shape.
  • Use forward repair rather than destructive rollback once new writes cannot be losslessly represented by the old model.

Safety Invariants

  • Preserve a stable source identity and transformation version for every target row.
  • Make reruns harmless through upserts, compare-and-set/version guards, or processed-range records.
  • Advance checkpoints only after the batch transaction commits; never use offset pagination over a changing source.
  • Order by an immutable key and use keyset/range batches. Multiple workers need disjoint ranges or durable claims.
  • Bound reads, writes, concurrency, retries, memory, and lock time against live-traffic capacity.
  • Quarantine malformed or constraint-violating rows with redacted diagnostics; never convert infrastructure failure into valid empty data.
  • Parameterize queries and keep credentials out of commands, source files, logs, and process arguments.
  • Record who approved cutover, the exact watermark, artifacts, checksums, code/schema versions, and repair decisions.

Read the full file on GitHub · 63 lines

Files

What ships with it

2 files 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. 6d ago First seen · 63 lines · 74 tokens per session scan A 3df0130041c7

Subscribe to this mod's changes

data-migration-best-practices is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 842 once invoked, about $0.0004 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-09-03.