agentleFS
ku5icku5ic/claude-kit/skills/code-migrate/SKILL.md

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

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
  1. Very specific:

    Read-only on every repo. No codemod applied, no install, no npx of a package that isn't installed, no branch or PR.

    line 60

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/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.

BeforeRead
Step 2, reading the upgrade guide and the changelogreference/deprecation.md
Step 3, the inventoryreference/inventory.md
Step 4, choosing a codemod and previewing itreference/codemods.md
Step 5, cutting batchesreference/batching.md

Stack specifics come from the stack's pattern skill.

Procedure

  1. Inputs. The target and its from and to versions come from the arguments, else the manifests kit detect-stack names. Unclear, ask. org: switches to the org mode below.
  2. 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.
  3. Inventory. One ast-grep pattern per API from step 2, and rg -w for 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.
  4. Codemods. For each API, the vendor's codemod, else an ast-grep rewrite. Preview it only with a tool already installed, and count the files it would change and the spots it leaves for hand work.
  5. 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

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.