What problem does it solve?
This Skill prevents common Sui Move syntax and style mistakes that cause compilation failures or incorrect behavior by enforcing idiomatic module structure, visibility/mutability rules, method syntax preferences, and safe commenting conventions.
Core Features & Use Cases
- Idiomatic module layout: Standardizes section ordering (imports → constants → structs/enums → init → public functions → public(package) → private → test-only) and promotes readable
=== Section Title === separators.
- Correct
use and visibility patterns: Guides proper import syntax (no redundant braces) and modern visibility choices, including avoiding deprecated public(friend)/friend and using public(package) where appropriate.
- Safe mutability and entry design: Enforces
mut for reassigned or mutably borrowed variables/parameters and clarifies composable public fun versus transaction-only entry fun to avoid incorrect return expectations.
- Readable APIs via method syntax: Encourages method-style calls for types where the first argument matches, improving clarity in day-to-day Move code.
- Macro-friendly iteration patterns: Promotes vector/option macros to replace verbose manual loops and branching logic.
Quick Start
Use the sui-move-syntax skill to rewrite a Move module so it follows modern Sui conventions for module declarations, imports, mut usage, visibility, and method/macro style.