์Šคํ‚ฌ migrating-motoko-actors
๐Ÿ“ฆ

migrating-motoko-actors

v0.2.6 ์ฝ˜ํ…์ธ  ๋ฆฌ๋น„์ „ r1 ์•ˆ์ „ โš™๏ธ ์™ธ๋ถ€ ๋ช…๋ น์–ด๐ŸŒ ๋„คํŠธ์›Œํฌ ์ ‘๊ทผ๐Ÿ“ ํŒŒ์ผ ์‹œ์Šคํ…œ ์ ‘๊ทผ

Migrate Motoko Actors With Enhanced Migration Chains

Motoko canister upgrades can fail or lose data when state changes do not match migration inputs and outputs. This skill guides compatible changes, self-contained migrations, and validation for enhanced migration chains.

์ง€์›: Claude Codex Code(CC)
Maintain this Skill? Claim it ๐Ÿฅˆ 80 ์‹ค๋ฒ„

๋‚ด ์—์ด์ „ํŠธ๋กœ ์„ค์น˜

์ด ์š”์ฒญ์„ ์—์ด์ „ํŠธ์— ๋ณต์‚ฌํ•˜์„ธ์š”. ๊ณต์‹ Skill ํŽ˜์ด์ง€์™€ ๋งค๋‹ˆํŽ˜์ŠคํŠธ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

์—์ด์ „ํŠธ ์š”์ฒญ
Review the Skillstore skill "migrating-motoko-actors" from https://skillstore.io/skills/caffeinelabs-migrating-motoko-actors.md and its manifest at https://skillstore.io/api/skills/caffeinelabs-migrating-motoko-actors/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

์—์ด์ „ํŠธ๋Š” ๊ณ„์†ํ•ด์„œ ๊ณ„ํš์„ ํ‘œ์‹œํ•˜๊ณ  ๋ณด์•ˆ ์ •์ฑ…์—์„œ ์š”๊ตฌํ•˜๋Š” ํ™•์ธ์„ ์š”์ฒญํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์—์ด์ „ํŠธ๊ฐ€ ์ฝ๊ธฐ ์‰ฌ์šด ๋ฆฌ์†Œ์Šค

AI ์—์ด์ „ํŠธ, ํฌ๋กค๋Ÿฌ, ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์ „์ฒด ํŽ˜์ด์ง€ ๋Œ€์‹  ์ •๋ฆฌ๋œ ์ปจํ…์ŠคํŠธ๋งŒ ํ•„์š”ํ•  ๋•Œ ์ด ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.

ํ…Œ์ŠคํŠธํ•ด ๋ณด๊ธฐ

"migrating-motoko-actors" ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค. An enhanced migration project adds an optional assignee field to every stored task.

์˜ˆ์ƒ ๊ฒฐ๊ณผ:

Use an explicit migration that preserves existing task values and initializes each assignee as absent. Extend the pending migration if one already exists.

"migrating-motoko-actors" ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค. A canister changes a stable numeric field from Nat to Int.

์˜ˆ์ƒ ๊ฒฐ๊ณผ:

This is usually a stable-compatible widening and does not need an explicit migration. Confirm the deployed signature and run the compatibility check.

"migrating-motoko-actors" ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค. A canister renames artist to artists and changes the value from text to a set.

์˜ˆ์ƒ ๊ฒฐ๊ณผ:

Transform the old text value into a single-item set for the renamed field. Inline both state types and preserve all unrelated fields.

๋ณด์•ˆ ๊ฐ์‚ฌ

์•ˆ์ „

All 77 static findings are false positives involving Markdown formatting, legitimate mops validation commands, official documentation links, and Motoko type notation. The relative import example explicitly prohibits project imports rather than performing path traversal. No evidence found of prompt injection, credential access, unauthorized data transmission, or malicious migration intent in the two reviewed files.

2
์Šค์บ”๋œ ํŒŒ์ผ
397
๋ถ„์„๋œ ์ค„ ์ˆ˜
0
๊ฒ€ํ†  ํ•ญ๋ชฉ
0
์˜คํƒ ๋ฌด์‹œ๋จ
๊ฐ€์žฅ ์ตœ๊ทผ์— ์™„๋ฃŒ๋œ ์ •์ ยท์˜๋ฏธ๋ก ์  ๊ฐ์‚ฌ์—์„œ ํ™•์ธ๋œ ๋ณด์•ˆ ๋ฐœ๊ฒฌ ์‚ฌํ•ญ์ด ๊ฐ์ง€๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ์ด๋Š” ์Šคํ‚ฌ์— ๋ถ€์ž‘์šฉ์ด ์—†์Œ์„ ์ฆ๋ช…ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
๊ฐ์‚ฌ์ž: codex
์ด ๋ณด๊ณ ์„œ ๊ณต์œ  ๋ฐ ์ธ์šฉ

๋ฒ„์ „์ด ์ง€์ •๋œ ํ‰๊ฐ€ ๋ณด๊ณ ์„œ, ์ค‘๋ฆฝ ๋ฐฐ์ง€, ์ž„๋ฒ ๋“œ ์นด๋“œ ๋ฐ ์ธ์šฉ์„ ๊ณต์œ ํ•˜์„ธ์š”. Skillstore๋Š” ๊ทผ๊ฑฐ๋ฅผ ๋ณด๊ณ ํ•˜์ง€๋งŒ ์ด Skill์˜ ์•ˆ์ „ ์—ฌ๋ถ€๋ฅผ ํŒ๋‹จํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋ฒ„์ „๋ณ„ ๋ณด๊ณ ์„œ ์—ด๊ธฐ
๋ณด์•ˆ ํ‰๊ฐ€

๋ณด๊ณ ์„œ ๋งํฌ ๋ณต์‚ฌ

