agentleFS
pvnarppvnarp/agent-skills/skills/migrate/SKILL.md

migrate

Skill1 starsChanged 9 months agoMITView on GitHub

Plans and executes data, schema, or system migrations safely. Covers database migrations, API version transitions, dependency upgrades, and platform moves. Use when migrating data, upgrading major versions, or transitioning between systems.

39 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use a11y, changelog and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CorentinGCSkill

    a11y

    Accessibilité web — rôles ARIA, navigation clavier, contraste, labels, focus management, semantic HTML. Appliqué automatiquement lors de la création de composants UI.

    Also in 3 projects that use this

  • HashiCorpSkill

    changelog

    Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.

    Also in 6 projects that use this

  • MicrosoftSkill

    scaffold

    Also in 3 projects that use this

  • allieraysSkill

    explain

    Explain what code does line by line so you can understand and learn from it.

    Also in 4 projects that use this

  • raven-souravSkill

    ingest

    Also in 3 projects that use this

  • AnthropicSkill

    update

    Sync tasks and refresh memory from your current activity. Use when pulling new assignments from your project tracker into TASKS.md, triaging stale or overdue tasks, filling memory gaps for unknown people or projects, or running a comprehensive scan to catch todos buried in chat and email.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 32 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Inventory what's affected: Every table, endpoint, consumer, job, cache that touches the thing being migrated.

    line 12
  2. Distinctive:

    Plan rollback: If it goes wrong at step 5 of 10, how do you undo?

    line 14
  3. Distinctive:

    Never rename a column in one step.

    line 32
  4. Distinctive:

    Never drop a column the same deploy as the code change.

    line 33
  5. Distinctive:

    Always test with production-scale data.

    line 34
  6. Distinctive:

    Never break existing clients without warning.

    line 47
  7. Distinctive:

    Check transitive dependency conflicts.

    line 66

“Common” is measured: kept by at least 6 in 10 of the 32 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Migration Planning

Migrations are the most dangerous routine operation in software. Plan carefully, execute incrementally, always have a rollback.

Before Starting

  1. Inventory what's affected. Every table, endpoint, consumer, job, cache that touches the thing being migrated.
  2. Define success criteria. How do you know the migration worked? What metrics must stay stable?
  3. Plan rollback. If it goes wrong at step 5 of 10, how do you undo? If you can't answer this, you're not ready.
  4. Estimate downtime. Zero-downtime? Maintenance window? Communicate to stakeholders.

Migration Types

Database Schema Migration

1. Write migration script (up + down)
2. Test on a copy of production data
3. Measure execution time on production-sized dataset
4. Deploy new code that handles BOTH old and new schema
5. Run migration
6. Verify data integrity
7. Remove old-schema compatibility code
8. Drop old columns/tables (after grace period)

Rules:

  • Never rename a column in one step. Add new → backfill → deploy code using new → drop old.
  • Never drop a column the same deploy as the code change. Wait one release cycle.
  • Always test with production-scale data. A migration that takes 1s on 1K rows might take 2h on 10M.
  • Lock-free migrations for large tables (add column with default, backfill in batches).

API Version Migration

1. Ship new version alongside old (v1 + v2)
2. Update clients to use v2
3. Monitor v1 traffic → 0
4. Deprecation notice with deadline
5. Remove v1 after deadline

Rules:

  • Never break existing clients without warning.
  • Version in URL path (/v2/) or header, not query param.
  • Log which version each client uses for migration tracking.

Dependency / Framework Upgrade

1. Read changelog for breaking changes
2. Check if your usage hits any breaking changes
3. Upgrade in an isolated branch
4. Fix compilation/type errors
5. Run full test suite
6. Test manually for behavioral changes not caught by tests
7. Deploy to staging, soak for 24h
8. Deploy to production

Rules:

  • Upgrade one major dependency at a time. Never batch major upgrades.
  • Pin exact versions. Update deliberately, not automatically.
  • Check transitive dependency conflicts.

System / Platform Migration

1. Run old and new in parallel (shadow mode)
2. Compare outputs - they must match
3. Gradually shift traffic (1% → 10% → 50% → 100%)
4. Monitor error rates, latency, and correctness at each step
5. Keep old system running for quick rollback
6. Decommission old system after confidence period

Migration Checklist

  • Rollback plan documented and tested
  • Success criteria defined with specific metrics
  • Data backup taken before migration
  • Migration tested against production-scale data
  • Stakeholders notified of timeline
  • Monitoring dashboards ready for during/after
  • On-call aware and available during migration
  • Post-migration verification steps documented

Output

MIGRATION: [what's being migrated]
TYPE: [schema / api / dependency / platform]
RISK: [low / medium / high]
ESTIMATED DOWNTIME: [none / Xmin / Xhour]
ROLLBACK PLAN: [how to undo]
STEPS:
  1. [step] - [verification]
  2. [step] - [verification]
  ...
POST-MIGRATION:
  - [verification check]
  - [metric to monitor]

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.