Agent skill

Migration Analysis

by PlamenTSV in PlamenTSV/plamen

Trigger Pattern Package upgrades, version transitions, deprecated functions, object layout changes - Inject Into Breadth agents, depth-state-trace

MITAuto-check passed

Install Migration Analysis

skills CLI
$ npx skills add PlamenTSV/plamen --skill migration-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PlamenTSV/plamen migration-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/sui/migration-analysis .claude/skills/migration-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
migration-analysis
GitHub stars
303
Token cost
~3.4k tokens
SKILL.md length
1,281 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Trigger Pattern Package upgrades, version transitions, deprecated functions, object layout changes - Inject Into Breadth agents, depth-state-trace

  • Works in 6 steps: Identify Token Transitions → Check Interface Compatibility → Trace Token Flow Paths → …
  • Pattern Package upgrades
  • SKILL.md covers Step 1: Identify Token…, Step 2: Check Interface…, Step 3: Trace Token Flow Paths and Step 4: Stranded Asset…, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Migration Analysis is an agent skill from PlamenTSV/plamen. Trigger Pattern Package upgrades, version transitions, deprecated functions, object layout changes - Inject Into Breadth agents, depth-state-trace

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Autonomous Web3 security audit agent for Claude Code. The licence is MIT.

When your agent uses it

  • Pattern Package upgrades
  • Version transitions
  • Deprecated functions
  • Object layout changes - Inject Into Breadth agents

Example prompts

  • “/migration-analysis”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Identify Token Transitions
  2. Check Interface Compatibility
  3. Trace Token Flow Paths
  4. Stranded Asset Analysis (ENHANCED)
  5. External Package Verification
  6. Downstream Integration Compatibility

What it can do on your machine

Read from SKILL.md and the folder at commit 795962b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are move and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Migration Analysis loads about 3.4k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 1,281 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PlamenTSV/plamen at commit 795962b, republished under its MIT licence (© PlamenTSV). 1,281 words, ~3,421 tokens.

