mystenlabs/sui-dev-skills/setup

Claude Code and agent skill by mystenlabs/sui-dev-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Move package setup (Move.toml, edition, dependencies), building, testing, and common pitfalls from other Move dialects.

Install

npx vskill@latest install mystenlabs/sui-dev-skills/setup

SKILL.md

1. Package Setup

Always use the Move 2024 edition (edition = "2024" in Move.toml). The name in [package] defines the package's address name and must match what your Move code uses (e.g., module my_package::m requires name = "my_package"):

toml
[package]
name = "my_package"
edition = "2024"

Implicit framework dependencies (Sui 1.45+) — do not list Sui, MoveStdlib, Bridge, or SuiSystem in [dependencies]. They are implicit:

toml
# ✅ Sui 1.45+
[dependencies]
# no framework entries needed
# ❌ Outdated
[dependencies]
Sui = { git = "...", subdir = "crates/sui-framework/packages/sui-framework", rev = "..." }

No `[addresses]` section (Sui CLI 1.63+) — named addresses are derived from the [package] name and [dependencies] keys. Do not add an [addresses] or [dev-addresses] section.

Run sui move build after any significant change to verify the code compiles before proceeding.


2. Building and Testing

Always verify code compiles and tests pass using the Sui CLI:

bash
# Build
sui move build
# Run all tests
sui move test
# Run a specific test by name
sui move test swap_exact_input
Test conventions

Naming — do not prefix test functions with test_. The #[test] attribute already signals intent:

move
// ✅
#[test] fun create_pool() { }
#[test] fun swap_returns_correct_amount() { }
// ❌
#[test] fun test_create_pool() { }

Merge attributes — combine #[test] and #[expected_failure] on one line:

move
// ✅
#[test, expected_failure(abort_code = EInsufficientLiquidity)]
fun swap_with_zero_input() { ... }
// ❌
#[test]
#[expected_failure(abort_code = EInsufficientLiquidity)]
fun swap_with_zero_input() { ... }

Don't clean up in `expected_failure` tests — let them abort naturally, don't add scenario.end() or other teardown:

move
// ✅
#[test, expected_failure(abort_code = EInsufficientLiquidity)]
fun swap_with_zero_input() {
let mut ctx = tx_context::dummy();
let pool = create_pool(&mut ctx);
pool.swap(coin::zero(&mut ctx)); // aborts here — done
}
// ❌ — don't clean up after expected failure
#[test, expected_failure(abort_code = EInsufficientLiquidity)]
fun swap_with_zero_input() {
let mut scenario = test_scenario::begin(@0xA);
// ... test body ...
scenario.end(); // unnecessary, misleading
}

Use `tx_context::dummy()` for simple tests — only reach for test_scenario when you genuinely need multi-transaction or multi-sender behaviour:

move
// ✅ Simple test — no scenario needed
#[test]
fun create_pool() {
let mut ctx = tx_context::dummy();
let pool = new_pool(&mut ctx);
assert_eq!(pool.fee_bps(), 30);
sui::test_utils::destroy(pool);
}
// ✅ Multi-sender test — scenario is appropriate
#[test]
fun only_admin_can_set_fee() {
let mut scenario = test_scenario::begin(@admin);
// ...
scenario.end();
}

Assertions — prefer assert_eq! over assert! for value comparisons (shows both sides on failure), and never pass abort codes to assert!:

move
// ✅
assert_eq!(pool.fee_bps(), 30);
assert!(pool.is_active());
// ❌
assert!(pool.fee_bps() == 30); // doesn't show the actual value on failure
assert!(pool.is_active(), 0); // abort code conflicts with app error codes

Destroying objects in tests — use sui::test_utils::destroy, never write custom destroy_for_testing functions:

move
// ✅
use sui::test_utils::destroy;
destroy(pool);
// ❌
pool.destroy_for_testing();

3. What Move on Sui is NOT

PatternSourceDo NOT use on Sui
acquires, move_to, move_from, borrow_globalAptos / Core MoveSui has no global storage
signer typeAptos / Core MoveUse &mut TxContext and ctx.sender()
Script functionsAptosUse entry functions instead
public(friend)Legacy MoveUse public(package)
Struct without public keywordLegacy MoveAll structs must be public
let x = ... for mutable varsLegacy MoveUse let mut x = ...
use inside function bodies for module-level importsStyle issuePut use at the top of the module
&signerRust / AptosDoes not exist on Sui

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mystenlabs/sui-dev-skills/setup/badge)](https://verified-skill.com/skills/mystenlabs/sui-dev-skills/setup)

Something wrong with this skill or its page? Tell us.