MCPInstall

setup-sui-contracts

Set up a Sui Move smart contract project with OpenZeppelin Contracts for Sui. Use when users need to: (1) install the Sui CLI and Move toolchain, (2) create a new Sui Move package, (3) discover and add OpenZeppelin Sui dependencies to Move.toml via the Move Registry (MVR), (4) learn the integration pattern from the library's examples and API docs before implementing, or (5) understand Sui Move import conventions and build/test commands for OpenZeppelin.

Installs
75
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill setup-sui-contracts
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads setup-sui-contracts automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Sui Setup

Prerequisites

Install the Sui CLI by following the Sui installation guide. The CLI bundles the Move toolchain and the Move Registry (MVR) resolver, so no separate Move install is needed.

Any time you need to investigate the library, start from its AI discovery entry point, llms.txt — it maps the library's content (the architecture doc, the contracts/ and math/ package catalogs, each package's README/examples/API reference, and audits). Follow its links rather than guessing paths.

OpenZeppelin Contracts for Sui pins a specific Sui CLI version in its top-level README (this is repo metadata, not linked from llms.txt) — read the required version there and check your local install against it. The pinned version is the tested one and safest to match; a newer patch/minor generally works too, so treat a small drift as a warning, not a blocker:

sui --version

Create a Project

Initialize a new Move package (only if starting a new project):

sui move new my_project
cd my_project

This creates Move.toml, a .gitignore, and commented-out stub modules sources/my_project.move and tests/my_project_tests.move, using Move edition = "2024". The stubs are inert placeholders (fully wrapped in /* … */); replace or delete them when you add your own modules.

OpenZeppelin Dependencies

OpenZeppelin packages are published to the Move Registry (MVR) and added to Move.toml under [dependencies] with the r.mvr format, mapping the Move package name to its MVR slug:

[dependencies]
<move_package_name> = { r.mvr = "@openzeppelin-move/<slug>" }

Do not rely on a memorized package list — it drifts as the library evolves. Discover what is available from the library's own metadata, which is the single source of truth:

  1. Start — as always — at the AI discovery entry point, llms.txt.
  2. Follow its links to every package catalog it lists — llms.txt is the authority on which catalogs exist, so read the set from there rather than assuming a fixed one (new top-level catalogs get added over time). Each catalog table lists the MVR slug, the Move package name, docs, and highlights.
  3. Read the individual package's README.md for the exact r.mvr install snippet and its module list. Confirm the slug resolves — either by looking it up on moveregistry.com or, definitively, by running the build (below), which resolves every slug against the MVR.

Catalog paths are relative to the catalog file's own directory. A catalog at <catalog-dir>/README.md lists each package by a Path relative to <catalog-dir>/, so the package's raw README is .../main/<catalog-dir>/<path>/README.md — resolve <path> against the directory of the catalog that links it, not the repo root (the bare .../main/<path>/README.md 404s). When in doubt, list the tree: gh api 'repos/OpenZeppelin/contracts-sui/git/trees/main?recursive=1' (quote the endpoint — an unquoted ? is a glob in some shells).

The Move package name (used in use statements) differs from the MVR slug — slug @openzeppelin-move/integer-math is Move package openzeppelin_math. Only add the packages the project actually uses.

A package usually contains several modules. The catalog lists packages; the building block you want is often one module among several inside a package. Read the package README's module list and its examples/ to see what a package actually exposes — don't assume one package equals one component, and don't rely on a fixed mental catalog: the set of packages and modules grows over time.

The OpenZeppelin Sui MCP exposes this same metadata as deterministic tool calls — sui-list-recipes (discover recipes), sui-get-recipe (a recipe's source plus the packages it uses, each with its install line), and sui-get-package (a package's install line + docs). When the MCP is available, query it instead of crawling the files by hand, then wire the returned install lines into Move.toml and re-home the recipe source into your package. The MCP returns data, not a buildable package — that wiring and re-homing are what turn it into one.

Packages not on the Move Registry

Not every package is on the Move Registry — some are not published there at all. When a package's README.md has no r.mvr install snippet, depend on it from a GitHub release instead — a git dependency pinned to a release tag, never a moving branch:

[dependencies]
<move_package_name> = { git = "https://github.com/OpenZeppelin/contracts-sui.git", subdir = "<catalog-dir>/<path>", rev = "<release-tag>" }

