Persist canister state across upgrades. Covers StableBTreeMap and MemoryManager in Rust, persistent actor in Motoko, and upgrade hook patterns. Use when dealing with canister upgrades, data persistence, data lost after upgrade, stable storage, StableBTreeMap, pre_upgrade traps, or heap vs stable memory. Do NOT use for inter-canister calls or access control — use multi-canister or canister-security instead.
$npx -y skills add dfinity/icskills --skill stable-memoryInstalls into the current project.
Run `npx skills use "https://github.com/dfinity/icskills" --skill "dfinity/icskills/stable-memory"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/dfinity/icskills" that are relevant to the current task. Run `npx skills add "https://github.com/dfinity/icskills"` and select the relevant skills, then follow their instructions.