Claude Code for Sui

Give Claude Code standing Sui and Move conventions, without rewriting the CLAUDE.md you already have.

Last updated Aug 21, 2026

Tags

claudesetupai

What this does

Claude Code is good at Sui the moment it knows Sui's rules, and bad at it by default — left alone, it reaches for Solidity habits, invents framework APIs, and writes SDK calls against a JSON-RPC client that has been deprecated. This page installs a standing rule file that corrects all three, permanently, for every session in the repo.

It does not install Claude Code, and it does not touch your application or contract code.

When Claude Code is the right tool

Reach for Claude Code when the work is terminal-first: a failing sui move test you need to chase, SDK logs to read, an unfamiliar package to walk before changing anything. It explores, runs commands, and proposes multi-step changes, which makes it the strongest of the three for investigate-then-fix work.

Use Cursor for tight edit loops in the editor. Use Codex when the task is already well specified and you mostly want it written.

How to install it

Press Copy markdown at the top of this page and paste it into Claude Code, started from your repo root.

What you copy is not this page. It is an instruction set written for the agent: it inventories your repo first, reports what it found, and then creates the rule file. You do not need to add a prompt in front of it — pasting is enough.

If you would rather point an agent at a URL than paste, the same payload is served as plain markdown at /start-building/ai-setup/claude/agent.md.

What lands on disk

Claude Code's rule surface is CLAUDE.md, which is usually a file you already care about — so the Sui rules do not go inside it. They go in their own file, pulled in by a single import line:

  • a new file, .claude/sui-move.md, holding the rules
  • one line appended to CLAUDE.md: @.claude/sui-move.md

Everything already in your CLAUDE.md stays where it is, and removing the rules later means deleting one line. Prefer this to pasting the rules inline: the moment there are two copies, they drift, and the stale one is the one that gets loaded.

If you would rather keep it personal, tell the agent so and it writes ~/.claude/sui-move.md with a matching import in ~/.claude/CLAUDE.md, which follows you across every Sui repo and stays out of the project.

An existing root AGENTS.md is left alone. That matters more than it sounds: a common setup symlinks AGENTS.md to CLAUDE.md, and an agent told to "create AGENTS.md" will happily write through the link and destroy the other file.

What the rules actually enforce

Your repo outranks the rules. The edition and dependency rev come from your Move.toml, read at the time of asking — never from a value baked into a rule that was true when someone wrote it. Move sources are found by locating Move.toml, not by assuming a sources/ directory. Commands use whichever package manager your lockfile implies.

Ownership is treated as security. Object ownership, the key / store / copy / drop abilities, and transfers are handled as security-critical rather than mechanical. Visibility has to match intent, so public never gets widened just to make something compile. Admin, mint, and publisher capabilities must be gated, and shared-object mutations come with a note about congestion and authorization.

Deprecated clients are flagged, not silently rewritten. New code defaults to SuiGrpcClient from @mysten/sui/grpc, with SuiGraphQLClient for indexed or historical queries and @mysten/dapp-kit-react for new UI. Where old SuiClient code already exists, the agent is told to point it out and propose a migration — not to start rewriting working call sites in the middle of an unrelated task.

Scope its writes

Because Claude Code runs commands and edits freely, the rules end by asking it to name the directories it intends to write to before it starts. Hold it to that, especially in a monorepo where a contracts package and a web app sit side by side.

How to tell it worked

Ask Claude to review your Move package for ownership and capability bugs, without listing what to look for.

If the rules loaded, the answer talks about abilities, entry versus public visibility, and capability gating unprompted, and it quotes the real edition from your Move.toml instead of a generic one. If it gives you a vague code-style review, the import is not resolving.

Skills, if you want more depth

Rules are always on and should stay short. Skills load on demand and can be long, which makes them the right home for deep procedures — a Move security review pass, a zkLogin debugging walkthrough, a Walrus upload checklist.

Official Sui skills install with skills add mystenlabs/skills, run through whichever package runner your project uses. Start with --list rather than a name you remember: the catalogue moves, and the upstream README currently lags the repo. Task-specific ones live under Start building → Browse AI prompts, saved as .claude/skills/<name>/SKILL.md. Check what you already have installed first — duplicate skills covering the same ground make the agent pick arbitrarily.

One safety note

Never put private keys, mnemonics, or production secrets in a rule file or a skill sample. Rule files are always in context, they get committed, and they end up in screenshots.