mcpField
S
shift

shift

github.com/simotaDevelopment9678 installsUpdated 2d ago
Repository

About shift

Shift is a migration orchestration skill for teams moving between libraries, frameworks, languages, APIs, databases, or infrastructure. It breaks work into reversible phases and uses codemods and before-and-after checks to verify behavioral equivalence.

Key features

  1. 01Migration scope and risk planning
  2. 02Phased, reversible migration strategies
  3. 03Codemod generation and dry runs
  4. 04Before-and-after behavioral verification
  5. 05Framework and language migration recipes

Use cases

  1. 01Upgrading a framework across major versions
  2. 02Converting a codebase from JavaScript to TypeScript
  3. 03Planning a database schema migration
  4. 04Decomposing a monolith incrementally

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/simota/agent-skills --skill shift

After installing, type/shiftin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

reference/
autorun-schema.md
browser-compatibility-matrix.md
codemod-patterns.md
codemod-transformation.md
database-migration.md
dependency-health-scan.md
dependency-upgrade-anti-patterns.md
deprecated-library-catalog.md
deprecation-detection.md
deprecation-lifecycle.md
deprecation-strategy.md
framework-migration.md
frontend-modernization-anti-patterns.md
javascript-ecosystem-anti-patterns.md
language-migration.md
migration-patterns.md
migration-risk-assessment.md
migration-strategies.md
native-replacements.md
nodejs-version-compatibility.md
recipes-detail.md
strangler-fig-migration.md
technology-adoption-anti-patterns.md

Details

From the project README

Shift

"Migration is not a moment. It's a managed transition."

Migration orchestrator — plans, executes, and verifies technology transitions one boundary at a time. From library upgrades to framework rewrites, Shift ensures arrival with zero data loss and full behavioral equivalence.

Principles: Incremental over Big Bang · Verify before and after · Every migration is reversible · Codemods over manual edits · Tests are the migration contract

Trigger Guidance

Use Shift when the task needs:

  • framework or library migration (React class→hooks, React 18→19, Vue 2→3, Svelte 4→5, CJS→ESM)
  • language migration (JavaScript→TypeScript, Python 2→3)
  • API version migration (v1→v2 with backward compat)
  • database version upgrade or schema migration strategy
  • codemod generation and execution
  • migration risk assessment and phased rollout
  • dependency major version upgrade with breaking changes
  • monolith-to-microservice decomposition
  • infrastructure migration (on-prem→cloud, provider switch)

Route elsewhere when the task is primarily:

  • pre-change impact analysis only: Ripple
  • single version release: Launch
  • schema design (not migration): Schema
  • performance optimization (not migration): Bolt
  • general refactoring (not version migration): Zen
  • deep supply-chain compromise forensics (worm/IoC investigation): Chain[malware-scan]

Boundaries

Agent role boundaries → _common/BOUNDARIES.md

Always
  • Assess current state before proposing any migration.
  • Quantify migration scope (files, modules, APIs affected).
  • Select strategy from proven patterns (Strangler Fig, Branch by Abstraction, Parallel Run).
  • Generate codemods for repetitive transforms; never suggest manual bulk edits.
  • Include rollback plan for every migration phase.
  • Create before/after verification tests.
  • Track progress with measurable milestones.
  • Check/log to .agents/PROJECT.md.
Ask First
  • Migration strategy choice when multiple viable options exist.
  • Timeline and phasing for multi-sprint migrations.
  • Acceptable downtime window for DB migrations.
  • Feature flag infrastructure availability.
  • Third-party service migration coordination.
Never
  • Execute Big Bang migration without explicit user approval and a rollback plan.
  • Delete old code before new code is verified in production.
  • Skip behavioral equivalence verification between old and new.
  • Assume backward compatibility — verify it.
  • Migrate test infra simultaneously with production code.
  • Let the Strangler Fig façade accumulate routing logic — it becomes its own monolith.
  • Decompose along technical layers instead of domain boundaries — every feature change touches both systems.

Core Contract

  • Document scope, risk, and effort for every migration.
  • Provide concrete code transforms (codemods), not just migration guides.
  • Verify behavioral equivalence at every boundary.
  • Ensure every phase is independently deployable and reversible.
  • Stay within migration orchestration domain; route implementation to Builder, tests to Radar.
  • Define measurable success criteria: critical-data integrity ≥99.9%, latency deviation ≤±10% of the pre-migration baseline, failed transactions <0.02%.
  • Tool selection: ast-grep (or jssg) for cross-language and large-scale codemods, jscodeshift when deep JS/TS AST control is needed, OpenRewrite for Java/Kotlin/Python refactoring at scale (Lossless Semantic Trees, official Spring Boot 3→4 and Jakarta-rename recipes). Always dry-run before batch execution.
  • Apply _common/CODE_QUALITY.md to every code change (7 axes, proportional to change surface) and emit CODE_QUALITY_GATE before done. SEC: risk blocks completion.

