agentleFS
yeaight7yeaight7/agent-powerups/skills/codebase-migration-batches/SKILL.md

codebase-migration-batches

Skill6 starsChanged 4 months agoApache-2.0View on GitHub

Use when a wide refactor or migration is too large to ship as one change — API renames across many files, framework or config migrations, or mechanical codemod-backed refactors that need reviewable batches.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    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:

    Use this skill for broad, repetitive refactors that should move in slices.

    line 8
  2. Distinctive:

    Keep one migration theme per batch

    line 20
  3. Distinctive:

    Prefer deterministic codemods over manual repetition

    line 21
  4. Distinctive:

    No auto-commit, auto-push, or auto-PR

    line 24
  5. Distinctive:

    Prefer AST-aware tools when syntax matters

    line 43
  6. Distinctive:

    Use plain search/replace only for truly mechanical edits

    line 44
  7. Distinctive:

    Keep any helper scripts under versioned project control if they are reused

    line 45
  8. Distinctive:

    Run targeted tests first

    line 48
  9. Distinctive:

    Run broader validation when the batch changes shared primitives

    line 49
  10. Distinctive:

    Stop and redesign the transform if repeated manual cleanup dominates

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Codebase Migration Batches

Use this skill for broad, repetitive refactors that should move in slices.

When to Use

  • API renames across many files
  • Framework or config migrations
  • Mechanical refactors backed by codemods or search/replace rules
  • Any change where "all at once" would be too large to review safely

Core Rules

  • Define the transform precisely before editing files
  • Keep one migration theme per batch
  • Prefer deterministic codemods over manual repetition
  • Maintain a batch ledger so already-migrated files are not touched twice
  • Validate each batch before moving to the next
  • No auto-commit, auto-push, or auto-PR

Workflow

  1. Define the migration
    • What changes
    • What does not change
    • How success is measured
  2. Measure the blast radius
    • Count affected files
    • Sample representative files
    • Identify edge cases before the first codemod pass
  3. Choose batch size
    • Small enough to review and debug
    • Large enough to make visible progress
  4. Run the transform
    • Prefer AST-aware tools when syntax matters
    • Use plain search/replace only for truly mechanical edits
    • Keep any helper scripts under versioned project control if they are reused
  5. Verify the batch
    • Run targeted tests first
    • Run broader validation when the batch changes shared primitives
    • Track residual manual fixes separately from the codemod logic
  6. Advance or stop
    • Continue if the batch is stable
    • Shrink the batch if review or validation gets noisy
    • Stop and redesign the transform if repeated manual cleanup dominates

Batch Ledger

Track at least:

Batch ID
Files included
Transform rule
Validation run
Known exceptions

Verification

  • The transform was defined precisely — what changes, what does not — before the first file edit
  • Each batch held one migration theme and passed validation before the next began
  • The batch ledger records files, transform rule, validation run, and exceptions for every batch
  • No already-migrated file was touched twice; no auto-commit, auto-push, or auto-PR occurred

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.