<catalog-dir>/<path> is the package's directory in the repo (the same Path its catalog row lists); pin rev to a published GitHub release tag, not a branch. Keep every OpenZeppelin dependency on one consistent revision to avoid the diamond conflict below.

Resolving version conflicts (diamond dependencies)

Two OZ packages can pull different revisions of a shared transitive dependency — for example, if one package embeds its own revision of a math package that you also depend on directly. When that happens the build aborts:

Package depends on multiple versions of the package with ID 0x…

Resolve it by adding override = true to the directly-declared dependency, which forces every consumer onto that revision:

[dependencies]
openzeppelin_math = { r.mvr = "@openzeppelin-move/integer-math", override = true }
openzeppelin_fp_math = { r.mvr = "@openzeppelin-move/fixed-point-math" }

Study the Examples and Docs Before Implementing

Do this before writing any integration code — most users don't know the full catalog, and it grows over time, so let the library show you what it provides and how it's meant to be composed. For each package you plan to use:

  1. Study its examples/. Every package ships compilable, CI-tested integration examples — these are the canonical composition recipes and the fastest way to see the real usage pattern (initialization, capability/witness flow, object ownership, tests). Prefer copying and adapting an example into sources/ over writing from scratch.

    Read examples and metadata from main; pin dependencies to a release. All AI metadata — llms.txt, the catalogs, package READMEs, STYLEGUIDE.md, and the examples/ — should be read from the main branch, which carries the latest and most complete set (a package may have examples on main that a tagged release does not). Your build dependencies, by contrast, resolve to a pinned release — an MVR slug or a git rev = "<release-tag>" (above) — so builds stay reproducible. The two can differ: an example copied from main may reference an API newer than your pinned release, in which case adapt it (or bump the pinned release) when you re-home.

    Re-home a copied example. Example modules are declared under the library's own address (e.g. module openzeppelin_access::example_reward_treasury;) — they are illustrations inside the library, not drop-in consumer code. When you copy one into sources/, rename its module to your package (module <your_package>::<module>;, where <your_package> is your Move.toml [package] name). Keep the use openzeppelin_*::… lines as-is — those reference the dependencies. If the example defines a one-time witness — a struct whose name is the module name upper-cased, consumed by init — rename that struct to match your new module name too, or init fails with "Invalid parameter … Expected a one-time witness type". You cannot define a module under a dependency's address, so a verbatim copy will not build until it is re-homed.

  2. Read the docs. Start at the documentation site for concepts and guides, then the generated API reference — reached via the Docs link in each catalog table (it points at the correct version), path .../contracts-sui/<major>.x/api/<catalog_package> where <major> matches your contracts-sui release and <catalog_package> is the short catalog name, not the Move package name — for exact signatures, parameters, and abort conditions.

  3. Read the code docs. The API reference is generated from the modules' doc-comments, so the installed source is the ground truth. Generate the same docs locally with sui move build --doc --build-env testnet (the --build-env is required whenever there are MVR deps) — this also emits the docs for every OZ dependency under build/<your_package>/docs/dependencies/<move_package_name>/ — or just read the doc-comments in the installed source.

Discover the available examples from llms.txt and each package README, then browse them in the contracts-sui repo.

Import Conventions

Import modules through the Move package name (the left side of the Move.toml entry) followed by the module name — use <move_package_name>::<module>; — then follow the usage patterns from the package's examples/ and API docs.

Some operations are exposed as method syntax (value.op(...)) via public use fun re-exports, so the underlying function may live in a different module than the type. If a free function you expect isn't found, check the package source for the public use fun lines and call it as a method.

Generate Agent Guidance

Create an AGENTS.md at the project root so any agent that later opens this project knows it is built on OpenZeppelin Contracts for Sui and where the sources of truth live. Follow the same philosophy as the contracts-sui AGENTS.md: a lean pointer file that does not restate rules — it links to the authoritative sources. Also add a CLAUDE.md containing only @AGENTS.md so Claude Code picks it up (mirroring how contracts-sui itself is set up).

# AGENTS.md

This is a Sui Move project built on **OpenZeppelin Contracts for Sui**.