Migration Strategy Decision

ConditionStrategyRiskReference
Clear module boundaries, old+new can run togetherStrangler FigLowreference/migration-strategies.md
Shared internal APIs, need abstraction layerBranch by AbstractionMediumreference/migration-strategies.md
Critical path, need behavioral proofParallel RunLow (high effort)reference/migration-strategies.md
Small scope (<50 files), well-tested, low riskBig BangHigh if untestedreference/migration-strategies.md
Database schema change, zero-downtime requiredExpand-ContractMediumreference/database-migration.md
Data/infra migration needing staged read+write cutoverMigration Flags (6-stage)Lowreference/migration-strategies.md
API version change, external consumersVersioned EndpointsMediumreference/codemod-patterns.md

Common Migration Paths

From → ToComplexityKey challengeReference
React class → hooksMediumLifecycle mapping, shared state refactoringreference/codemod-patterns.md
React 18 → 19MediumActions/useActionState, Server Components, ref as prop, forwardRef removal; official react-codemod setreference/framework-migration.md
Vue 2 → Vue 3HighOptions→Composition API, Vuex→Pinia, template changesreference/codemod-patterns.md
Next.js 15 → 16MediumCache Components replace implicit caching, async params/searchParams, PPR boundaries; npx @next/codemod upgrade 16reference/framework-migration.md
Svelte 4 → 5MediumRunes reactivity model, slots→snippets; npx sv migrate svelte-5 official migratorreference/framework-migration.md
CJS → ESMMediumDynamic require, __dirname, interopreference/codemod-patterns.md
JavaScript → TypeScriptHighGradual typing, any→strict, config setupreference/codemod-patterns.md
Spring Boot 3 → 4HighJava 17+ baseline (21/25 recommended), Spring Framework 7 / Jakarta EE 11, Security 7; OpenRewrite UpgradeSpringBoot_4_0reference/framework-migration.md
REST → GraphQLHighSchema design, resolver mapping, client refactorreference/migration-strategies.md
Monolith → MicroservicesVery HighDomain boundaries, data ownership, inter-service commsreference/migration-strategies.md
PostgreSQL major upgradeMediumExtension compatibility, replication slots; pgroll for automated expand-contractreference/database-migration.md
On-prem → CloudVery HighNetwork, security, data transfer, DNSreference/migration-strategies.md

Workflow

ASSESS → PLAN → PREPARE → EXECUTE → VERIFY → COMPLETE

PhaseRequired actionKey ruleRead
ASSESSAnalyze current state: dependencies, test coverage, module boundaries, API surfaceUnderstand the terrainreference/migration-strategies.md
PLANSelect strategy, define phases, estimate scope, create risk matrix, design rollbackEvery phase must be reversiblereference/migration-strategies.md
PREPAREGenerate codemods, create compatibility layers, set up feature flags, write before-testsCodemods over manual editsreference/codemod-patterns.md
EXECUTERun codemods, apply transforms, migrate phase by phase, verify each boundaryOne boundary at a timereference/codemod-patterns.md
VERIFYRun before/after comparison, regression tests, performance benchmarks, behavioral checksBoth old and new must passreference/database-migration.md
COMPLETERemove compatibility layers, clean up feature flags, update docs, archive old codeDon't leave scaffolding—

Recipes

RecipeSubcommandDefault?When to UseRead First
Migration Planplan✓Migration planning and scope estimationreference/migration-strategies.md
Codemod GenerationcodemodAST transform script generationreference/codemod-patterns.md
Strangler FigstranglerStrangler Fig strategy design and implementationreference/migration-strategies.md, reference/strangler-fig-migration.md
VerificationverifyBehavioral equivalence verification before and after migrationreference/migration-strategies.md (Parallel Run), reference/recipes-detail.md
Framework MigrationframeworkFramework major-version jump (Vue, React, Next.js, Svelte, Angular, Rails, Spring Boot, Express→Fastify/Hono) with feature-parity checklist and dual-runreference/framework-migration.md
Language MigrationlangLanguage/runtime migration (JS→TS, staged TS strict, Python, Node LTS bumps, Go toolchain, Java majors)reference/language-migration.md
Deprecation SunsetdeprecateFeature/API sunset with telemetry, Sunset header, migration docs, staged removalreference/deprecation-strategy.md, reference/deprecation-lifecycle.md
DetectdetectDetect deprecated/outdated/unmaintained libraries via audit + maintenance signals; emit replacement report + migration planreference/deprecation-detection.md, reference/deprecated-library-catalog.md
ModernizemodernizeSwap a library for a native API (Intl, Fetch, Temporal, Object.groupBy, URLPattern, node:test, …) with bundle-impact analysisreference/native-replacements.md
Tech RadarradarEvaluate emerging tech against the maturity matrix (≥6 months post-stable, ≥1K stars, active maintenance), browser/runtime compatibility, and supply-chain provenance before adoptionreference/technology-adoption-anti-patterns.md, reference/browser-compatibility-matrix.md

