migration-patterns

migration-patterns is a skill for Claude Code, Codex from mickeyyaya/refactoring-skills. It costs 72 tokens per session (4,790 once invoked), scanned A, original, MIT.

A guide to safer ways to split a monolith—a large application built as one unit—or move from an old database or component to a new one.

In plain words
What is it for?
Planning service extraction, database schema changes, legacy replacements, traffic cutovers, dual writes, and change-data capture with TypeScript or Go.
Why use it?
It emphasizes gradual, reversible changes that reduce data loss, downtime, and hidden coupling during high-risk migrations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Planning service extraction, database schema changes, legacy replacements, traffic cutovers, dual writes, and change-data capture with TypeScript or Go.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mickeyyaya/refactoring-skills/migration-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mickeyyaya/refactoring-skills --skill migration-patterns
Clone the repo
git clone --depth 1 https://github.com/mickeyyaya/refactoring-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migration-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/mickeyyaya/refactoring-skills/migration-patterns/github.svg)](https://agentmods.dev/skills/mickeyyaya/refactoring-skills/migration-patterns)
Your own site
<a href="https://agentmods.dev/skills/mickeyyaya/refactoring-skills/migration-patterns"><img src="https://agentmods.dev/badge/skills/mickeyyaya/refactoring-skills/migration-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migration-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/mickeyyaya/refactoring-skills/migration-patterns"><img src="https://agentmods.dev/badge/skills/mickeyyaya/refactoring-skills/migration-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,790 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.04790
Opus 5.5 $0.00029 $0.01916
Sonnet 5.5 $0.00014 $0.00958
Haiku 4.5 $0.00007 $0.00479

Measured 3mo ago against content hash 6f43c2e3a409, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

migration-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/migration-patterns/SKILL.md · 516 lines

How it starts

The opening of the file, as written. The whole thing — 516 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migration Patterns

Overview

Migrating a monolith to services, or moving a legacy database to a new schema, is one of the highest-risk engineering activities. Done wrong it causes data loss, extended downtime, and introduces coupling that is worse than the monolith it replaced. The patterns here provide incremental, reversible migration paths — each one shifts traffic or data gradually, allowing rollback at any step.

When to use: Planning service extraction from a monolith; replacing a legacy component; migrating databases without downtime; reviewing a migration PR for hidden risks.

Quick Reference

Pattern Core Idea When to Use
Strangler Fig Proxy routes traffic; new service replaces old routes incrementally Extracting services from a running monolith
Anti-Corruption Layer Adapter translates between old and new domain models Integrating two bounded contexts with conflicting models
Branch by Abstraction Abstract interface first, swap implementation behind it Replacing an internal library or module in-place
Expand-Contract Widen schema before migrating data, narrow after Database column renames, type changes, normalisation
Dual-Write Write to both old and new stores in parallel Migrating a live database with zero downtime
CDC Bridge Capture database change events and replay to new store Backfilling a new service's datastore from a legacy DB
Change Data Capture Stream row-level changes via Debezium or AWS DMS Event-driven migration, read-model population

Patterns in Detail

1. Strangler Fig

The Strangler Fig pattern (named after the tree that grows around a host) routes all traffic through a proxy. New functionality is built in the new service; the proxy redirects matching routes there. The monolith shrinks as routes migrate until it can be deleted.

Key phases:

  1. Deploy a routing proxy in front of the monolith (no traffic change yet)
  2. Build the replacement service endpoint
  3. Shadow-test: send traffic to both, compare responses, route users to new service
  4. Remove the monolith code path when confidence is high

Read the full file on GitHub · 516 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 516 lines · 72 tokens per session scan A 6f43c2e3a409

Subscribe to this mod's changes

migration-patterns is a skill published in the GitHub repository mickeyyaya/refactoring-skills (7 stars, last pushed 8mo ago), licensed MIT. It adds 72 tokens to every session and 4,790 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

migration-patterns compared with skills from other repositories

migration-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
migration-patternsmickeyyaya/refactoring-skillsSkill78mo agoMITA72Claude Code, Codex
event-store-designwshobson/agentsSkill43k6d agoMITA33Claude Code
platform-custom-field-generateforcedotcom/sf-skillsSkill1.2k3d agoApache-2.0A139Claude Code
field-service-sobject-create-configureforcedotcom/sf-skillsSkill1.2k3d agoApache-2.0A74Claude Code
durable-objectsfcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A22Claude Code
nornicdb-grpcorneryd/NornicDBSkill938todayMITA98Claude Code, Codex
firebaseericrisco/rsc-harnessSkill6825d agoMITA77Claude Code, Codex