composable-move-functions
OfficialDesign Move APIs that compose in PTBs
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
publicfor composable functions andentryonly for transaction endpoints, avoiding invalidpublic entrycombinations. - 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
Clocknear the end beforectx, withTxContextlast.
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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.