sui-publish

Publish, upgrade, and deploy Sui Move packages with UpgradeCap governance.

10|5|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/MystenLabs/skills --skill sui-publish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sui-publish
Source: https://github.com/MystenLabs/skills/tree/main/sui-publish
Command: npx skills add https://github.com/MystenLabs/skills --skill sui-publish

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Publishing, upgrading, and deploying Sui Move packages is error-prone because you must coordinate the right CLI commands, environment/network selection, UpgradeCap handling, and dry-run debugging so changes are compatible and production-safe.

Core Features & Use Cases

  • First-time publishing & pre-publish validation: Verify active environment, SUI balance, and successful sui move build before running sui client publish.
  • Upgrading with UpgradeCap + policies: Apply sui client upgrade using the correct UpgradeCap, select the appropriate upgrade policy (compatible/additive/dependency-only), and optionally restrict or destroy the cap for immutability.
  • Multi-network deployment + offline/local workflows: Publish to Testnet/Devnet/localnet with environment switching, use ephemeral test-publish for upgrades/testing, and use localnet for fast iteration.
  • Production readiness + transaction debugging: Use --dry-run for gas estimation and devInspectTransactionBlock to diagnose dry-run failures before signing or executing.

Quick Start

Ask the skill to publish your Move package by first verifying your active environment and build, then running sui client publish and returning the package ID, UpgradeCap, and any init-created object IDs.

Frequently Asked Questions about sui-publish

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish a Sui Move package to Testnet or Devnet?

To publish a Sui Move package, verify your active environment and SUI balance, run `sui move build`, then execute `sui client publish` to deploy and retrieve your package ID, UpgradeCap, and init-created object IDs.

How does UpgradeCap governance work when upgrading a Sui Move package?

UpgradeCap governance authorizes `sui client upgrade` operations, requiring you to select an upgrade policy (compatible, additive, or dependency-only) and optionally restrict or destroy the cap to enforce immutability.

What is the best way to estimate gas for a Sui Move deployment?

The best way to estimate gas for a Sui Move deployment is using the `--dry-run` flag with your publish or upgrade command to preview transaction costs without signing or executing.

Can I use localnet for fast iteration when testing Sui Move package upgrades?

Yes, you can use localnet for fast iteration when testing Sui Move package upgrades, and you can also use ephemeral `test-publish` workflows to validate changes before committing to a network deployment.

Why does my Sui Move package dry-run fail before publishing?

Your Sui Move dry-run fails due to incompatible upgrade changes or build errors, which you can diagnose using `devInspectTransactionBlock` to inspect the transaction block before signing or executing.

How do I re-publish a Sui Move package to a new network?

To re-publish a Sui Move package to a new network, switch your active CLI environment and run `sui client publish` again, ensuring you handle the new `Published.toml` behavior and retrieve the new package ID and UpgradeCap.