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
npx skills add MystenLabs/skills --skill sui-build -a claude-codeWhat 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
testnetwithsui 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-code2Manually: put the files in place
~/.claude/skills/sui-build-test/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sui-build-test/
1Skills CLI (Vercel)
npx skills add MystenLabs/skills --skill sui-build -a codex2Manually: put the files in place
.agents/skills/sui-build-test/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add MystenLabs/skills --skill sui-build -a cursor2Manually: put the files in place
.cursor/skills/sui-build-test/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install MystenLabs/skills sui-build-test2Manually: put the files in place
.github/skills/sui-build-test/SKILL.md1Skills CLI (Vercel)
npx skills add MystenLabs/skills --skill sui-build -a gemini-cli2Platform CLI
gemini skills install https://github.com/MystenLabs/skills --path sui-build-testManually: put the files in place
.devin/skills/sui-build-test/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add MystenLabs/skills --skill sui-build -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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