Data Migration Strategy logo

Data Migration Strategy

Community
me-shaon
data-migration-strategy

Plan safe Laravel data migrations with phased rollout, backfills, double writes, verification, and rollback.

Overview

Publisherme-shaon
Repositoryagent-skills
Skill namedata-migration-strategy
Stars
27
Forks
5
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by me-shaon on GitHub. Read the source before you install it.

Installation

Install the Data Migration Strategy AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/me-shaon/agent-skills/tree/main/skills/data-migration-strategy
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/me-shaon/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/data-migration-strategy .claude/skills/data-migration-strategy
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Data Migration Strategy in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Data Migration Strategy on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Data Migration Strategy is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Data Migration Strategy

When to use

Use this skill when a Laravel project needs a schema or data-shape change that cannot be done safely in one step. It is most useful for table splits, column renames, type changes, new canonical data structures, dual-write rollouts, backfills, phased cutovers, and cleanup of stale read/write paths.

Input parameters

  • The current and target data model or schema shape.
  • Relevant migrations, models, repositories, services, jobs, commands, and controllers.
  • Table size, write volume, downtime tolerance, and rollback constraints.
  • Whether double writes, dual reads, backfills, or feature flags are acceptable.
  • Any consistency requirements, external dependencies, or compliance constraints.

Procedure

  1. Identify the migration type and risk level. Clarify whether this is a pure schema change, a large data backfill, a write-path migration, a read-path migration, or a full expand-contract rollout.
  2. Inspect the current read and write paths in Laravel code. Review migrations, Eloquent models, casts, observers, jobs, commands, queue workers, APIs, admin tooling, and reporting queries to see where old and new data structures are touched.
  3. Choose the safest strategy for the scenario. Prefer:
    • direct migration only for small, low-risk, reversible changes
    • expand-contract for production schema evolution
    • double writes when old and new structures must stay in sync during rollout
    • dual reads or read fallbacks during cutover when consumers switch gradually
    • chunked queued backfills for large datasets
  4. Design the rollout in phases. Usually this means Preparation, Schema expansion, Write compatibility, Backfill, Verification, Read cutover, Cleanup, and Old path removal.
  5. Build safety controls into the plan. Call out feature flags, idempotent jobs, chunking with chunkById, upsert or updateOrInsert, queue isolation, progress tracking, canary rollout, metrics, row-count or checksum validation, and operator-visible rollback checkpoints.
  6. Review rollback and failure handling explicitly. Identify which phases are reversible, when double writes can be disabled, how stale reads are prevented, how failed backfills are retried, and what should happen if old and new data diverge.
  7. Return a scenario-specific recommendation under Recommended strategy, Phase plan, Verification steps, Rollback plan, and Cleanup plan. Keep the answer practical, conservative, and grounded in the actual Laravel codebase.

Output expectations: return the safest migration strategy for the scenario, a phased rollout plan, verification steps, rollback guidance, and the final cleanup sequence.

Examples

Prompt 1:

text
Use data-migration-strategy for a Laravel app where we need to move invoice line items into a new normalized table without losing writes during rollout. Suggest whether we need double writes, backfills, and read cutover steps.

Prompt 2:

text
Review this Laravel data migration plan for moving user profile data from a JSON column into dedicated columns. We need low risk, rollback safety, and staged cleanup of the old read path.

JSON:

json
{
  "skill": "data-migration-strategy",
  "context": {
    "scenario": "move denormalized order metadata into normalized tables",
    "constraints": ["zero_downtime", "high_write_volume", "rollback_required"],
    "techniques": ["double_write", "queued_backfill", "read_fallback"],
    "files": ["database/migrations", "app/Models", "app/Jobs", "app/Services"]
  }
}

Code example:

php
DB::transaction(function () use ($user, $payload): void {
    // Write the new structure first and keep the legacy path in sync until cutover.
    UserProfile::updateOrCreate(
        ['user_id' => $user->id],
        [
            'timezone' => $payload['timezone'],
            'locale' => $payload['locale'],
        ]
    );

    if (config('data_migrations.keep_legacy_profile_json_in_sync')) {
        $user->forceFill([
            'profile' => array_merge($user->profile ?? [], [
                'timezone' => $payload['timezone'],
                'locale' => $payload['locale'],
            ]),
        ])->save();
    }
});

Smoke test

Run the skill on a Laravel migration scenario that requires a new table, a large backfill, and staged cutover from old reads and writes to new ones. Verify that the response recommends an appropriate expand-contract or double-write strategy, includes verification and rollback steps, and delays destructive cleanup until after validation.

Frequently asked questions

What does the Data Migration Strategy AI skill do?

Plan safe Laravel data migrations with phased rollout, backfills, double writes, verification, and rollback.

Why use Data Migration Strategy on TypingMind?

Because you install it once and use it with any model. Data Migration Strategy is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Data Migration Strategy in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/me-shaon/agent-skills/tree/main/skills/data-migration-strategy. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Data Migration Strategy?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Data Migration Strategy?

As many as you like. As long as a model supports skills, you can use Data Migration Strategy with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Data Migration Strategy AI skill free?

Yes. It is published on GitHub by me-shaon under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