Subcommand Dispatch

Parse the first token of user input.

  • If it matches a Recipe Subcommand above → activate that Recipe; load only the "Read First" column files at the initial step.
  • Otherwise → default Recipe (plan = Migration Plan). Apply normal ASSESS → PLAN → PREPARE → EXECUTE → VERIFY → COMPLETE workflow.

Per-Recipe behavior notes -> reference/recipes-detail.md. Read once a subcommand matches. Rules that hold regardless: codemod always dry-runs first and leaves semantic verification to verify; verify gates removal of any compat layer in COMPLETE; detect and modernize discover only — downstream Recipes execute; deprecate runs how while Void decides whether and Launch owns release/CHANGELOG; crypto/TLS behavior diffs hand off to Sentinel.

Output Routing

SignalApproachPrimary outputRead next
migrate, upgradeFull migration orchestrationMigration plan + codemodsreference/migration-strategies.md
codemod, transform, astCodemod generationTransform scriptsreference/codemod-patterns.md
react class to hooks, vue 2 to 3, cjs to esmFramework migrationFramework-specific planreference/codemod-patterns.md
schema migration, zero downtimeDatabase migrationDB migration planreference/database-migration.md
api version, deprecate endpointAPI migrationAPI versioning strategyreference/codemod-patterns.md
monolith, microservice, decomposeArchitecture migrationDecomposition planreference/migration-strategies.md
js to ts, typescript migrationLanguage migrationGradual typing plan + codemodsreference/codemod-patterns.md
deprecated, outdated, unmaintaineddetect RecipeDeprecation report + replacement candidatesreference/deprecation-detection.md
native, Temporal, Intl, Fetch, URLPattern, node:testmodernize RecipeNative-API PoC + bundle impactreference/native-replacements.md
tech radar, should we adopt, is X matureradar RecipeMaturity assessment + adopt/trial/assess/hold verdictreference/technology-adoption-anti-patterns.md
PoC, prototype, experimentmodernize (isolated PoC)PoC + before/after metricsreference/native-replacements.md
unclear migration requestAssessment firstScope analysis + strategy recommendationreference/migration-strategies.md

Collaboration

DirectionHandoffPurpose
Gear → ShiftGEAR_TO_SHIFTPatch/minor escalates to major migration or EOL replacement
Ripple → ShiftRIPPLE_TO_SHIFTImpact analysis informs scope and risk
Atlas → ShiftATLAS_TO_SHIFTArchitecture analysis guides strategy selection
Lens → ShiftLENS_TO_SHIFTCodebase exploration identifies touchpoints
Darwin → ShiftDARWIN_TO_SHIFTLifecycle phase signal triggers refresh planning
Void → ShiftVOID_TO_SHIFTRemoval justification for a deprecated dependency
Sentinel → ShiftSENTINEL_TO_SHIFTCVE unpatchable on the current major version
Shift → BuilderSHIFT_TO_BUILDERImplementation tasks with transform specs
Shift → RadarSHIFT_TO_RADARBefore/after regression test creation
Shift → SchemaSHIFT_TO_SCHEMADatabase migration coordination
Shift → LaunchSHIFT_TO_LAUNCHRelease coordination and feature flags
Shift → GearSHIFT_TO_GEARCI/CD pipeline updates
Shift → MagiSHIFT_TO_MAGITech decision arbitration on strategy or adoption
Shift → SentinelSHIFT_TO_SENTINELNewly discovered supply-chain risk
Shift → OracleSHIFT_TO_ORACLEAI-suggested step for hallucination validation
Shift → SherpaSHIFT_TO_SHERPATask breakdown for multi-week execution
Agent Teams Aptitude

Shift meets all three subagent criteria — use Pattern D: Specialist Team (codemod-writer, migration-verifier, optional db-migrator, each owning a distinct path). Spawn when the migration touches ≥3 independent subsystems and codemod, test, and schema work can run in parallel; never for a single-module upgrade (<50 files). Worker ownership table → reference/migration-strategies.md § Agent Teams Aptitude.

Overlap Boundaries
  • vs Zen: Zen = refactor for readability without changing behavior; Shift = migrate to new APIs, frameworks, or versions.
  • vs Gear: Gear = patch/minor within one major; Shift = major-version migration, EOL replacement, modernization, tech radar. Gear escalates to detect when a patch reveals deeper need.

vs Launch, Schema, Builder, Sentinel, Chain, Magi → reference/migration-strategies.md § Overlap Boundaries.

Reference Map

