Skip to main content
skill CX Codex

sui-build — Claude Code skill for Move builds and setup

The sui-build Claude Code skill guides Move package builds with sui move build. The agent uses it for Move coding and questions about the build command.

Apache-2.0 613 installs ★ 25 updated 2026-11-12

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MystenLabs/skills --skill sui-build -a claude-code
Open on GitHub

What sui-build does

The skill explains how to compile a Move package with sui move build, run tests, and inspect coverage. When Move.toml defines several networks, it describes selecting one with --build-env; a build can fail to resolve dependencies if no default environment is set.

It also covers sui::test_scenario, std::unit_test, the Move Trace Debugger, and replaying transactions with sui replay. The sui command is required. The Sui documentation MCP server is an optional reference when available.

What it helps with

  • build a Move package
  • select a network with --build-env
  • run Move tests and inspect coverage
  • investigate build or test failures

Example prompts for the agent

  • Build the Move package with sui move build.
  • Run tests for testnet with sui move test --build-env testnet.
  • Show test coverage with sui move test --coverage.

How to install sui-build

1Skills CLI (Vercel)

npx skills add MystenLabs/skills --skill sui-build -a claude-code

2Manually: put the files in place

~/.claude/skills/sui-build-test/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sui-build-test/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about sui-build

How do I install sui-build in Claude Code?

Run npx skills add MystenLabs/skills --skill sui-build -a claude-code. The skill file path is ~/.claude/skills/sui-build-test/SKILL.md.

What does sui-build do?

It guides Move package builds, environment selection, test runs, and coverage checks.

What does sui-build need to work?

The sui command is required. The Sui documentation MCP server can also be used when available.

Source text

SKILL.md · Apache-2.0
---
name: sui-build
description: >
  Use this skill when the user needs to build Move code, or when when the user 
  asks about sui move build.
---

# Building Packages

> **MCP tool:** When available in your environment, also query the Sui documentation MCP server (`https://sui.mcp.kapa.ai`) for up-to-date answers. Use it for verification and for details not covered by these reference files.

> **Source constraint:** All information sourced exclusively from [docs.sui.io](https://docs.sui.io) and [move-book.com](https://move-book.com).

## Building

```bash
sui move build
```

This compiles all modules, validates types, enforces resource safety, and produces bytecode. Fix any errors before proceeding.

For the canonical hello-world repository, run build commands from `sui-stack-hello-world/move/hello-world`.

### `--build-env` flag

When a package has an `[environments]` section in `Move.toml` with multiple networks, use `--build-env` to target a specific environment:

```bash
sui move build --build-env testnet
sui move build --build-env mainnet
```

This resolves dependencies and package addresses for the specified environment. Without `--build-env`, the build uses the default environment or may fail with "Could not determine the correct dependencies" if multiple environments are defined and no default is set.

The `--build-env` flag also applies to `sui move test`:

```bash
sui move test --build-env testnet
```

## Testing

```bash
sui move test
```

### Key testing modules

- **`sui::test_scenario`** — Multi-transaction, multi-sender test scenarios. Simulates realistic transaction flows with `begin`, `next_tx`, and `end`.
- **`std::unit_test`** — Assertion macros for unit tests (`assert_eq!`, `assert_ne!`).

### Code coverage

Track which lines your tests exercise:

```bash
sui move test --coverage
```

View coverage results for a specific module:

```bash
sui move coverage source --module <name>
```

### Move Analyzer

Install via suiup:

```bash
suiup install move-analyzer
```

Then install the **Move Analyzer** extension in VS Code. It provides code completion, go-to-definition, inline diagnostics, and hover documentation. It activates automatically for `.move` files — no additional configuration needed.

### Debugging

- **Move Trace Debugger:** Step-through debugger for Move execution traces with variable inspection.
- **`sui replay`:** Locally re-execute any past onchain transaction and compare effects. Useful for diagnosing production issues.
- **`std::debug::print`:** Print values during test execution.

© MystenLabs · Apache-2.0 · MystenLabs/skills

Similar skills

All skills for Programming languages →

From the same set30

The whole set →
sui-move-project sui-move-project is a Claude Code skill for setting up Sui Move projects and fixing Move.toml, dependency, and build issues. It activates for project creation and legacy-format migrations. CX Codex +1 620installs sui-object-model The sui-object-model Claude Code skill covers Sui objects and helps answer questions about ownership, transfers, and data storage in Sui Move. It activates for choices between ownership types or storage patterns. CX Codex +1 617installs composable-move-functions composable-move-functions — a skill for Claude Code enforces conventions for Sui Move function signatures. It activates when designing public APIs, ordering parameters, and handling object returns for PTB composition. CX Codex +1 616installs move-unit-testing The move-unit-testing Claude Code skill guides unit testing for Move smart contracts on Sui. It activates when asked to write tests or add them to a Move module. CX Codex +1 615installs modern-move-syntax modern-move-syntax — a skill for Claude Code that enforces Move 2024 edition syntax for Sui smart contracts. It replaces legacy module calls with method dot notation, loop macros, and clean literals. CX Codex +1 613installs accessing-data accessing-data — a skill for Claude Code that guides data fetching on Sui across gRPC, GraphQL RPC, Archival Store, Walrus, and sui-indexer-alt. Triggers on queries about balances, objects, and JSON-RPC migrations. CX Codex +1 491installs ptbs ptbs — a skill for Claude Code helps write, review, and debug Sui Programmable Transaction Blocks. It applies to TypeScript SDK and CLI transactions, gas handling, and sponsored flows. CX Codex +1 491installs sui-sdks sui-sdks — a Claude Code skill for navigating the Sui blockchain SDK ecosystem and wiring up projects. It triggers when starting a Sui project, porting code, or comparing SDK APIs. CX Codex +1 487installs

Project sponsors

Companies that keep this analytics open