# Migration loop

> Migration loop is an open-source agent skill for developer tools. Migrates a fixed set of code targets one at a time, verifying with tests and grep. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ivy00johns/Skill-Madness/tree/main/skills/loops/migration-loop
- **Repository:** https://github.com/ivy00johns/skill-madness
- **GitHub stars:** 12
- **License:** MIT
- **Skill name:** migration-loop
- **Collection:** https://github.com/ivy00johns/Skill-Madness
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

Migration loop works through an enumerated list of targets, applying the same transform to one target per iteration. After each change it re-runs the full test suite, commits a checkpoint named for that target, and marks the target done in a checklist file. Every entry starts as not migrated, so the loop assumes the job is unfinished until the evidence shows otherwise.

Completion requires three things observed together: every checklist entry is marked migrated, the whole suite exits successfully, and a grep for the legacy pattern returns zero matches. The loop treats a green suite alone as insufficient, since it only shows that touched code still works. It also covers an expand, migrate, contract sequence for changes that would break many call sites at once, and it stops and escalates when progress stalls for several rounds instead of weakening the grep or skipping tests.

The skill is written for Claude Code, depends on a companion loop-controller skill for guardrails, and can dispatch to fix-until-green or the database migration role for schema changes. It works with Read, Write, Edit, Bash, Grep, Glob and Agent tools, and relies on git for per-target checkpoint commits.

## When your agent uses it

> Migrate an enumerated set of targets one per iteration: transform, verify the suite stays green, checkpoint, mark done, until every target is migrated and a grep for the old pattern returns zero. Use for codemods, framework or test-runner swaps, API version bumps, renames across a repo. Trigger on "migrate everything from X to Y", "run the codemod across the repo", "finish the migration".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/migration-loop)
- [Asks for: Read, Write, Edit, Bash, Grep, Glob, Agent](https://github.com/ivy00johns/Skill-Madness/blob/HEAD/skills/loops/migration-loop/SKILL.md)
- [License: MIT](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/migration-loop)

## Features

- **Enumerated target checklist:** Builds a default-fail JSON checklist of every occurrence to migrate, with old-to-new mappings.
- **One target per iteration:** Transforms a single target, runs the suite, and commits a checkpoint before advancing.
- **Legacy pattern grep proof:** Confirms completion with a grep for the old pattern returning zero matches.
- **Expand, migrate, contract mode:** Sequences breaking changes as add-new, migrate call sites in batches, then remove the old form.
- **Stall and cap guardrails:** Stops and escalates after repeated no-progress rounds or when iteration caps are reached.
- **Parallel worktree fan-out:** Supports splitting large uniform sets across isolated worktrees for parallel migration.

## Good for

- Migrate every test file from Jest to Vitest
- Run a codemod across the whole repository
- Rename a function or import everywhere it is used
- Bump an API version across all call sites
- Finish a framework migration until no old usages remain

## Install

### Claude Code

This skill ships in the `skill-madness` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness
```

Or copy only this skill to `~/.claude/skills/migration-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/migration-loop &&
cp -R "$tmp/skills/loops/migration-loop" ~/.claude/skills/migration-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/migration-loop` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/migration-loop` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/migration-loop &&
cp -R "$tmp/skills/loops/migration-loop" ~/.agents/skills/migration-loop &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/migration-loop` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/migration-loop` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/migration-loop &&
cp -R "$tmp/skills/loops/migration-loop" ~/.cursor/skills/migration-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/migration-loop` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ivy00johns/Skill-Madness.git --path skills/loops/migration-loop
```

Or copy the folder to `~/.gemini/skills/migration-loop` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/migration-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/migration-loop &&
cp -R "$tmp/skills/loops/migration-loop" ~/.copilot/skills/migration-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/migration-loop` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git
```

Then copy `Skill-Madness/skills/loops/migration-loop` into your agent's skills folder as `migration-loop`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Migration loop need to run?

It requires Claude Code, a test suite the transform can be verified against, and git for per-target checkpoint commits. It uses Read, Write, Edit, Bash, Grep, Glob and Agent tools.

### Does Migration loop change the database?

Reversible code transforms run without a human check, but irreversible resources such as live database schema migrations pause for human approval and are routed to a separate database migration role.

### How does Migration loop know the migration is complete?

It requires every checklist entry marked migrated, the full test suite exiting 0, and a grep for the legacy pattern returning zero matches, all observed together.

### Can Migration loop run automatically?

Model invocation is disabled, so it runs when a user types the command or when the orchestrator dispatches it, not automatically.

### How do I install Migration loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/migration-loop to use it in all your projects, or to .claude/skills/migration-loop in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

### Does Migration loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Migration loop?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Migration loop?

The closest alternatives to Migration loop are Autonomous loops, Migrate to codex, Figure it out, Migrate legacy and Coverage loop.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Autonomous loops](https://ai-powered.com/skills/autonomous-loops): Autonomous loops is an open-source agent skill for developer tools.
- [Migrate to codex](https://ai-powered.com/skills/migrate-to-codex): Migrate to codex is a free agent skill for developer tools.
- [Figure it out](https://ai-powered.com/skills/figure-it-out): Figure it out is an open-source agent skill for developer tools.
- [Migrate legacy](https://ai-powered.com/skills/migrate-legacy): Migrate legacy is an open-source agent skill for developer tools.
- [Coverage loop](https://ai-powered.com/skills/coverage-loop): Coverage loop is an open-source agent skill for developer tools.
- [Project retrofit](https://ai-powered.com/skills/project-retrofit): Project retrofit is an open-source agent skill for developer tools.
- [Autonomous loops](https://ai-powered.com/skills/autonomous-loops-abdullayevtemurmalik): Autonomous loops is an open-source agent skill for developer tools.
- [Optimize loop](https://ai-powered.com/skills/optimize-loop): Optimize loop is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/migration-loop