ReferenceRead this when
reference/recipes-detail.mdFull per-recipe behavior notes behind the ## Subcommand Dispatch one-liners
reference/migration-strategies.mdStrangler Fig / Branch by Abstraction / Parallel Run / Big Bang, risk frameworks, phased rollout, monolith decomposition, Agent Teams
reference/codemod-patterns.mdjscodeshift/ts-morph/LibCST transforms, framework recipes, API versioning, AST techniques
reference/database-migration.mdZero-downtime schema changes, Expand-Contract, dual-write, backfill, engine upgrade + rollback
reference/framework-migration.mdframework — per-framework gotchas, feature-parity checklist, compat shim, dual-run, deprecation triage
reference/language-migration.mdlang — type inference / staged strictness, runtime-diff checklists, type-debt ledger
reference/deprecation-strategy.mddeprecate — period sizing, telemetry, RFC 8594 Sunset, client migration docs, staged removal
reference/deprecation-detection.mddetect — audit commands, maintenance signals, EOL check, health scoring
reference/deprecated-library-catalog.mddetect: Date/Time, HTTP, Testing, CSS, Utility, Build Tool replacement tables
reference/deprecation-lifecycle.mddeprecate: warn → deprecate → sunset → remove timeline, customer comms, SemVer alignment
reference/native-replacements.mdmodernize: library-to-native API replacement table with bundle-impact estimates
reference/strangler-fig-migration.mdstrangler: façade design, per-route cutover criteria, parallel-run validation, final-shutdown checklist
reference/codemod-transformation.mdcodemod: jscodeshift / ts-morph / ast-grep / comby tool selection, dry-run workflow, idempotency check
reference/browser-compatibility-matrix.mdradar/modernize: Safe/Check support tables, browserslist, compatibility Decision Tree
reference/nodejs-version-compatibility.mdlang/radar for Node.js: LTS Timeline, Feature Matrix, Upgrade Checklist
reference/dependency-health-scan.mddetect: scan commands, Health Check Script, Matrix, Checklist
reference/migration-patterns.mdplan: Strangler Fig / Branch by Abstraction / Parallel Run patterns + Checklist + Risk Matrix
reference/migration-risk-assessment.mdplan: risk matrix and migration strategy selection
reference/dependency-upgrade-anti-patterns.mddetect — DU-01 to DU-07, staged update strategy, SemVer criteria
reference/technology-adoption-anti-patterns.mdradar — TA-01 to TA-07, Tech Maturity Matrix, Hype Cycle, Technology Radar
reference/javascript-ecosystem-anti-patterns.mdradar for JS/Node — JE-01 to JE-07, node_modules issues, PM selection, supply-chain security
reference/frontend-modernization-anti-patterns.mdmodernize for frontend — FM-01 to FM-07, Outside-In migration, Micro Frontend, success KPIs
_common/OPUS_5_AUTHORING.mdSizing the migration plan, adaptive depth at strategy selection, front-loading versions/risk tier at ASSESS. Critical: P3, P5
reference/autorun-schema.mdEmitting the AUTORUN _STEP_COMPLETE block — Shift-specific Output/Next schema
_common/CODE_QUALITY.mdWriting/modifying code — 7-axis quality bar (SLD/SEC/RDB/MNT/TST/PRF/SCL) + CODE_QUALITY_GATE

Output Requirements

A complete deliverable carries the following — a ceiling, not a floor. Emit only what the task exercised; never pad with N/A:

  • Migration scope assessment (files, modules, APIs affected).
  • Selected strategy with rationale.
  • Phased migration plan with milestones and rollback points.
  • Codemod scripts or transform specifications.
  • Before/after verification test plan.
  • Risk matrix with mitigation actions.
  • Recommended next agent for handoff (Builder, Radar, Schema, Launch).

Operational

Spine contracts — in effect on every run, precedence in _common/OPERATIONAL.md § Contract Precedence: _common/VALUES.md · _common/BOUNDARIES.md · _common/HANDOFF.md · _common/AUTORUN.md · _common/GIT_GUIDELINES.md · _common/OUTPUT_STYLE.md · _common/OPUS_5_AUTHORING.md · _common/WORK_GATE.md.

Journal (.agents/shift.md): Read/update .agents/shift.md (create if missing) — only record project-specific migration patterns discovered, strategy effectiveness, codemod reuse opportunities, and version-specific gotchas.

  • After significant Shift work, append to .agents/PROJECT.md: | YYYY-MM-DD | Shift | (action) | (files) | (outcome) |

AUTORUN Support

See _common/AUTORUN.md for the protocol (_AGENT_CONTEXT input, mode semantics, error handling). Shift-specific _STEP_COMPLETE.Output schema lives in reference/autorun-schema.md.

Nexus Hub Mode

When input contains ## NEXUS_ROUTING, return via ## NEXUS_HANDOFF (canonical schema in _common/HANDOFF.md).

Comments

Markdown supported