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.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.svg" alt="Measured on agentmods" 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 $0.00036 $0.02395
Sonnet 5 $0.00014 $0.00958
Haiku 4.5 $0.00007 $0.00479

Measured 7d ago against content hash 6f43c2e3a409, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 7d 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. 7d 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 (6 stars, last pushed 5mo ago), licensed MIT. It adds 72 tokens to every session and 4,790 once invoked, about $0.0004 per session on Opus 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

Other skills, from other repositories

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

convex-explain-app

Explain an existing Convex app — data model + relationships, public vs internal functions, auth/ownership model, components, a request→data flow — read from the schema and function surface. Read-only.

openclaw/clawhub · 47 tokens

platform-custom-field-generate

Use this skill when users need to create, generate, or validate Salesforce Custom Field metadata. Trigger when users mention custom fields, field types, Roll-up Summary fields, Master-Detail relationships, Lookup relationships, formula fields, picklists, dependent (controlling) picklists, referencing a value set from…

forcedotcom/sf-skills · 194 tokens

openloomi-api

OpenLoomi ships a local-first HTTP API served from the desktop app (port 3414, fallback 3515). All auth, Memory, AI, RAG, Loop, and Audit data live in a local SQLite database — your data stays on your machine and the OpenLoomi app is the source of truth. The only externally-routed auth path is the Composio OAuth…

melandlabs/openloomi · 106 tokens

nornicdb-grpc

Drive NornicDB over gRPC — the Qdrant-compatible surface (Collections, Points, Snapshots) plus the additive NornicSearch service. Use when ingesting via Qdrant SDKs, migrating from Qdrant, or running hybrid text+vector search from a non-Bolt client. Covers connection, RPC catalog, collection→database mapping…

orneryd/NornicDB · 98 tokens

field-service-sobject-create-configure

Headless 360 REST API deployment step for creating sObject records. Handles describe-based field discovery, required-field derivation, entity-relationship ordering, and composite graph transactions. Use this skill when a designer skill (or a user directly) needs to create sObject records after design confirmation…

forcedotcom/sf-skills · 74 tokens