Download SKILL.mdSave it as .claude/skills/migration-analysis/SKILL.md (or your agent's skills folder).
name
migration-analysis
description
Trigger Pattern Package upgrades, version transitions, deprecated functions, object layout changes - Inject Into Breadth agents, depth-state-trace

Skill: Migration Analysis (Sui)

Trigger Pattern: Package upgrades, version transitions, deprecated functions, object layout changes Inject Into: Breadth agents, depth-state-trace Finding prefix: [MG-N] Rules referenced: R4, R8, R9, R10, R13

upgrade|UpgradeCap|UpgradeTicket|version|v2|V2|deprecated|migrat|legacy|old_coin|new_coin|
compatible|additive|dependency_only|package::authorize_upgrade

Sui packages are immutable once published. "Upgrades" create new package versions at new addresses via the UpgradeCap mechanism. Old objects may reference old package versions, and mixed-version state is a primary Sui migration concern. Unlike EVM proxy upgrades where old code is replaced, Sui old package code remains callable forever.


Step 1: Identify Token Transitions

Find all token/object migration patterns:

  • Old Coin<OldType> -> New Coin<NewType> (token rebranding, coin type changes)
  • Old object layouts -> New object layouts (fields added via upgrade)
  • Deprecated functions still callable via old package version
  • Shared objects created by V1 that must work with V2 functions

For each transition:

Old EntityNew EntityMigration FunctionBidirectional?Entity Type

Sui-specific check: Is this a true package upgrade (same package lineage via UpgradeCap) or a separate package deployment (new address, no lineage)? True upgrades maintain type compatibility; separate deployments create entirely new types -- pkg_v1::module::Type != pkg_v2::module::Type.


Step 2: Check Interface Compatibility

For each function in the new package version interacting with existing objects:

  1. What fields does the OLD object layout have?
  2. What fields does the NEW version's functions expect?
  3. Are new fields appended (compatible upgrade) or does the layout change (breaking)?
  4. Does the struct definition change in a way that breaks compatible upgrade rules?
move
// Example: V1 object layout
struct Pool has key, store {
    id: UID,
    balance: Balance<SUI>,
    fee_bps: u64,
}
// V2 cannot change this layout under `compatible` policy.
// New fields require a new struct or dynamic fields.
Object TypeV1 FieldsV2 FieldsCompatible Upgrade?Breaking Change?

Sui upgrade compatibility rules:

  • compatible: Can change function implementations, add new functions, add new types. CANNOT change existing struct layouts, remove public functions, or change function signatures.
  • additive: Can only add new modules/functions. Cannot change existing code.
  • dependency_only: Can only change dependency versions.
  • immutable: No changes possible (UpgradeCap destroyed).

Step 3: Trace Token Flow Paths

For each function that interacts with migrated tokens/objects:

  1. Entry point: What object version does the user provide?
  2. Internal flow: What version does the protocol logic expect?
  3. External call: What version do external packages expect?
  4. Return value: What version is returned?

| Function | User Provides | Protocol Expects | External Expects | Mismatch? |

Step 3b: External Side Effect Compatibility

When migration changes token types or interaction patterns, check whether external package side effects produce tokens/objects the current logic handles:

External CallPre-Migration Side EffectPost-Migration Side EffectLogic Handles Both?Mismatch?

Pattern: Migration changes the primary coin type (e.g., V1 -> V2), but external packages still return the old type as rewards or receipts.

Step 3c: Pre-Upgrade Object Inventory

Before analyzing stranded asset paths, inventory what shared objects and owned objects exist on-chain:

Object TypeOwnershipHow CreatedCurrent ContentsPost-Upgrade Logic Handles?Exit Path Post-Upgrade?
{pool_obj}Sharedinit()Balance<SUI> + configYES/NO{function or NONE}
{user_position}Ownedopen_position()Balance + trackingYES/NO{function or NONE}
{legacy_receipt}OwnedV1 deposit()Receipt tokenYES/NO{function or NONE}

Sui-specific: Unlike EVM where contract storage persists across upgrades, Sui objects are typed. If a new package is published (not a lineage upgrade), V1 objects CANNOT be read by new package functions because the types differ.


Step 4: Stranded Asset Analysis (ENHANCED)

CRITICAL: This step uses exhaustive methodology. Every sub-step is MANDATORY.

4a. Asset Inventory by Version
Asset/ObjectV1 Entry PathV2 Entry PathV1 Exit PathV2 Exit Path
{shared_pool}create_pool()create_pool() (same)N/A (shared)N/A (shared)
{user_receipt}deposit()deposit_v2()redeem()redeem_v2()

Rule: If V1 Entry exists but V2 Exit doesn't handle V1-created objects -> potential stranding.

Sui-specific: Shared objects persist across compatible upgrades. For new package publications (not upgrades), the type is a DIFFERENT type even if structurally identical.

4b. Cross-Version Path Matrix
Object VersionState ConditionAvailable Exit PathsWorks?Reason
V1 user receiptV2 package activeredeem_v2() with V1 receiptY/N{struct type compatibility}
V1 shared poolV2 functions called on itV2 withdraw()Y/N{field access compatibility}
V1 owned objectNew package published (not upgraded)ANY V2 functionY/N{type mismatch}

STRANDING RULE: If ALL exit paths = N for any object state -> STRANDED ASSETS FINDING (apply Rule 9: minimum MEDIUM)

4c. Recovery Function Inventory
FunctionWho Can CallWhat Objects Can RecoverLimitations
migrate_v1()Object ownerV1 owned objectsOne-time per object
admin_sweep()AdminCap holderShared object balancesRequires active AdminCap

Question: Is there a recovery path for EVERY stranding scenario in 4b?

4d. Worst-Case Scenarios (MANDATORY)

Scenario 1: V1 Object + V2 Package (Compatible Upgrade)

State: User holds Receipt object created by V1 package
Event: Package upgraded to V2 via compatible upgrade
Question: Can user call V2 redeem() with V1 Receipt?
Trace: [document type compatibility and field access]
Result: [SUCCESS/STRANDED + amount]

Scenario 2: V1 Object + New Package (Non-Upgrade Publication)

State: User holds Receipt<OldPackage::COIN> object
Event: Protocol publishes new package at new address
Question: Can user interact with new package using old object?
Trace: [OldPackage::Receipt != NewPackage::Receipt -- different types]
Result: [STRANDED unless explicit migration exists]

Scenario 3: Old Package Bypass After Upgrade

State: Protocol upgrades to V2 with new security checks
Event: Attacker calls V1 functions on shared objects
Question: Do V1 functions bypass V2 security checks?
Trace: [document old function code path]
Result: [SAFE/BYPASS POSSIBLE]

Scenario 4: Dynamic Field Key Type Mismatch

State: Objects have dynamic fields with V1 key types
Event: V2 changes key type or field structure
Question: Can V2 code read/remove V1-era dynamic fields?
Trace: [document dynamic field access path]
Result: [SUCCESS/STRANDED + orphaned dynamic fields]
Show full SKILL.md (536 more words)Show less
4e. Step 4 Completion Checklist
  • 4a: ALL objects inventoried with entry/exit paths per version
  • 4b: Cross-version path matrix completed for all state combinations
  • 4c: Recovery functions enumerated with limitations
  • 4d: All four worst-case scenarios modeled with code traces
  • For EVERY stranding possibility: recovery path exists OR finding created
Step 4f: User-Blocks-Admin Scenarios
Admin/Migration FunctionPrecondition RequiredUser Action That Blocks ItTiming WindowSeverity
{admin_func}{precondition}{user_action}{window}{assess}

Sui-specific patterns:

  • Admin migration requires exclusive access to shared object, but users continuously submit transactions against it (consensus ordering interleaves admin with user txs)
  • Migration function requires all user positions withdrawn, but users can re-deposit between admin's check and migration
  • Owned objects (user positions) cannot be accessed by admin functions -- migration requires user cooperation
  • Dynamic fields on shared objects added by users must be cleaned up before object deletion

If blocking is possible AND permanent -> minimum MEDIUM severity If blocking is temporary but repeatable -> assess with Rule 10 worst-state


Step 5: External Package Verification

For each external package dependency:

External PackagePublished VersionUpgrade PolicyOur Package Pins ToCompatible With Our Usage?
{package_id}{version}{compatible/additive/immutable}{specific version or latest}YES/NO

Check:

  • If external package upgrades, do our function calls still work?
  • Are we using types from the external package that could change?
  • Does the external package's UpgradeCap holder pose a risk?

Step 6: Downstream Integration Compatibility

Protocol ChangeDownstream Consumer TypeExpected Interface/TypeActual Post-MigrationBreaking Change?
{change}Other Sui packages (composability){expected type}{actual type}YES/NO
{change}Indexers/explorers{expected event structure}{actual}YES/NO
{change}Frontend/SDK{expected PTB structure}{actual}YES/NO
{change}PTB composers (DeFi aggregators){expected function signature}{actual}YES/NO

Sui-specific: PTB composability means other protocols may compose our public functions into their PTBs. If function signatures or return types change, ALL downstream PTB composers break silently.


Key Questions (Must Answer All)

  1. Type Identity: For each shared object, is the type from the old package or new? Are they the same type (upgrade lineage) or different?
  2. Old Code Still Callable: What old package functions remain callable post-upgrade? Can any be used maliciously against shared objects?
  3. Migration Completeness: Can ALL V1-era objects and assets be migrated to or accessed by V2 paths?
  4. Dynamic Field Compatibility: Are all dynamic field key types accessible from the new package version?
  5. Stranded Path: Is there any combination of (old_object + new_logic) that traps funds?

Common False Positives

  1. True upgrade with type preservation: Package upgrade via UpgradeCap with compatible policy preserves existing types
  2. Intentional immutability: Old package deliberately left callable as a legacy compatibility layer
  3. Version guard pattern: Shared objects contain a version field, old functions abort on version mismatch
  4. Admin-controlled migration: Stranded assets recoverable via AdminCap-gated functions

Output Schema

markdown
## Finding [MG-N]: Title

**Verdict**: CONFIRMED / PARTIAL / REFUTED / CONTESTED
**Step Execution**: checkmark1,2,3,4,5,6 | xN(reason) | ?N(uncertain)
**Rules Applied**: [R4:___, R9:___, R10:___, R13:___]
**Severity**: Critical/High/Medium/Low/Info
**Location**: sources/{module}.move:LineN

**Object Transition**:
- Old: {old_package::module}
- New: {new_package::module}
- Mismatch Point: {where types/versions diverge}

**Description**: What is wrong
**Impact**: What can happen (stranded funds, bypassed security, broken composability)
**Evidence**: Code showing mismatch

### Precondition Analysis (if PARTIAL/REFUTED)
**Missing Precondition**: [What blocks exploitation]
**Precondition Type**: STATE / ACCESS / TIMING / EXTERNAL / BALANCE

### Postcondition Analysis (if CONFIRMED/PARTIAL)
**Postconditions Created**: [What conditions this creates]
**Postcondition Types**: [List applicable types]

Step Execution Checklist (MANDATORY)

StepRequiredCompleted?Notes
1. Identify Token TransitionsYESUpgrade lineage vs separate deployment
2. Check Interface CompatibilityYESSui upgrade policy rules
3. Trace Token Flow PathsYES
3b. External Side Effect CompatibilityYES
3c. Pre-Upgrade Object InventoryYES
4. Stranded Asset Analysis (4a-4e)YESAll four scenarios modeled
4f. User-Blocks-Admin ScenariosYES
5. External Package VerificationYES
6. Downstream Integration CompatibilityYES

If any step skipped, document valid reason (N/A, immutable package, single version, no downstream consumers).

© PlamenTSV, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agents/skills/sui/migration-analysis of PlamenTSV/plamen.

Open the folder on GitHubat commit 795962b

Compare with similar skills

Migration Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Migration Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Migration Analysis this skillPlamenTSV/plamen303—~3.4kAutomated safety check: PassMIT
Kotlin Exposed Patternsaffaan-m/ECC275k4 repos~5.5kAutomated safety check: PassMIT
Safe Database Migration Patternsaffaan-m/ECC275k—~3.3kAutomated safety check: PassMIT
Golang Patternsaffaan-m/ECC275k—~1.1kAutomated safety check: PassMIT
Deprecate R Functions and Argumentstidyverse/dplyr5.1k1 repos~1.2kAutomated safety check: PassCustom licence
Database Migrationsaffaan-m/ECC275k4 repos~3kAutomated safety check: PassMIT

Similar skills

  • JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

    275k GitHub starsUsed in 4 repos~5.5k tokens
    DatabasesAuto-check passed
  • Rules and examples for safe, reversible schema changes in production: zero-downtime column and index changes, large data backfills and ORM migration workflows.

    275k GitHub stars~3.3k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Golang Patterns

    affaan-m/ECC

    Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization.

    275k GitHub stars~1.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Walks through deprecating an R function or argument in a package: lifecycle warning, silenced tests, a new snapshot test, documentation badge and NEWS entry.

    5.1k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL…

    275k GitHub starsUsed in 4 repos~3k tokens
    DatabasesAuto-check passed
  • Deepgram Upgrade Migration

    jeremylongshore/tons-of-skills-marketplace

    Plan and execute Deepgram SDK upgrades and model migrations.

    2.8k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed

More from PlamenTSV/plamen

All 87 skills in this repo
  • Audit Prep

    PlamenTSV/plamen

    Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project…

    303 GitHub stars~3.7k tokensUpdated 12 days ago
    Auto-check passed
  • Verification Protocol

    PlamenTSV/plamen

    Trigger Pattern Always (used by all verifier agents) - Inject Into security-verifier agents (Phase 5)

    303 GitHub stars~3.5k tokensUpdated 12 days ago
    Auto-check passed
  • Ability Analysis

    PlamenTSV/plamen

    Trigger Pattern Always (Aptos Move) - foundational security check - Inject Into Breadth agents, depth agents

    303 GitHub stars~3.3k tokensUpdated 12 days ago
    Auto-check passed
  • Ability Analysis

    PlamenTSV/plamen

    Trigger Pattern Always (Sui Move) -- foundational security check - Inject Into Breadth agents, depth agents

    303 GitHub stars~3.2k tokensUpdated 12 days ago
    Auto-check passed
  • Account Lifecycle

    PlamenTSV/plamen

    Trigger Pattern ACCOUNTCLOSING flag detected (close/CloseAccount usage) - Inject Into Breadth agents, depth agents

    303 GitHub stars~1.2k tokensUpdated 12 days ago
    Auto-check passed
  • Account Validation

    PlamenTSV/plamen

    Trigger Pattern Always required for Solana audits - Inject Into Breadth agents, depth agents

    303 GitHub stars~1.7k tokensUpdated 12 days ago
    Auto-check passed

Questions about Migration Analysis

What does Migration Analysis do?

Trigger Pattern Package upgrades, version transitions, deprecated functions, object layout changes - Inject Into Breadth agents, depth-state-trace. Migration Analysis is an agent skill from PlamenTSV/plamen.

When should I use Migration Analysis?

Migration Analysis fits situations like: pattern Package upgrades; version transitions; deprecated functions; object layout changes - Inject Into Breadth agents.

How do I install Migration Analysis in Claude Code?

Run `npx skills add PlamenTSV/plamen --skill migration-analysis -a claude-code`. Or copy the skill folder (agents/skills/sui/migration-analysis in PlamenTSV/plamen) into .claude/skills/migration-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Migration Analysis in Codex?

Run `npx skills add PlamenTSV/plamen --skill migration-analysis -a codex`. Or copy the skill folder (agents/skills/sui/migration-analysis in PlamenTSV/plamen) into .agents/skills/migration-analysis in your project. Codex loads it when a task matches its description.

Can I use Migration Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PlamenTSV/plamen --skill migration-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migration-analysis, .gemini/skills/migration-analysis, .github/skills/migration-analysis and .opencode/skills/migration-analysis in your project.

What does Migration Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Migration Analysis is instructions for the agent only.

Does Migration Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Migration Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Migration Analysis use?

Migration Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Migration Analysis use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Migration Analysis?

Skills that share tags, products or a category with Migration Analysis: Kotlin Exposed Patterns (affaan-m/ECC, 275k stars), Safe Database Migration Patterns (affaan-m/ECC, 275k stars), Golang Patterns (affaan-m/ECC, 275k stars) and Deprecate R Functions and Arguments (tidyverse/dplyr, 5.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Migration Analysis?

PlamenTSV (a GitHub user) maintains it in PlamenTSV/plamen, which has 303 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on September 26, 2026.

Source: PlamenTSV/plamen on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.