https://skillstore.io/skills/caffeinelabs-migrating-motoko-actors/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown ๋ฐฐ์ง€

[![Skillstore security assessment](https://skillstore.io/badges/skills/caffeinelabs-migrating-motoko-actors/security.svg)](https://skillstore.io/skills/caffeinelabs-migrating-motoko-actors?utm_source=security_passport_badge)

HTML ๋ฐฐ์ง€

<a href="https://skillstore.io/skills/caffeinelabs-migrating-motoko-actors?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/caffeinelabs-migrating-motoko-actors/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

์ž„๋ฒ ๋“œ ์นด๋“œ

<iframe src="https://skillstore.io/embed/skills/caffeinelabs-migrating-motoko-actors.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
ํ•™์ˆ  ์ธ์šฉ (APA ยท BibTeX ยท CFF)

APA ์ธ์šฉ

caffeinelabs. (2026). migrating-motoko-actors security audit report (audit version 1) [Author version 0.2.6]. Skillstore. https://skillstore.io/skills/caffeinelabs-migrating-motoko-actors/audits/1

BibTeX ์ธ์šฉ

@techreport{caffeinelabs-caffeinelabs-migrating-motoko-actors-2026, author = {caffeinelabs}, title = {migrating-motoko-actors security audit report (audit version 1)}, institution = {Skillstore}, year = {2026}, number = {1}, url = {https://skillstore.io/skills/caffeinelabs-migrating-motoko-actors/audits/1}, note = {Author version 0.2.6} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "migrating-motoko-actors security audit report (audit version 1)" version: "0.2.6" type: report authors: - name: "caffeinelabs" date-released: "2026-10-02" url: "https://skillstore.io/skills/caffeinelabs-migrating-motoko-actors/audits/1" identifiers: - type: other value: "skillstore:caffeinelabs-migrating-motoko-actors:audit:1" description: "Skillstore immutable audit report identifier"

Skillstore ์ ์ˆ˜

์ด ์ ์ˆ˜์˜ ์ด์œ  ์ฆ๊ฑฐ ์‹ ๋ขฐ๋„: ์ค‘๊ฐ„
55
์•„ํ‚คํ…์ฒ˜
100
์œ ์ง€๋ณด์ˆ˜์„ฑ
87
์ฝ˜ํ…์ธ 
65
์ปค๋ฎค๋‹ˆํ‹ฐ
91
์‚ฌ์–‘ ์ค€์ˆ˜

๋งŒ๋“ค ์ˆ˜ ์žˆ๋Š” ๊ฒƒ

Understand stable state changes

Classify proposed field changes and identify when an enhanced migration file is necessary.

Write a migration module

Draft self-contained state transformations while preserving unchanged fields and using the existing pending migration.

Review upgrade readiness

Check chain ordering, deployed signatures, intentional data removal, and validation steps before releasing an upgrade.

์ด ํ”„๋กฌํ”„ํŠธ๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์„ธ์š”

Classify a state change
My project uses enhanced Motoko migrations. Classify these stable field changes as implicit or explicit: [changes]. Explain each decision.
Plan a new field
Add this stable field in my enhanced migration project: [field and type]. Review [existing chain] and propose initialization without modifying applied migrations.
Transform stored records
Using [old fields], [new fields], and [business rules], draft a self-contained Motoko migration. Preserve unchanged state and explain every default and discarded field.
Audit an upgrade plan
Review [migration plan], [deployed signature], and [mops configuration]. Check stable compatibility, chain ordering, pending limits, fresh installation, and data preservation. Propose validation steps.

๋ชจ๋ฒ” ์‚ฌ๋ก€

  • Derive old state from the preceding migration; use empty state only for a new chain, not a legacy conversion.
  • Keep applied migrations unchanged and fold new work into the pending file.
  • Run compatibility checks before building and test the upgrade with representative state.

ํ”ผํ•˜๊ธฐ

  • Do not add a migration for a stable-compatible change or an identity transformation.
  • Do not apply the enhanced-chain initializer rules to plain actors without a migration chain.
  • Do not import project types into frozen migration files or discard fields unintentionally.

์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ

When is an explicit migration required?
In enhanced migration projects, use one for renamed, removed, narrowed, transformed, or newly added stable fields.
Can I change field mutability without a migration?
Yes. Changing var to let, or the reverse, is usually stable-compatible.
Where should migration files live?
Read the chain directory in mops.toml. The default location in this guide is src/backend/migrations/.
Why must migration types be inlined?
Project type imports can change and invalidate historical transformations. Inline old and new types; core and mops package imports are permitted.
How do I initialize a new stable field?
Under enhanced migration, declare its type in the actor and supply its value from the migration output. Plain actors follow different initialization rules.
Does this skill deploy my canister?
It does not include a deployment script. It guides migration authoring, compatibility checks, and builds; deployment still requires your project workflow.

๊ฐœ๋ฐœ์ž ์„ธ๋ถ€ ์ •๋ณด

์ž‘์„ฑ์ž

caffeinelabs

๋ผ์ด์„ ์Šค

MIT

์ž‘์„ฑ์ž ๋ฒ„์ „

v0.2.6

Skillstore ๋ฆฌ๋น„์ „

r1

์ฐธ์กฐ

4a2784fa51569d7e1be060d54def4cdfd352ac62

์œ ์ง€๋ณด์ˆ˜ ์ตœ์‹ ์„ฑ

2026. 10. 2.

์‚ฌ์šฉ๋Ÿ‰

0 ๋‹ค์šด๋กœ๋“œ ยท 0 ์กฐํšŒ

ํŒŒ์ผ ๊ตฌ์กฐ

๐Ÿ“„ examples.md

๐Ÿ“„ SKILL.md