composable-move-functions

Official

Design Move APIs that compose in PTBs

AuthorMystenLabs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents non-composable Sui Move function patterns by guiding how to structure public and entry points, return values, and parameters so functions can be safely chained in Programmable Transaction Blocks (PTBs) without breaking caller composition.

Core Features & Use Cases

  • Visibility & Entrypoints: Enforces using public for composable functions and entry only for transaction endpoints, avoiding invalid public entry combinations.
  • Return vs Transfer Design: Requires public functions to return objects to the caller instead of transferring internally to ctx.sender(), with separate entry wrappers for convenience.
  • Function Signature Ordering: Standardizes parameter order as objects first, capabilities second, primitives third, and places Clock near the end before ctx, with TxContext last.

Use Case: When building a modular AMM or NFT minting API, use this guidance to ensure functions like add_liquidity, swap, or mint_profile return the relevant objects/coins to the caller so they can be chained in a single PTB while keeping transaction-specific transfers isolated to entry wrappers.

Quick Start

Use the composable-move-functions skill to review an existing Sui Move module and rewrite its function signatures so public APIs return values for PTB composability, entry endpoints transfer to the sender, and parameter order follows the required object-capability-primitive-clock-txcontext pattern.

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: composable-move-functions
Download link: https://github.com/MystenLabs/skills/archive/main.zip#composable-move-functions

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.