move-syntax

Organize Move modules with canonical layout and import rules.

20|8|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/MystenLabs/sui-dev-skills --skill move-syntax
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: move-syntax
Source: https://github.com/MystenLabs/sui-dev-skills/tree/main/move/syntax
Command: npx skills add https://github.com/MystenLabs/sui-dev-skills --skill move-syntax

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Move syntax guidelines help developers write correct, consistent Move code by standardizing module layout, imports, mutability, visibility, method syntax, enums, macros, and comments.

Core Features & Use Cases

  • Standard module layout with a single-line module declaration
  • Clear import rules and Self usage to avoid redundancy
  • Consistent mutability, visibility, and method syntax practices
  • Guidance for enums and macros to model domain concepts
  • Clear documentation and section ordering to improve readability

Quick Start

Apply these guidelines to structure Move modules and syntax for reliable, readable code.

Frequently Asked Questions about move-syntax

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the recommended module layout for Move packages?

Canonical Move module layout requires a single-line module declaration with strictly ordered sections for imports, constants, and functions. This standardization ensures codebase readability and prevents structural inconsistencies across typical packages.

How do I manage imports and Self usage in Move to avoid redundancy?

Apply clear Move import rules and proper Self usage to avoid redundancy when referencing module members. This practice streamlines dependency management and maintains consistent module readability across packages.

What are the best practices for Move mutability and visibility syntax?

Best practices for Move mutability and visibility syntax involve applying consistent declarations to functions and structs. This ensures correct access control and prevents unintended state modifications across your modules.

How do I use enums and macros to model domain concepts in Move?

Use Move enums and macros to model domain concepts by following specific syntax guidelines provided for these features. This approach allows you to represent complex states and generate boilerplate code correctly.

When should I apply method syntax in Move modules?

Apply Move method syntax when defining functions that operate on specific structs to ensure consistent practices. This syntax standardizes how methods are called and interact with module visibility.

Does the Move syntax standard include guidelines for documentation and comments?

Yes, the Move syntax standard includes clear documentation and section ordering practices to improve readability. Applying these comment guidelines ensures your modules remain understandable and maintainable.