modernize-move for Openclaw

A professional refactoring tool designed to detect and modernize outdated Move V1 syntax and patterns into Move V2+ standard code.

iskysun96
v1.0.0
Mar 19, 2026
0
785
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install modernize-move

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install modernize-move using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is modernize-move?

The modernize-move skill is a high-priority tool within the Openclaw Skills ecosystem designed for developers managing legacy Aptos or Move-based smart contracts. It provides a structured, tiered approach to upgrading outdated V1 syntax, visibility patterns, and APIs to the modern Move V2+ standard. By focusing on structural modernization rather than functional changes, it ensures that code remains idiomatic, readable, and compatible with the latest compiler features.

Safety is at the core of this skill. It enforces a strict protocol involving mandatory test safety nets, pre-modification analysis reports, and incremental verification. This systematic approach allows developers to refactor with confidence, knowing that behavior is preserved through every tier of the transformation process.

modernize-move Use Cases

  • Upgrading legacy Move V1 contracts to modern V2 syntax for better maintainability.
  • Migrating restricted visibility modifiers like public(friend) to the newer package fun pattern.
  • Replacing manual vector iteration and while loops with streamlined for loops and lambda-based stdlib functions.
  • Converting legacy EventHandle patterns to the modern #[event] attribute system.
  • Refactoring magic numbers into named constants while strictly preserving original numeric values for test compatibility.
  • Transitioning from Coin/TokenV1 standards to modern fungible_asset and Digital Asset frameworks.

How modernize-move Works

  1. Contract Analysis: The skill scans source files for Tier 1 (syntax), Tier 2 (visibility/errors), and Tier 3 (API) patterns using predefined Openclaw Skills detection rules.
  2. Analysis Report & Gating: It generates a comprehensive report detailing every finding and requires user confirmation on scope (syntax-only, standard, or full) before proceeding.
  3. Test Baseline Establishment: It verifies existing tests or invokes the generate-tests skill to ensure a 100% passing baseline exists before any code is touched.
  4. Tiered Transformation: Changes are applied incrementally—Tier 1 syntax first, followed by Tier 2 and Tier 3—with full test suite execution after every stage.
  5. Final Verification: A summary report is produced, comparing final test coverage and results against the original baseline to ensure zero regression.

modernize-move Setup

To use this modernization tool within the Openclaw Skills framework, ensure you have the Aptos CLI installed and your project initialized.

# Ensure Aptos CLI is available
aptos --version

# Run the skill via your AI agent
# The agent will automatically check for a passing test baseline
aptos move test

modernize-move Data Schema & Taxonomy

The skill organizes its modernization workflow through a structured reporting system and tiered rule application:

Data Component Format Description
Analysis Report Markdown Table Categorizes findings by Line, Rule ID, Tier, and Confidence Level.
Rule Catalog Reference Markdown 22 specific rules across 3 tiers (Syntax, Visibility, API).
Deployment Context Logic Flag Distinguishes between 'Compatible' (skips breaking changes) and 'Fresh Deploy' (applies all).
Summary Report Markdown Table Final tally of applied vs. skipped changes and coverage delta.

modernize-move Advanced Features

  • Deployment Context Awareness: Intelligently skips breaking changes (marked as Tier 3) when the user specifies a 'compatible' upgrade for already-deployed contracts.
  • Receiver-Style Refactoring: Automatically converts traditional function calls to receiver-style syntax when target functions declare a self parameter.
  • Tiered Rollback Logic: If any modernization tier causes a test failure, the skill automatically reverts the specific tier to isolate the issue.
  • Multi-Skill Integration: Seamlessly hands off tasks to generate-tests if coverage is insufficient or security-audit for post-migration verification.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*