codebase-migrate

Run large codebase migrations and multi-file refactors. Uses the Composio CLI to coordinate issue tracking, batched PRs, and CI verification while the agent executes the transforms locally across hundreds of files.

By composio-community · 458 installs

npx skills add composio-community/awesome-codex-skills --skill codebase-migrate

Source repository · Upstream listing

Codebase Migrate Coordinate framework upgrades, API renames, config rewrites, and structural refactors across hundreds of files. Local edits are driven by the agent; the [Composio CLI](https://docs.composio.dev/docs/cli) handles the surrounding ceremony: tracking issues, per batch PRs, and CI verification. When to Use Framework upgrade (React 17 → 19, Node 18 → 22, Django 4 → 5). API rename across a monorepo (e.g., getUserById → users.byId ). Config/format migration (webpack → vite, eslint → biome, jest → vitest). Any "change 200 files the same way" task that needs to ship in reviewable slices. Prereqs Local tools the agent will use directly: git , rg , jscodeshift / ts morph / comby / ast grep (language appropriate), and your test runner. Planning Phase 1. Define the transform precisely. Bad: "migrate to vitest." Good: "replace jest.mock with vi.mock , swap jest.fn() for vi.fn() , rename jest.config.js → vitest.config.ts using template X." 2. Scope the blast radius: 3. File a tracking issue: Execute in Reviewable Batches Loop: pick N files → transform → test → PR → wait for green → merge → next batch. The agent runs the codemod on batch.list , then: Then poll CI and merge when green: Workflow Script scripts/migrate batch.ts , run per batch via composio run file scripts/migrate batch.ts batch 3 : Safety Rails One transform per PR. Never mix a rename with a format change. Keep a done.list of files already migrated so the next batch skips them. Run the full test suite on the last batch , even if per batch PRs ran changed . Codemod first, hand edit second. If the codemod misses 3 files, patch them manually and note it in the PR body. Roll back per batch , not globally. Each PR should revert cleanly. Verification Loop After each merge: Troubleshooting Codemod regex catches too much → switch to AST based tooling ( ast grep , ts morph ) for structural matches. Tests pass locally, CI fails → pin Node/Python version parity; check .nvmrc / pyproject.toml . PR too big to review → cut batch size in half; maintainers won't review 800 line diffs. Conflicts between batches → rebase the open batch before merging the current one; never force push merged batches. Full CLI reference: [docs.composio.dev/docs/cli](https://docs.composio.dev/docs/cli)