Debug move
Build something meaningful, on Sui. A superpower for AI coding agents (Claude Code, Codex, Cursor, Grok Build) to ship real products on Sui.
npx -y skills add pivyme/suiperpower --skill debug-moveAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Debug Sui Move compile errors, runtime aborts, or capability leaks. Use when the user has a Move error, abort code, failed PTB, or compiler issue.
SKILL.md
6.6 KB, as published. Nobody here has run it
Preamble (run first)
# Suiperpower telemetry. Routes through the CLI so projects.json + Convex stay in sync.
# Silent on failure so the skill never blocks. Opt out: SUIPERPOWER_TELEMETRY=off.
#
# AGENT NOTE: when this skill finishes, run the matching completion command:
# suiperpower track debug-move build completed
# Or use "failed" / "aborted" if it ended that way.
command -v suiperpower >/dev/null 2>&1 && suiperpower track debug-move build started >/dev/null 2>&1 &
true
If TEL_PROMPTED is no, before doing real work, ask the user:
Help suiperpower get better. We track which skills get used and how long they take. No code, no file paths, no PII. Change anytime in
~/.suiperpower/config.json.A) Sure, anonymous B) No thanks
Write the answer to ~/.suiperpower/config.json telemetryTier field and create ~/.suiperpower/.telemetry-prompted. Then continue.
What this skill does
Diagnoses Move problems methodically. Sui Move errors fall into three buckets, compile errors, runtime aborts, and capability or ownership mistakes that compile but misbehave. This skill sorts the symptom into the right bucket, then walks the matching playbook until the bug is reproduced, understood, and fixed. It does not guess. It runs the build or the test, reads the actual error, and proceeds from evidence.
When to use it
- A
sui move buildorsui move testis failing and the user does not know why. - A PTB on testnet aborted with an
abort_codeand the user wants to trace it. - An Object will not transfer, a coin will not mint, or a shared Object cannot be locked.
- The user suspects a capability leak or an ability mismatch but cannot point at the culprit.
When NOT to use it
- The user has not written Move yet, use
build-with-move. - The bug is in TypeScript dapp-kit code or PTB construction, use
ptb-composeror the relevant frontend skill. - The user wants a security review of a working module, use
review-move. - The build error is in
Move.toml(dependency rev mismatch), this skill will route you, but resolution may belong inscaffold-project.
If you activated this and the user actually wants something else, consult skills/SKILL_ROUTER.md and hand off.
Inputs
- A failing command and its full output (do not paraphrase the error, copy it verbatim).
- The Move source file under suspicion.
- Optional:
Move.toml,.suiperpower/build-context.md, the PTB transaction digest if the error came from testnet.
If unclear, ask:
- What command did you run? Paste the exact output.
- Is this a build error, a test failure, or a runtime abort from a real transaction?
- Did the same code work yesterday? If so, what changed?
Outputs
- A working build or a green test, with the fix applied.
- A short explanation of root cause, written in
.suiperpower/build-context.mdunder a### debug-move session, <timestamp>heading. - If the bug pattern is repeatable (e.g. capability leak), a note in
learnings.mdso future builds avoid it.
The skill never edits code without reading the surrounding module and confirming the change preserves intent.
Workflow
-
Reproduce
- Run the exact failing command. Confirm the error is real and consistent.
- If the user reports a flake, run twice. Sui Move is deterministic locally; flakes usually mean a non-deterministic test (clock, randomness) or stale build artifacts.
-
Categorize
- Compile error:
error[E...]from the Move compiler. Bucket by code: ability mismatch, type mismatch, missing function, visibility. - Test abort:
MoveAbortwith a code. Read theabort_codeand find theassert!or named error const that produced it. - Runtime abort on testnet: same as test abort, but trace through the PTB by digest with
sui client tx-block <digest>. - Ownership / capability bug: code compiles but
transfer::public_transferfails, a function refuses to authorize, or a shared Object behaves unexpectedly. This category is the trickiest.
- Compile error:
-
Walk the bucket-specific playbook
- For compile errors, see
references/compile-error-playbook.md. - For aborts, see
references/abort-tracing.md. - For capability and ownership, see
references/capability-leakage.md.
- For compile errors, see
-
Fix and re-run
- Apply the smallest fix that addresses root cause, not the symptom.
- Re-run the build or the failing test. Do not declare success until output is clean.
-
Add a regression test if missing
- If the bug was a logic error not caught by tests, add one. A bug that escapes tests will return.
-
Writeback
- Append the diagnosis and the fix to
.suiperpower/build-context.md.
- Append the diagnosis and the fix to
Quality gate (anti-slop)
Before reporting done, the skill asks itself:
- Did I run the failing command and see the error first-hand, or did I guess from memory?
- Is the fix targeting root cause, not a symptom (e.g. swallowing the abort instead of fixing why it aborts)?
- Does the build or the test now pass cleanly, with no warnings I introduced?
- Did I add a test that would have caught this bug before deploy, if a test gap was the cause?
- Is the diagnosis written to
.suiperpower/build-context.mdso the next session has context? - Did I avoid disabling lints, removing assertions, or pinning to a different framework rev to make the error go away?
If any answer is no, the skill keeps working before declaring fixed.
References
On-demand references (load when relevant to the user's question):
references/compile-error-playbook.md: Common compiler error codes and the fix shape for each.references/abort-tracing.md: Readingabort_code, mapping toassert!lines, tracing PTB aborts on testnet.references/capability-leakage.md: Patterns that compile but misuse capabilities, and the safer rewrites.
Knowledge docs (load when scope expands beyond what is in references):
skills/data/sui-knowledge/03-move-and-objects.md: Object model and Move ability rules.skills/build/build-with-move/references/common-move-pitfalls.md: Cross-cutting Move pitfalls reference.
Use in your agent
- Claude Code:
claude "/suiper:debug-move <your message>" - Codex:
codex "/debug-move <your message>" - Grok Build: run
grok, then/debug-move <your message>in the session - Cursor: paste a chat message that includes a phrase like "fix my Move error", or load
~/.cursor/rules/debug-move.mdcand reference it.
If you activated this and the user actually wants something else, consult skills/SKILL_ROUTER.md and hand off.