Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sui-publish

БесплатноБез исполняемых скриптовНе проверен

Publishing, upgrading, and deploying Sui Move packages. Use this skill when the user needs to publish a package, upgrade a published package, deploy to…

MystenLabsот MystenLabs★ 25 звёзд на GitHub

Об этом скилле

Publishing, Deploying & Local Network

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 and MystenLabs/sui-stack-hello-world.

Publishing a package

Canonical hello-world publish flow

For the full-stack starter, publish the existing hello-world package only:

cd sui-stack-hello-world/move/hello-world
sui move build
sui client publish

Use the package ID from the publish output to update sui-stack-hello-world/ui/src/constants.ts (TESTNET_HELLO_WORLD_PACKAGE_ID). Do not publish a separate counter package, and do not create a second project directory.

Pre-publish checklist

  1. Verify your active environment: sui client active-env
  2. Verify you have SUI tokens: sui client balance
  3. Build successfully: sui move build

Publish

sui client publish

This deploys the package to the active network and returns:

  • A unique package ID (use this for all future interactions)
  • An UpgradeCap object (sent to your address, controls future upgrades)
  • Object IDs for anything created during init functions

Test publishing (ephemeral networks)

Use sui client test-publish to publish a package to an ephemeral environment for testing without persisting state to a real network:

sui client test-publish

This publishes the package, runs init functions, and returns the same output as sui client publish (package ID, UpgradeCap, created objects), but the deployment is not permanent. Use it to:

  • Verify that init functions execute correctly before committing to a real publish
  • Test publish + upgrade flows in CI without consuming Testnet/Devnet resources
  • Validate gas costs and object creation before a Mainnet deploy

test-publish respects --build-env for multi-environment packages:

sui client test-publish --build-env testnet

After publishing

The publish transaction output lists the package ID under the created objects section (alongside the UpgradeCap and any objects created by init functions). The published-at field is also automatically added to your Published.toml. To interact with the published package:

# Call a function
sui client call --package <PACKAGE_ID> --module greeting --function new

# Query an object
sui client object <OBJECT_ID>

"Your package is already published" error

If you see this error when running sui client publish, it means Published.toml already has an entry for your active environment. This happens when iterating on a package during development.

  • To publish to a different network, switch environments with sui client switch --env <ENV> and run sui client publish again. The toolchain tracks published addresses per environment in Published.toml automatically — do not delete Published.toml.
  • To upgrade the existing package on the same network, use sui client upgrade (see below).

Upgrading a published package

Published packages are immutable, but you can upgrade by publishing a new version linked to the original. The UpgradeCap object controls upgrade authority. Important: you can restrict the UpgradeCap in the same PTB as the publish command — for example, publishing and immediately calling sui::package::only_additive_upgrades in one atomic transaction. You can also destroy it entirely to make the package permanently immutable (see upgrade policies below).

sui client upgrade --upgrade-capability <CAP_ID>

Finding your UpgradeCap

The UpgradeCap object ID is needed for every upgrade. There are several ways to find it:

  1. Published.toml (preferred): After publishing, the toolchain records the cap ID in Published.toml under the upgrade-capability field for each environment.
  2. Query owned objects: List all UpgradeCap objects owned by the publish address:
    sui client objects --type 0x2::package::UpgradeCap
    
  3. Publish transaction output: The original sui client publish output includes the UpgradeCap object ID in the created objects list.
  4. Explorer: Search for your address on SuiVision (suivision.xyz) or Suiscan (suiscan.xyz) and filter owned objects by type 0x2::package::UpgradeCap.

Upgrade policies

Upgrade policies restrict what can change:

  • Compatible (default): The most permissive policy. See detailed rules below.
  • Additive: New modules can be added, but existing modules cannot change at all.
  • Dependency-only: Only dependency versions can be updated. No code changes.

Restricting the UpgradeCap in the same PTB as publish: You can restrict the UpgradeCap in the same programmable transaction block as th

Полный SKILL.md на GitHub

Установить sui-publish в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evals/evals.json

FAQ

Что делает скилл sui-publish?

Publishing, upgrading, and deploying Sui Move packages. Use this skill when the user needs to publish a package, upgrade a published package, deploy to multiple networks, serialize transactions for multisig signing, run a local Sui network (localnet), prepare for Mainnet launch, monitor production deployments, or debug dry run failures. Also use when the user asks about sui client publish, sui client upgrade, UpgradeCap, upgrade policies, Published.toml, --serialize-output, localnet, mainnet launch checklist, gas estimation, multisig publishing, production monitoring, rollback, incident response, devInspectTransactionBlock, or --dry-run.

Как установить скилл sui-publish?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sui-publish запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить sui-publish с