code-migrate
Skill2 starsChanged 14 days agoMITView on GitHub
Inventory every use of what a migration replaces, in one repo or across an org, and batch it into plan steps with codemods
In this repository81 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- add-languageSkill
- audit-a11ySkill
- audit-archSkill
- audit-ciSkill
- audit-debtSkill
- audit-doc-driftSkill
- audit-flagsSkill
- audit-infraSkill
- audit-perfSkill
- audit-readinessSkill
- audit-securitySkill
- audit-slopSkill
- audit-testsSkill
- audit-tokensSkill
- audit-verifySkill
- backup-patternsSkill
- bash-patternsSkill
- claude-code-mods-patternsSkill
- code-challengeSkill
- code-contractSkill
- code-deep-reviewSkill
- code-evaluateSkill
- code-from-designSkill
- code-historySkill
- code-host-patternsSkill
- code-impactSkill
- code-tourSkill
- code-visualSkill
- depsSkill
- django-patternsSkill
- docker-patternsSkill
- drf-patternsSkill
- engineering-fundamentalsSkill
- fastapi-patternsSkill
- git-patternsSkill
- go-patternsSkill
- graphql-patternsSkill
- investigateSkill
- javascript-patternsSkill
- kit-rulesSkill
- logging-patternsSkill
- meta-conventionsSkill
- meta-promptSkill
- meta-refreshSkill
- meta-retroSkill
- meta-skillSkill
- monitoring-patternsSkill
- next-app-router-patternsSkill
- nuxt-patternsSkill
- opentofu-patternsSkill
- pr-descriptionSkill
- pr-publishSkill
- pr-queueSkill
- pr-replySkill
- pr-reviewSkill
- python-patternsSkill
- react-patternsSkill
- report-formatSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 60
Read-only on every repo. No codemod applied, no install, no npx of a package that isn't installed, no branch or PR.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
/code-migrate
Find every use of what a migration replaces (a major upgrade, a renamed API, a deprecated pattern) and cut the work into batches that each ship alone, with the codemod for each where one exists. The report feeds /plan. Read-only: it previews a codemod, never applies one.
Loading this skill isn't enough. Before the step a row names, read its file.
| Before | Read |
| Step 2, reading the upgrade guide and the changelog | reference/deprecation.md |
| Step 3, the inventory | reference/inventory.md |
| Step 4, choosing a codemod and previewing it | reference/codemods.md |
| Step 5, cutting batches | reference/batching.md |
Stack specifics come from the stack's pattern skill.
Procedure
- Inputs. The target and its from and to versions come from the arguments, else the manifests
kit detect-stacknames. Unclear, ask.org:switches to the org mode below. - What changes. Read the upgrade guide and the changelog between the two versions, per reference/deprecation.md: each removed or renamed API, the version that deprecated it, the version that removes it, and the vendor's codemods. A source that can't be fetched is named in the report, never filled from memory.
- Inventory. One
ast-greppattern per API from step 2, andrg -wfor what a pattern can't parse, per reference/inventory.md. Raw matches go to the report's sibling folder, one TSV row per match with the API, file, and line. - Codemods. For each API, the vendor's codemod, else an
ast-greprewrite. Preview it only with a tool already installed, and count the files it would change and the spots it leaves for hand work. - Batches. Cut the inventory into batches per reference/batching.md, each one plan step with its files, its codemod or hand edits, and the check that proves it (a test command, a type check, a zero count from step 3's pattern).
Org mode
With org:<name>, the inventory runs across the org's repos through the host's code search, by the code-host-patterns skill's "Code search across an org" row. Its limits (default branch only, a result cap, a rate limit) go in the report's Caveats.
- Code search gives a lower bound. Each repo with hits gets step 3 on a shallow clone in the report's sibling folder before its count is trusted.
- One batch per repo, in the order the repos' counts and step 2's removal versions suggest.
- A rerun at the same path reads the previous report and adds a Progress column per repo, uses left now against uses at the first run. The total counts across all repos.
Report
Load the report-format skill and use its format, written to the path kit scratch-dir migrate <target-slug> prints, with these narrowings:
- The TL;DR's first bullet is the size in place of the health word:
<N> uses in <M> files[ across <R> repos], <B> batches, <C> covered by codemods. - A Batches table with the batch, files, uses, codemod or
by hand, and the proving check. - Org mode adds a Repos table with the repo, uses, batch, and Progress on a rerun.
- Caveats list the uses a pattern can't see (strings, config, generated code), the APIs with no known removal version, and the code-search limits.
Reply
The report path and the TL;DR's first bullet.
Stop
Read-only on every repo. No codemod applied, no install, no npx of a package that isn't installed, no branch or PR.
Arguments: $ARGUMENTS
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
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.

