Source profileQuality 91/100

mission69b/t2000/t2000-skills/skills/sui-move-security/SKILL.md

sui-move-security

Write and review Sui Move that touches value using OpenZeppelin's audited primitives instead of hand-rolled math or access control. Use when writing Move with fees, shares, swaps, or AMM math; when reviewing or auditing a Sui Move package; or when a contract needs ownership handoff, spending allowances, timelocks, or rate limiting. Teaches the never-roll-your-own rules and where each OZ package applies.

Source repository stars
23
Declared platforms
0
Static risk flags
0
Last source update
2026-08-05
Source checked
2026-08-05

Decision brief

What it does—and where it fits

Write and review Sui Move that touches value using OpenZeppelin's audited primitives instead of hand-rolled math or access control. Teaches the never-roll-your-own rules and where each OZ package applies.

Best for

  • In May 2025 a single flawed overflow check in a shared math library — a checkedshl-class function that silently passed a value it should have rejected — led to the Cetus exploit: $223M drained from the largest DEX on Su…
  • OpenZeppelin Contracts for Sui (MIT) is that library. This skill is the map; the SSOT is upstream — start from the machine-readable entry point when you need detail:

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/mission69b/t2000 --skill "t2000-skills/skills/sui-move-security"
Safe inspection promptEditorial

Inspect the Agent Skill "sui-move-security" from https://github.com/mission69b/t2000/blob/d05c3ebbaba298d6c2b1d8f9f352c065c6e94ce3/t2000-skills/skills/sui-move-security/SKILL.md at commit d05c3ebbaba298d6c2b1d8f9f352c065c6e94ce3. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Hard rules (apply to every Move review and every new module)

    1. Never write (a b) / c manually. The intermediate product overflows even when the final result would fit. Use muldiv (widens internally, returns Option). Power-of-two denominator (Q64.64 / tick math)? Use mulshr — the Cetus exploit lived in exactly this operation class. 2. Rou…

    Never write (a b) / c manually. The intermediate product overflowsRounding is a protocol decision, not a detail. Every OZ divide/shift/Handle the Option at the boundary. Overflow-prone ops return
  2. 02

    Review checklist (auditing a Sui Move package)

    [ ] Any manual followed by / on a value path → replace with muldiv.

    [ ] Any manual followed by / on a value path → replace with muldiv.[ ] Any on amounts, prices, or liquidity → checkedshl/checkedshr.[ ] Every rounding direction stated and justified (who absorbs the remainder?).
  3. 03

    Purpose

    In May 2025 a single flawed overflow check in a shared math library — a checkedshl-class function that silently passed a value it should have rejected — led to the Cetus exploit: $223M drained from the largest DEX on Sui, and a corrupted fixed-point intermediate that multiple do…

    In May 2025 a single flawed overflow check in a shared math library — a checkedshl-class function that silently passed a value it should have rejected — led to the Cetus exploit: $223M drained from the largest DEX on Su…OpenZeppelin Contracts for Sui (MIT) is that library. This skill is the map; the SSOT is upstream — start from the machine-readable entry point when you need detail:
  4. 04

    Install (Move.toml — MVR, pin stable releases)

    Verify with sui move build. Each package ships compilable examples under its examples/ dir — read them before wiring (composition recipes, not docs prose).

    Verify with sui move build. Each package ships compilable examples under its examples/ dir — read them before wiring (composition recipes, not docs prose).
  5. 05

    The package map (which one for which job)

    Review the “The package map (which one for which job)” section in the pinned source before continuing.

    Review and apply the “The package map (which one for which job)” source section.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars23SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
mission69b/t2000
Skill path
t2000-skills/skills/sui-move-security/SKILL.md
Commit
d05c3ebbaba298d6c2b1d8f9f352c065c6e94ce3
License
MIT
Collected
2026-08-05
Default branch
main
View the original SKILL.md

Sui Move Security — OpenZeppelin Contracts for Sui

Purpose

In May 2025 a single flawed overflow check in a shared math library — a checked_shl-class function that silently passed a value it should have rejected — led to the Cetus exploit: ~$223M drained from the largest DEX on Sui, and a corrupted fixed-point intermediate that multiple downstream protocols depended on. The lesson is structural, not incidental: value-path math and privileged-capability handling must come from audited primitives, never be hand-rolled.

OpenZeppelin Contracts for Sui (MIT) is that library. This skill is the map; the SSOT is upstream — start from the machine-readable entry point when you need detail: https://raw.githubusercontent.com/OpenZeppelin/contracts-sui/main/llms.txt

