sui-move-patterns

sui-move-patterns is a skill for Claude Code from widnyana/eyay-toolkits. It costs 33 tokens per session (1,106 once invoked), scanned A, original, MIT.

A reference guide for writing Move smart contracts on Sui, a blockchain platform. It covers common patterns for events, errors, one-time witnesses, capabilities, and composable functions.

In plain words
What is it for?
Use it while implementing Sui Move features such as emitting contract events, defining readable errors, creating one-time witnesses, or applying capability-based access control.
Why use it?
It gives developers established ways to represent state changes, report failures, control permissions, and structure reusable code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the sui-dev-tools plugin — 11 skills shipped together

Good fit Use it while implementing Sui Move features such as emitting contract events, defining readable errors, creating one-time witnesses, or applying capability-based access control.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/widnyana/eyay-toolkits/sui-move-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add widnyana/eyay-toolkits --skill sui-move-patterns
Clone the repo
git clone --depth 1 https://github.com/widnyana/eyay-toolkits

Made for: Claude Code.

Or install sui-dev-tools, the plugin that ships this one along with the rest of its 11 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sui-move-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/widnyana/eyay-toolkits/sui-move-patterns/github.svg)](https://agentmods.dev/skills/widnyana/eyay-toolkits/sui-move-patterns)
Your own site
<a href="https://agentmods.dev/skills/widnyana/eyay-toolkits/sui-move-patterns"><img src="https://agentmods.dev/badge/skills/widnyana/eyay-toolkits/sui-move-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sui-move-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/widnyana/eyay-toolkits/sui-move-patterns"><img src="https://agentmods.dev/badge/skills/widnyana/eyay-toolkits/sui-move-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,106 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01106
Opus 5 $0.00016 $0.00553
Sonnet 5 $0.00007 $0.00221
Haiku 4.5 $0.00003 $0.00111

Measured 9d ago against content hash 0a351a90987a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

sui-move-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/sui-dev-tools/skills/sui-move-patterns/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

1. Events

Emit events for all state-changing operations that clients need to observe:

use sui::event;

public struct LiquidityAdded has copy, drop {
    pool_id: ID,
    amount_x: u64,
    amount_y: u64,
    lp_minted: u64,
}

// Inside function:
event::emit(LiquidityAdded {
    pool_id: object::id(pool),
    amount_x,
    amount_y,
    lp_minted,
});

2. Error Handling

Error constants use EPascalCase and u64 values:

const EInsufficientLiquidity: u64 = 0;
const EZeroAmount: u64 = 1;

assert!(amount > 0, EZeroAmount);

Clever errors

Annotating a constant with #[error] allows it to carry a human-readable message. The value can be any valid constant type — vector<u8> is most common for string messages:

#[error]
const EInsufficientLiquidity: vector<u8> = b"Insufficient liquidity in pool";

assert!(reserves > 0, EInsufficientLiquidity);
abort EInsufficientLiquidity

At runtime, the Sui CLI and GraphQL server automatically decode these into a readable message:

Error from '0x2::amm::swap' (line 42), abort 'EInsufficientLiquidity': "Insufficient liquidity in pool"

Gotcha: clever error abort codes encode the source line number, so their u64 value can change if the file is reformatted or lines shift. Don't hardcode clever error abort codes in tests or off-chain tooling — match by constant name instead.

**assert! without an abort code** is also valid and auto-derives a clever abort code from the source line:

// ✅ Valid — line number is embedded automatically
assert!(amount > 0);

This is fine for internal invariants where the line number alone is enough context.


3. One-Time Witness (OTW) Pattern

Use the OTW pattern for modules that need a unique, uncopyable proof-of-publication (e.g., coin types, publisher objects):

public struct MY_MODULE has drop {}

fun init(otw: MY_MODULE, ctx: &mut TxContext) {
    // The OTW name must exactly match the module name in ALL_CAPS
    let publisher = package::claim(otw, ctx);
    transfer::public_transfer(publisher, ctx.sender());
}

Read the full file on GitHub · 146 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 146 lines · 33 tokens per session scan A 0a351a90987a

Subscribe to this mod's changes

sui-move-patterns is a skill published in the GitHub repository widnyana/eyay-toolkits (7 stars, last pushed 7d ago), licensed MIT. It adds 33 tokens to every session and 1,106 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

metengine-data-agent

Real-time smart money analytics API for Polymarket prediction markets, Hyperliquid perpetual futures, and Meteora Solana LP/AMM pools. 63 endpoints. Pay-per-request via x402 on Solana Mainnet USDC. No API keys.

sendaifun/skills · 57 tokens

web3-protocol-gtm

Go-to-market strategy for web3 builders - protocols, products, services, and solo founders. Use when planning growth for a crypto protocol, building developer community, crafting CT narrative, planning ecosystem partnerships, preparing grant applications, launching tokens, pricing crypto-native products, or growing as…

tenequm/skills · 70 tokens

solana-development

Build, test, deploy, and audit Solana programs with Anchor or native Rust, and build with ZK Compression (Light Protocol). Use when developing Solana smart contracts, implementing token operations, optimizing compute, deploying to networks, auditing programs for vulnerabilities, or creating compressed tokens/PDAs.

tenequm/skills · 63 tokens

x402

Build internet-native payments with the x402 open protocol - HTTP 402 Payment Required for on-chain micropayments with no accounts or API keys. Use when developing paid APIs, paywalled content, AI agent payment flows, or MCP tools that charge per call. Covers the TypeScript, Python, and Go SDKs across EVM, Solana…

tenequm/skills · 86 tokens

meteora

Complete Meteora DeFi SDK suite for building liquidity pools, AMMs, bonding curves, vaults, token launches, and zap operations on Solana. Use when integrating DLMM, DAMM v2, DAMM v1, Dynamic Bonding Curves, Alpha Vaults, Zap, or Stake-for-Fee functionality.

sendaifun/skills · 69 tokens

erc-8004

Build with ERC-8004 Trustless Agents - on-chain agent identity, reputation, validation, and discovery on EVM chains. Use when registering AI agents on-chain, building agent reputation systems, searching/discovering agents, working with the Agent0 SDK (agent0-sdk), or implementing the ERC-8004 standard. Triggers on…

tenequm/skills · 97 tokens