What problem does it solve?
Sui Move projects often ship with inconsistent event emission, brittle error handling, and low-composability core logic, which makes off-chain integrations harder and future upgrades riskier.
Core Features & Use Cases
- Event emission for state changes: Emit typed events for client-visible changes like liquidity additions and other mutations.
- Consistent error handling: Use predictable error constants and optional #[error] clever errors for readable abort messages.
- Composability-focused design: Keep core logic pure by returning results instead of transferring them inside library-style functions.
- Safer authority and publishing: Use the one-time witness (OTW) pattern for unique proofs and capability objects (AdminCap-style) instead of ctx.sender checks.
- Use Case: Standardize a DeFi protocol module so indexers can reliably subscribe to events, clients get meaningful abort messages, and privileged actions are gated by capabilities.
Quick Start
Use the sui-move-patterns skill to review your Move module and rewrite its event emission, error constants, OTW initialization, capability gating, and pure-function boundaries for safer composability.