Hard rules (apply to every Move review and every new module)

  1. Never write (a * b) / c manually. The intermediate product overflows even when the final result would fit. Use mul_div (widens internally, returns Option). Power-of-two denominator (Q64.64 / tick math)? Use mul_shr — the Cetus exploit lived in exactly this operation class.
  2. Rounding is a protocol decision, not a detail. Every OZ divide/shift/ root takes an explicit RoundingMode — there is no default. Rule of thumb: round down on protocol-to-user payouts (vault shares both directions — the vault keeps the remainder), up only for conservative upper bounds the protocol absorbs, nearest() for quotes/display. If a deposit rounds up or a withdrawal rounds up, you built a drain loop.
  3. Handle the Option at the boundary. Overflow-prone ops return Option<T>: abort with a domain error (.destroy_or!(abort EMathOverflow)), cap at a safe value, or propagate — but never destroy_some() blind.
  4. Never shift with << / >> on value paths. Move's native shifts silently discard bits. checked_shl / checked_shr return None when any non-zero bit would be lost.
  5. (a + b) / 2 overflows near type max — use average(a, b, mode).
  6. Decimal conversions go through decimal_scaling (safe_upcast_balance / safe_downcast_balance) — never a hand-written * 10^k. Downcasts truncate; if the remainder matters, capture it before the downcast.
  7. u64 is the standard width (Sui coin balances, timestamps, gas). Reach for u128/u256 only when the domain demands it; never use u512 directly (it exists for the library's internal widening).
  8. Privileged capabilities need transfer policies. Raw transfer::transfer(admin_cap, new_owner) is a one-shot, typo-fatal handoff. Use openzeppelin_access (two-step approvals, time-locked transfers); for delayed privileged ops, openzeppelin_timelock.

Install (Move.toml — MVR, pin stable releases)

[dependencies]
openzeppelin_math = { r.mvr = "@openzeppelin-move/integer-math" }
openzeppelin_fp_math = { r.mvr = "@openzeppelin-move/fixed-point-math" }
openzeppelin_access = { r.mvr = "@openzeppelin-move/access" }
openzeppelin_utils = { r.mvr = "@openzeppelin-move/utils" }

Verify with sui move build. Each package ships compilable examples under its examples/ dir — read them before wiring (composition recipes, not docs prose).

The package map (which one for which job)

NeedPackage (MVR)Teaching
Fees, shares, swap quotes, interest@openzeppelin-move/integer-mathmul_div/mul_shr/average + explicit rounding + Option boundary
Prices, ratios, signed deltas@openzeppelin-move/fixed-point-math9-decimal UD30x9/SD29x9 on u128 — same explicit-rounding philosophy
Ownership handoff of caps@openzeppelin-move/accesstwo-step approvals, time-locked transfers — no one-shot cap sends
Throttling on-chain actions@openzeppelin-move/utilsrate limiter: token bucket, fixed window, cooldown
Bounded delegated spendingopenzeppelin_allowance (path dep)capability-keyed budgets — owner keeps custody
Scheduled/locked releasesopenzeppelin_finance / openzeppelin_timelock (path deps)vesting curves · delayed-operation controller

Canonical snippet (fee quote, from the OZ docs)

module my_sui_app::pricing;

use openzeppelin_math::{rounding, u64};

const EMathOverflow: u64 = 0;

public fun quote_with_fee(amount: u64): u64 {
    u64::mul_div(amount, 1025u64, 1000u64, rounding::nearest())
        .destroy_or!(abort EMathOverflow)
}

Review checklist (auditing a Sui Move package)

  • Any manual * followed by / on a value path → replace with mul_div.
  • Any <</>> on amounts, prices, or liquidity → checked_shl/checked_shr.
  • Every rounding direction stated and justified (who absorbs the remainder?).
  • Every Option-returning call handled explicitly (no blind unwraps).
  • Decimal conversions centralized through decimal_scaling.
  • Admin/owner capabilities transferred via openzeppelin_access policies.
  • Unbounded mint/spend/call paths → rate limiter or allowance vault.
  • Deps pinned via MVR; sui move build + sui move test green.

Pointers (read on demand — never vendor these into your repo)

Alternatives

Compare before choosing

Computed 9823,835

alirezarezvani/claude-skills

quality-manager-qms-iso13485

ISO 13485 Quality Management System implementation and maintenance for medical device organizations. Provides QMS design, documentation control, internal auditing, CAPA management, and certification support. Use when working with medical device quality systems, preparing for ISO 13485 audits, managing regulatory compliance documentation, setting up corrective actions, or building audit preparation programs. Useful for quality management, audit preparation, regulatory compliance, medical device d

Computed 9810,896

huggingface/skills

huggingface-zerogpu

AI demos and GPU compute with Gradio Spaces and Hugging Face Spaces ZeroGPU. Use when writing or reviewing code that uses `@spaces.GPU`, configuring `python_version` or `requirements.txt` for a ZeroGPU Space, or handling ZeroGPU-specific code constraints — pickle-based process isolation, `gr.State` semantics across the worker boundary, no `torch.compile` (use AoTI instead), CUDA wheel-only builds (no `nvcc` at build or runtime), large vs xlarge sizing, and dynamic duration callables. Make sure t

Computed 9732,671

K-Dense-AI/scientific-agent-skills

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

Computed 9732,671

K-Dense-AI/scientific-agent-skills

esm

Use when working directly with the `esm` Python SDK, ESM3 or ESMC model IDs, Forge/Biohub inference clients, or ESMFold2 folding workflows.