migrating-motoko-enhanced
OfficialUpgrade Motoko state safely with chained migrations.
System Documentation
What problem does it solve?
This Skill helps Motoko developers manage complex canister state evolution by defining a consistent chain of enhanced migration modules, avoiding unsafe or inconsistent upgrade logic.
Core Features & Use Cases
- Chained enhanced migrations: Break each state change (add/rename/drop/transform) into a dedicated migration module and rely on compiler-verified chain consistency.
- Enhanced multi-migration rules: Enforce required constraints like lexicographic ordering, uninitialized actor variables, and static actor bodies.
- Upgrade workflow for persistent actors: Use migrations for fresh deploy initialization, safe upgrades that apply only unapplied steps, and fast-forward across skipped deployments.
Use case: you are changing persistent actor state across multiple releases (e.g., initialize new fields, rename a field, and transform a type) and want the compiler to validate the full migration chain end-to-end before deploying.
Quick Start
Use the migrating-motoko-enhanced skill to generate a timestamped migrations/ chain and the corresponding actor field declarations that match the final migrated state after all modules run in lexicographic order.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: migrating-motoko-enhanced Download link: https://github.com/caffeinelabs/motoko/archive/main.zip#migrating-motoko-enhanced Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.