move-patterns

Official

Move patterns: events, OTW, errors.

AuthorMystenLabs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Design patterns provide reusable, battle-tested structures to build robust Move modules, reducing boilerplate and errors.

Core Features & Use Cases

  • Events: emit and observe state-changing changes for off-chain clients.
  • Error Handling: define typed errors and messages to surface precise failure conditions.
  • One-Time Witness (OTW) Pattern: use unique, uncopyable objects to prove publication and ownership.
  • Capability Pattern: gate privileged functions with capabilities to improve composability and security.
  • Pure Functions and Composability: keep core logic pure and return results for easy composition across contracts.

Quick Start

Create a Move module implementing an event, an error, and a simple OTW-capability pattern to demonstrate composability.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: move-patterns
Download link: https://github.com/MystenLabs/sui-dev-skills/archive/main.zip#move-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.