agentsclimarketplace

Typed rewrite migration

Skill selamy-labs/agent-skills/skills/typed-rewrite-migration

Use when migrating an untyped or legacy core to a typed/rewritten one without a risky big-bang cutover. Strangle it incrementally behind a stable boundary, run old and new in parallel to prove equivalence, and cut over slice by slice while both stay green.From its SKILL.md

Install
npx -y skills add selamy-labs/agent-skills --skill typed-rewrite-migration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.6 KB, 564 tokens by cl100k_base, as published. Nobody here has run it

Typed-Rewrite Migration

A big-bang rewrite of a system that's in use is how you ship a quieter, more confident outage. The safe path is a strangler: stand the new typed core up behind a boundary, move one slice at a time, and prove equivalence with the old one before you trust it. The migration is reversible at every step until the last.

The playbook

  1. Draw the boundary first. Put a stable interface (a function seam, a proto/API contract, an adapter) between callers and the thing you're rewriting. Nothing downstream should know which implementation answers.
  2. Parse at the edge into the new types. Inbound data becomes typed values at the boundary (parse-don't-validate); the new core only ever sees legal states, so the rewrite isn't also re-litigating validation.
  3. Run old and new in parallel (shadow). For each request, run both, return the old result, and compare — log every divergence. This is where property/oracle tests shine: the property is "new agrees with old for all inputs." Divergences are your real spec, written down at last.
  4. Cut over per slice, behind a flag. When a slice's divergences are zero (or explained and accepted), flip it to the new path — runtime-tunable, no redeploy. Keep the old path one flag-flip away.
  5. Delete the old slice in the same change that proves the new one. Adopt- and-delete: the cutover commit removes the superseded code so there's never a limbo of two live implementations drifting apart.

Why each step matters

  • The boundary is what makes it incremental instead of all-or-nothing.
  • Parallel-run turns "I think it's equivalent" into evidence, and surfaces the undocumented behaviors every legacy system has.
  • Per-slice flags keep blast radius tiny and rollback instant — the cutover is a config change, not a deploy.
  • Delete-on-cutover prevents the most common rewrite failure: a half-migrated system maintained in two places forever.

Smells

  • "We'll switch everything over on release day" — no parallel-run, no rollback; you're betting the system on untested equivalence.
  • New and old both live for months with no deletion date — the rewrite became a permanent tax instead of a migration.
  • Cutover gated on a redeploy instead of a flag — slow, coarse, scary rollbacks.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most editing proofreading skills give in 564 tokens

Counted across 116 of the 148 authors here whose files we hold, read 2026-09-06

  • Ground factual claims in real source materialin 5 of 116, across 2 files
  • Ask for the text if none suppliedin 5 of 116, across 2 files
  • Fix grammar, spelling, and punctuation errorsin 5 of 116
  • Prefix the first line with 🥷 inlinein 4 of 116, across 1 file
  • Confirm the audience before editing when unclearin 4 of 116, across 1 file
  • Detect language from the text being editedin 4 of 116, across 1 file
  • Read the loaded reference file before editingin 4 of 116, across 1 file
  • Preserve meaning when removing AI patternsin 4 of 116, across 1 file
  • Edit in place without restructuringin 4 of 116, across 1 file
  • Match the target audience's registerin 4 of 116, across 1 file
  • Read the latest release as a style referencein 4 of 116, across 1 file
  • Iterate copy against real product screenshots until alignedin 4 of 116, across 1 file

Said here and by no other author read

  • Draw a stable boundary between callers and the rewritten core
  • Parse inbound data into typed values at the edge
  • Run old and new implementations in parallel
  • Return the old result during shadow runs
  • Log every divergence between old and new
  • Cut over one slice at a time behind a flag

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.