move-bytecode-comprehension

A guide to reading compiled Move bytecode and Sui disassembly. Bytecode is the machine-readable form of a program after compilation, and disassembly presents it in a readable instruction format.

In plain words
What is it for?
Use it to understand on-chain Sui packages, inspect `.mv` files, and reason about modules, structs, functions, abilities, visibility, and signatures in disassembly.
Why use it?
It clarifies what information remains after compilation and what has been removed, so developers do not mistake missing names or comments for missing behavior.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mystenlabs/sui/move-bytecode-comprehension
Any agent
npx skills add MystenLabs/sui --skill move-bytecode-comprehension
Clone the repo
git clone --depth 1 https://github.com/MystenLabs/sui

Made for: Claude Code, Codex.

Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 958 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00084 $0.00958
Opus 5 $0.00042 $0.00479
Sonnet 5 $0.00017 $0.00192
Haiku 4.5 $0.00008 $0.00096

Measured yesterday against content hash 9d42803f382a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

move-bytecode-comprehension scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

crates/sui-prompt/src/skills/move-bytecode-comprehension/SKILL.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Move Bytecode Comprehension

Self-bootstrap: before relying on the routing below, load every reference file — default to sui prompt skill move-bytecode-comprehension --all, or --list + --file <ref> when budget is tight. This SKILL.md is the mental-model wrapper; reference files cover the binary format and the practice of reading disassembly.

On-chain Sui packages are compiled Move bytecode (.mv, magic 0xA11CEB0B). For analysis you read it as disassembly (stack-machine, via sui move disassemble). This skill is the mental model for the binary format and for reading disassembly soundly.

The single most important fact when reading Move bytecode: abilities, visibility, the entry flag, signatures (incl. generics/phantom), and all on-chain identifiers — module/struct/field/function names — are preserved. What is lost is human intent metadata: constant/error names, #[error] messages, local variable names, comments, and macro structure. Tune reasoning accordingly.

What survives compilation — the survival table

Source construct In bytecode? How it appears in disassembly Implication
Module address + name module <addr>.<name> Identity is exact
Struct names struct Name ... Type-name reasoning is reliable
Field names + types listed on the struct Field-level reasoning holds
Abilities (key/store/copy/drop) has store, key Capability / soulbound / hot-potato reasoning is reliable
Visibility (private/public/friend) keyword on fn Call-surface reasoning is reliable
entry flag entry keyword Tx-entry reasoning is reliable
Function signatures full (Arg0: T, ...): Ret Param/return reasoning holds
Generics + phantom type params <T> / phantom Type-identity reasoning holds
Constant values LdConst[i](T: ...) Values readable, names are not
Constant / error names LdConst[i] index only Use abort codes/positions, not names
#[error] messages Error intent lost; reason from the abort site
Local variable names loc0, Arg1, … Don't trust names; trust dataflow
Comments / doc No author intent text
Macros (assert!, 1u8.do!) expanded inlined opcodes / branches A macro looks like its expansion
Empty struct (e.g. OTW) ✓ (as 1 field) dummy_field: bool OTW detect via name+drop+synthetic field

Read the full file on GitHub · 64 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 64 lines · 84 tokens per session scan A 9d42803f382a

Subscribe to this mod's changes

move-bytecode-comprehension is a skill published in the GitHub repository MystenLabs/sui (7,741 stars, last pushed yesterday), licensed Apache-2.0. It adds 84 tokens to every session and 958 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

squash-bugbot

Triage unresolved bot review comments on a GitHub PR. Use when asked to run /squash-bugbot or to assess, fix, dismiss, reply to, or resolve bot review feedback.

LFDT-Lineth/lineth-monorepo · 52 tokens

developing-smart-contracts

Solidity smart contract development guidelines for Lineth blockchain. Use when writing, reviewing, or refactoring Solidity contracts, or when the user asks about Solidity best practices, contract structure, or NatSpec docstrings. Covers NatSpec documentation, naming conventions, file layout, and code style.

LFDT-Lineth/lineth-monorepo · 63 tokens

lineth-quickstart

Operating manual for the Lineth Stack quickstart — the Docker-Compose dev/demo stack at docs/getting-started/lineth-stack in the lineth-monorepo that boots a local Linea/Lineth L2 with Sepolia or local L1 finality. Use whenever you are working inside the lineth-stack quickstart and need to boot or run the stack…

LFDT-Lineth/lineth-monorepo · 228 tokens

frontend-design

Create distinctive, production-grade Stellar dApp UI. Combines bold aesthetic direction with smart contract integration patterns — wallet connection flows, transaction UX, contract data displays, and agentic kit hook wiring. No generic "AI slop" aesthetics.

rylsherdamz-rgb/stellar-forge · 51 tokens

stellar-mcp

MCP (Model Context Protocol) tools for Stellar development. Gives Claude direct access to the Stellar blockchain, filesystem, GitHub, and Playwright through configured MCP servers. Use when querying chain data, deploying contracts, managing repos, or running e2e tests from within the agent.

rylsherdamz-rgb/stellar-forge · 61 tokens

klever-dev

End-to-end Klever blockchain development — smart contracts (Rust/WASM), transaction building (@klever/connect, klever-go-sdk), deployment via ksc + koperator, and on-chain interaction via MCP tools. Use when the task involves KLV, KDA tokens, klv1 addresses, Klever smart contracts, or Klever node/API interaction.

klever-io/mcp-klever-vm · 76 tokens