/skill-madness:migration-loopfrom skill-madness
Migrates an enumerated set of targets one per iteration: transform, verify tests pass, checkpoint commit, mark done. For codemods, framework swaps, API version bumps, or renames across a repo.
Ships in skill-madness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A configuration of
loop-controller. That skill supplies the loop machinery — primitive selection, the full guardrail stack, state externalization. This skill supplies the two things specific to "migrate a fixed set of targets to completion": a default-FAIL target checklist driven one entry per iteration, and a proof that no legacy pattern remains (a grep for the old pattern returning zero), not merely "tests pass." Readloop-controllerfor the guardrails; they're inherited, not repeated here.Why
disable-model-invocation: this loop edits and commits code on its own — a checkpoint commit per migrated target — until the whole set is done. You want to type/migration-loop(or have the orchestrator dispatch it) — not have Claude silently start rewriting every file because it noticed an old API.
| Part | This loop |
|---|---|
| trigger | a finite, enumerable set of targets needs the same transform (a codemod, a Jest-to-Vitest swap, an API version bump, a framework/import rename), plus a way to verify behaviour is preserved — or an explicit /migration-loop (optionally scoped to one path) |
| action | ONE iteration: pick the next "migrated": false target from the checklist → apply the transform to just that target → run the suite to confirm behaviour-identical → on green, commit a checkpoint naming the target → flip its checklist entry to true |
| proof | EVERY checklist entry "migrated": true AND the full suite exits 0 AND a grep for the legacy pattern returns zero matches — default-FAIL: assume incomplete until all three artifacts (the checklist, the suite exit code, the grep count) are observed together |
| memory | migration-checklist.json (one default-FAIL entry per target + the old→new mapping), PROGRESS.md (what's migrated / next), a git checkpoint commit per migrated target |
| stop | all three proof artifacts hold OR iteration cap OR no-progress for 3 rounds OR budget cap OR an HITL checkpoint for an irreversible target (see Guardrails) |
"Done" is not "the suite is green." A green suite proves the targets you touched still behave — it says nothing about the ones you missed. The thing that distinguishes a real migration from a partial one is the third artifact: a grep for the legacy pattern returning zero. Three signals, all required, all default-FAIL (assume not-done until each is observed):
migration-checklist.json is
"migrated": true. Each starts false and only flips when that target is
transformed and its checkpoint commit lands.loop-controller Step 5, "re-verify the whole").grep -r '<legacy-pattern>' returns zero across the migrated scope —
the mechanical proof that no call site, import, or usage was skipped. Pin the
exact pattern(s) in the checklist so every iteration (and the final check)
greps the identical string. A non-zero count is a finding: a missed
target, not a passing migration.Building the checklist/mapping, choosing the pattern(s), and the
"no legacy pattern remains" verification are detailed in
references/migration-checklist.md.
Discover the full target set before looping — a migration over a set you
haven't fully enumerated cannot prove completion. Use Grep/Glob to find every
occurrence of the legacy pattern, dedupe to a target list, and write each as a
JSON entry with "migrated": false, the old→new mapping, and the exact grep
pattern. Store it at the profile-defined path (default
migration-checklist.json). The checklist is the loop's scope: if a target
isn't on it, the loop won't migrate it, and the final grep will catch the gap.
/goal, default) — one target per iteration. Use when targets
are interdependent, the transform is subtle, or the set is small enough that
per-target review matters. The Haiku evaluator reads the suite output and the
grep count you surface each turn./batch / dynamic workflow) — for large, mechanically uniform
sets (hundreds of identical codemod sites). Fan out across worktree-isolated
subagents (compose the orchestrator's Workflow mode), each migrating a slice
and committing in its own worktree. Cap build/test parallelism at 1 per
worktree (loop-controller Step 5) — two builds at once destroy the
backpressure signal. The whole-set grep + suite still run once after the merge
as the single proof. The decision rule and the fan-out shape are in
references/migration-checklist.md.Apply the transform to one target (or one worktree slice). Then run the
full suite — a migration is only valid if behaviour is preserved, so the test
gate is the per-iteration verifier. If the suite goes red, the transform changed
behaviour: fix it (or invoke fix-until-green if it's a non-trivial gate
failure) before moving on — never advance the checklist over a red suite. On
green, commit a checkpoint naming the migrated target, then flip its entry to
true. The commit-per-target trail is the loop's undo: git reset --hard to the
last green target is cheaper than rescuing a wedged transform.
After the last target, run all three proof artifacts together: the checklist must
be fully true, the full suite must exit 0, and the legacy-pattern grep must
return zero. A non-zero grep with a "fully migrated" checklist means a target
was missed during enumeration — add it and loop. When all three hold on one pass,
the loop is done; report the final checklist, the suite exit code, and the
grep -c output (zero) as evidence.
Inherits the full stack from loop-controller → references/safety.md. The caps
this loop sets:
.claude/profile.yaml if set); for fan-out, a hard cap on concurrent worktrees.
Hitting the cap is a stop-and-escalate, not a license to relax the grep or
mark targets done without migrating them."migrated": false (or the
legacy grep count stops dropping) for 3 consecutive rounds, stop and
escalate. The same target failing three times means the transform is wrong, not
that it needs a fourth try."migrated": true without transforming it, narrowing the grep pattern so it
reports zero while usages remain, or deleting/skipping a test to keep the suite
green over a behaviour change. A zero grep that came from a weakened pattern is
not a migration.loop-controller
guardrail 4): pause for the human, and route the schema-migration case to
db-migration-agent, which owns up/down migrations, dry-runs, and rollback.Per loop-controller Step 1, by the target set:
/goal for sequential one-target-per-iteration: the proof is
provable from the suite output + the grep count you surface, so
/goal "every entry in migration-checklist.json is migrated:true, the full suite exits 0, and a grep for the legacy pattern returns zero — or stop after N turns." Remember the embedded turn cap — /goal has no native budget./batch / dynamic workflow for large parallel sets with worktree isolation
(hence Agent in allowed-tools), composing the orchestrator's Workflow
mode. The whole-set grep + suite run once after merge as the proof.This is the Migration inner loop (archetype 6). The orchestrator dispatches
it for a planned migration, routing per-file failures back to the owning role
by file (a red suite in src/api/ goes to the backend agent). The
orchestrator does not override a stuck loop — if migration-loop escalates
after no-progress, that's a real migration blocker, not a number to paper over. A
fully-migrated checklist informs the build; the qe-agent's qa-report.json
still decides the gate (loop-controller's rule: the loop informs, the gate
decides).
A single mechanical change whose blast radius breaks thousands of call sites in one motion — rename a column, retype a shared symbol, change a core signature — can't run as the normal migrate-and-verify loop: every batch is red until the last one lands. Sequence it expand → migrate → contract instead:
Wire the stages as three checklist phases — the contract stage is its own target
whose transform is the deletion. When batches can't stay green alone (deeply
entangled sites), fall back to a shared integration branch that merges only when
the whole set is green. (Adapted from mattpocock engineering/to-tickets
v1.1.0; CB-9.)
A long migration is exactly where the Claude 5 long-run rules earn their keep
(drop-in text: model-adaptation → references/long-run-hygiene.md):
true only on the
observed pair (suite exit 0 + checkpoint commit hash) for that target; a
PROGRESS.md line without both is fabrication, not progress..claude/profile.yaml;
don't show the model a countdown, and don't let a long set trigger
summarize-and-quit — the checklist externalizes exactly where to resume.medium/low;
reserve high/xhigh for a transform that reds the suite (tiering:
model-adaptation).fix-until-green — that loop drives a failing suite to green; this
loop drives a fixed target set to fully migrated. The suite green is only one
of three proof artifacts here; the load-bearing one is the legacy-pattern grep.
This loop invokes fix-until-green when a transform reds the gate.db-migration-agent — that role owns a single irreversible schema
migration (up/down, dry-run, rollback) as an HITL operation; this loop drives a
set of reversible code transforms to completion and delegates the schema
case to it at the HITL checkpoint.references/migration-checklist.md —
building the target checklist/mapping (the migration-checklist.json
default-FAIL schema with a worked example), the sequential-vs-/batch-fan-out
decision and the worktree-isolation shape, and the "no legacy pattern remains"
verification (choosing the grep pattern, scoping it, and reading the count).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ivy00johns/skill-madness --plugin skill-madness87 skills in this plugin
/accessibility-auditAudit and fix web accessibility against WCAG 2.2 AA, Section 508 and the ADA: axe scan, keyboard, screen-reader and zoom checks, plain-language content and PDFs, source fixes, and an honest conformance report (ACR/VPAT draft). Use for any a11y review, fix or compliance question. Trigger on "accessibility audit", "is this ADA compliant", "Section 508", "WCAG", "VPAT", "a11y"./andonRun work through a live Andon board (the kanban that dispatches cards to Claude Code, Codex and Gemini on your machines): push a plan's cards with the skills each run must load, read the board, answer what needs you, administer a machine, and refresh this skill when Andon changes. Trigger on "/andon", "put this plan on andon", "what needs me on andon", "why isn't my card running".
/architecture-rescueFind deepening opportunities in a codebase (shallow modules, missing seams, leaky abstractions) and present them as numbered candidates for a grilling session before any interface is proposed. Use when the code feels tangled or hard to test. Trigger on "improve architecture", "rescue this codebase", "find refactoring opportunities", "ball of mud", "shallow modules"./artifact-publishPublish a visual or interactive result as a Claude Code Artifact: a self-contained HTML or Markdown page on a private, shareable claude.ai link instead of a local file. Use when a dashboard, report, chart, diagram or prototype reads better as a page. Not the claude.ai design canvas (claude-design-brief). Trigger on "publish this as an artifact", "make a shareable link", "give me a link to this"./babysitKeep an open PR healthy on a schedule: poll for review activity, auto-address bot and Copilot nits and routine rebases, re-run the gate, until the PR is mergeable. HITL on anything irreversible; never auto-merges. The scheduled loop around git-pr-feedback, run as "/loop 5m /babysit". Trigger on "babysit my PR", "watch this PR", "keep my PR green", "keep the PR rebased"./backend-agentBuild API servers, business logic and data layers against authored contracts. Use in native orchestrator dispatch or explicitly requested solo backend implementation; load it when the orchestrator assigns this role or the user asks for it.Other plugins' skills for the same job