## Sources of truth — read these first
- AI discovery entry point: https://raw.githubusercontent.com/OpenZeppelin/contracts-sui/main/llms.txt
  (points to the package catalogs, each package's `examples/`, the generated API reference, and audits)
- Docs: https://docs.openzeppelin.com/contracts-sui
- API reference: https://docs.openzeppelin.com/contracts-sui/<major>.x/api/<catalog_package> (`<major>` matches your contracts-sui release and `<catalog_package>` is the short catalog name; the catalog's `Docs` links carry the correct version)
- Code docs (local): `sui move build --doc --build-env testnet` → `build/<your_package>/docs/` (named after your own package; includes OZ dependencies)

## Conventions
- Before implementing, study each package's `examples/` (compilable, CI-tested composition recipes) and its API docs; prefer audited library components over custom logic.
- Import modules via the Move package name (`use <move_package_name>::<module>;`); a package typically exposes several modules — check its README and `examples/`.
- MVR-backed builds require a build env: `sui move build --build-env testnet`. If two OZ deps pull different revisions of a shared transitive package, add `override = true` to the directly-declared one.
- For fungible-asset custody, consider Sui [Address Balances](https://docs.sui.io/onchain-finance/asset-custody/address-balances/) (SIP-58) over summing `Coin` objects where it fits.
- Code style follows the OpenZeppelin Sui conventions — see Code Quality below.

## Code quality
The library's conventions are the single source of truth for Move style:
- Rules: https://raw.githubusercontent.com/OpenZeppelin/contracts-sui/main/STYLEGUIDE.md
- Design rationale: https://raw.githubusercontent.com/OpenZeppelin/contracts-sui/main/ARCHITECTURE.md
- Review procedure (reads STYLEGUIDE.md, reports/fixes violations): https://raw.githubusercontent.com/OpenZeppelin/contracts-sui/main/.claude/commands/code-quality.md

## MCP
The OpenZeppelin Sui MCP (https://mcp.openzeppelin.com/contracts/sui/mcp) serves recipes and per-package install lines as deterministic tool calls (`sui-list-recipes`, `sui-get-recipe`, `sui-get-package`) — a queryable alternative to reading `llms.txt` + the catalogs by hand. This project ships it pre-wired in `.mcp.json`. It returns data, not a buildable package — wiring the install lines into `Move.toml` and re-homing the source into this package is what turns it into one.

Also write a pre-wired MCP config at the project root so any agent understands the OpenZeppelin-on-Sui context on clone, without manual setup. Claude Code reads .mcp.json; other assistants (Cursor, Cline) take the same server URL in their own MCP config.

{
  "mcpServers": {
    "openzeppelin-sui": {
      "type": "http",
      "url": "https://mcp.openzeppelin.com/contracts/sui/mcp"
    }
  }
}

Build & Test

Because dependencies resolve through MVR, builds and tests must specify a build environment. Use testnet for development (mainnet is also available for release builds):

sui move build --build-env testnet
sui move test --build-env testnet

Without --build-env, the CLI cannot resolve r.mvr dependencies and errors with "Could not determine the correct dependencies to use for local". A green build + test on a freshly scaffolded project is the acceptance bar.

Add --lint --warnings-are-errors once the project has real code to catch style and dead-code issues early:

sui move test --build-env testnet --lint --warnings-are-errors

Testing patterns to know

A couple of Sui conventions recur when testing code built on these packages — the library's own examples/ tests are the canonical reference:

  • One-Time Witness (OTW) in tests. Modules that take an OTW consume it in init, and it can't be constructed at runtime. To exercise such a module in a unit test, expose a #[test_only] initializer that builds the OTW (its struct is constructible inside a #[test_only] context):

    #[test_only]
    public fun init_for_testing(ctx: &mut TxContext) { init(MY_OTW {}, ctx) }
    
  • Clock. Modules that depend on time take a sui::clock::Clock. In tests use create_for_testing, increment_for_testing, and destroy_for_testing.

  • Assertions. Under --warnings-are-errors, a literal abort code (assert!(cond, 0)) trips the abort_without_constant lint. In tests, use assert_eq! (from std::unit_test) or a bare assert!(cond); in non-test code, assert against a named error constant rather than a literal.

Composition constraint: a Sui init function receives no Clock (nor other runtime arguments). A component whose constructor needs a Clock therefore can't be fully built in init — create/share the object in init, then complete setup in a later entry function that takes the Clock. The package's examples/ show the intended two-step pattern.

Code Quality

Align the project's Move style with OpenZeppelin's own conventions so integrator code stays consistent with the library. As with dependencies, don't restate the rules — point at the library's single sources of truth:

  • STYLEGUIDE.md — the codified rules (Naming, Module & Package, Section ordering, Imports, Structs, Functions, Idiomatic Move 2024, Collections & object size, Testing, Lint suppression, Documentation).
  • ARCHITECTURE.md — the design rationale those rules reference (capability-based access, owned vs. shared objects, PTB composability, bounded state, upgrade safety).
  • .claude/commands/code-quality.md — the review procedure: it reads STYLEGUIDE.md and checks each .move file against it, then reports or fixes violations. The procedure is plain markdown, so any agent can follow it even though the slash command is Claude-specific.

Record these under a Code quality heading in the generated AGENTS.md (see above) so downstream agents follow the same conventions on clone.

Formatting

contracts-sui formats Move with the @mysten/prettier-plugin-move Prettier plugin — match it so integrator code lays out identically. Install it and add a .prettierrc matching the library's:

npm i -D prettier @mysten/prettier-plugin-move
{
  "tabWidth": 4,
  "printWidth": 100,
  "useModuleLabel": true,
  "autoGroupImports": "module",
  "plugins": ["@mysten/prettier-plugin-move"]
}

Then format from the repo root (Prettier silently skips .move files if the plugin isn't resolvable, so keep it in devDependencies):

npx prettier --write "**/*.move"

autoGroupImports: "module" normalizes use grouping, so run --write to let it format — don't hand-tune imports and expect --check to pass first.

The code-quality.md review procedure runs this same formatting pass after applying fixes.

FAQ

What does the setup-sui-contracts skill do?

Set up a Sui Move smart contract project with OpenZeppelin Contracts for Sui. Use when users need to: (1) install the Sui CLI and Move toolchain, (2) create a new Sui Move package, (3) discover and add OpenZeppelin Sui dependencies to Move.toml via the Move Registry (MVR), (4) learn the integration pattern from the library's examples and API docs before implementing, or (5) understand Sui Move import conventions and build/test commands for OpenZeppelin.

How do I install setup-sui-contracts?

Run npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill setup-sui-contracts in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/setup-sui-contracts/ (personal) or .claude/skills/setup-sui-contracts/ (project).

Which AI agents can use setup-sui-contracts?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is setup-sui-contracts safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains setup-sui-contracts?

It is published by openzeppelin in openzeppelin/openzeppelin-skills. It has 75 recorded installs.

More from openzeppelin/openzeppelin-skills

View all →

setup-solidity-contracts

openzeppelin/openzeppelin-skills

Set up a Solidity smart contract project with OpenZeppelin Contracts. Use when users need to: (1) create a new Hardhat or Foundry project, (2) install OpenZeppelin Contracts dependencies for Solidity, (3) configure remappings for Foundry, or (4) understand Solidity import conventions for OpenZeppelin.

Business & Finance573 installs

develop-secure-contracts

openzeppelin/openzeppelin-skills

Develop secure smart contracts using OpenZeppelin Contracts libraries. Use when users need to integrate OpenZeppelin library components — including token standards (ERC20, ERC721, ERC1155), access control (Ownable, AccessControl, AccessManager), security primitives (Pausable, ReentrancyGuard), governance (Governor, timelocks), or accounts (multisig, account abstraction) — into existing or new contracts. Covers pattern discovery from library source, CLI contract generators, and library-first integration. Supports Solidity, Cairo, Stylus, Stellar, and Sui Move.

Security548 installs

upgrade-solidity-contracts

openzeppelin/openzeppelin-skills

Open the skill to read its SKILL.md instructions.

475 installs

setup-stellar-contracts

openzeppelin/openzeppelin-skills

Set up a Stellar/Soroban smart contract project with OpenZeppelin Contracts for Stellar. Use when users need to: (1) install Stellar CLI and Rust toolchain for Soroban, (2) create a new Soroban project, (3) add OpenZeppelin Stellar dependencies to Cargo.toml, or (4) understand Soroban import conventions and contract patterns for OpenZeppelin.

Business & Finance281 installs

upgrade-stellar-contracts

openzeppelin/openzeppelin-skills

Upgrade Stellar/Soroban smart contracts using OpenZeppelin's upgradeable module. Use when users need to: (1) make Soroban contracts upgradeable via native WASM replacement, (2) use Upgradeable or UpgradeableMigratable derive macros, (3) implement atomic upgrade-and-migrate patterns with an Upgrader contract, (4) ensure storage key compatibility across upgrades, or (5) test upgrade paths for Soroban contracts.

Testing & QA257 installs

setup-stylus-contracts

openzeppelin/openzeppelin-skills

Open the skill to read its SKILL.md instructions.

212 installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs