/openzeppelin-skills:review-sui-contractsfrom openzeppelin-skills
Reviews Sui Move code integrating OpenZeppelin Contracts for Sui for correct pattern usage, deviations from conventions, and code quality. Use before shipping or audit to catch misuse early.
Ships in openzeppelin-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
AI-assisted review of a developer's Sui Move code against OpenZeppelin Contracts for Sui: does it use the library's on-chain primitives correctly, and where does it deviate from the library's examples/, doc-comments, and documented conventions?
This is an AI code review, not a formal security audit. It supports the audit process by flagging misuse and deviations early; it does not replace an independent audit, and a clean review is not an assurance of safety.
For building an integration use develop-secure-contracts; for scaffolding a project use setup-sui-contracts. This skill reviews code that already exists.
You cannot flag "incorrect use" or "deviation" without the correct pattern in hand — so discover it from the library's own metadata, never from memory, using the discovery chain the develop-secure-contracts skill defines. Read the primitive's API and behavior at the revision the integrator builds against — resolve each OZ dependency's pinned rev from Move.lock and use that source / those doc-comments, not main. Read the library-wide docs — llms.txt, the catalogs, ARCHITECTURE.md, STYLEGUIDE.md — from the repo's current main instead: they evolve continuously and often do not exist at an older pinned rev. For each OZ primitive the code uses, load its authoritative pattern from:
examples/ if it has them, otherwise the module-header doc-comment's idiomatic-usage block — the canonical recipe (some packages ship only the latter);Docs link);ARCHITECTURE.md (capability model, object ownership, initialization) and STYLEGUIDE.md (conventions).Review the code against those, not against assumptions.
sender checks or re-implementing what the library already provides), call functions with the right arguments, and handle the documented abort conditions?phantom type, check who supplies it and whether it is the correct authority. A caller-chosen type is an authority the caller controls, so the trusted party must fix it, not the caller. And a developer-fixed type must be the right one for the action — a privileged operation gated by a lower-privilege role's Auth (or any weaker witness than the guarantee needs) is a privilege-escalation bug.examples/ recipe (or the doc-comment's idiomatic-usage block) and flag divergences that weaken the guarantees it preserves — e.g. an object shared vs. embedded against its intended ownership model, a required setup step skipped, a returned value or receipt ignored, or an invariant the doc-comment states being bypassed.ARCHITECTURE.md) — e.g. an object that must stay shared, a value that must remain bounded, a capability that must not be exposed. Flag any path that can break one.audits/, inform these classes; the reports themselves are PDFs, not a findings feed.) A suspicion-raising self-check, not a reproduction of the audits or a security audit.Treat OpenZeppelin's Sui conventions as a first-class review dimension: report violations as findings, not optional suggestions. The rules and the review procedure are the single source of truth — apply them, don't restate them:
STYLEGUIDE.md — the codified rules (naming, section ordering, imports, idiomatic Move 2024, testing, docs, lint suppression)..claude/commands/code-quality.md — the canonical procedure that checks .move files against STYLEGUIDE.md; run it against the code under review.--build-env and --lint (see setup-sui-contracts for the exact invocation); per the styleguide, warnings must be fixed, never suppressed with #[allow(...)]. --lint enforces the compiler-checkable subset independently, so if the STYLEGUIDE.md fetch is momentarily unreachable, retry rather than skipping conventions.Report each violation against the STYLEGUIDE.md section it breaks.
The checks above optimize for catching issues, so before writing anything, try to disprove each finding: quote the exact line and confirm the problem is really there; confirm it is a genuine deviation and not an intentional, documented choice; and confirm you can state a concrete one-line fix. Drop whatever does not survive all three, and keep the severity bar high — a short review a developer trusts beats a long one they skim.
Produce one review, findings ordered by severity. Each finding: file:line — what's wrong (one clause) → the fix (one clause) — and the OZ example or doc-comment it deviates from, so the developer can compare directly. A short preamble is useful — the scope/boundary call and the build/test/lint status — and on a clean integration a single "verified and cleared" line is fine; keep the body to findings, not a recap.
If the project builds, run its checks first (sui move build / test, per setup-sui-contracts) so the review reflects compiling code, and report build/test failures separately from the pattern findings.
develop-secure-contracts (integration) and setup-sui-contracts (scaffolding); it neither builds nor scaffolds.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub openzeppelin/openzeppelin-skills --plugin openzeppelin-skills12 skills in this plugin
/develop-secure-contractsDevelop secure smart contracts using OpenZeppelin Contracts libraries. Use when users need to integrate OpenZeppelin library components — including token standards (ERC20, ERC721, ERC1155), access control (Ownable, AccessControl, AccessManager), security primitives (Pausable, ReentrancyGuard), governance (Governor, timelocks), or accounts (multisig, account abstraction) — into existing or new contracts. Covers pattern discovery from library source, CLI contract generators, and library-first integration. Supports Solidity, Cairo, Stylus, Stellar, and Sui Move./migrate-defender-to-creMigrate OpenZeppelin Defender Actions, Autotasks, Monitors and scheduled or Relayer-backed workflows to Chainlink CRE. Use when assessing CRE migration feasibility, adapting an existing Defender workflow, or validating its event delivery and onchain permissions. Does not cover migration to the self-hosted OpenZeppelin Relayer when CRE is not requested./setup-cairo-contractsSet up a Cairo smart contract project with OpenZeppelin Contracts for Cairo on Starknet. Use when users need to: (1) create a new Scarb/Starknet project, (2) add OpenZeppelin Contracts for Cairo dependencies to Scarb.toml, (3) configure individual or umbrella OpenZeppelin packages, or (4) understand Cairo import conventions and component patterns for OpenZeppelin./setup-solidity-contractsSet up a Solidity smart contract project with OpenZeppelin Contracts. Use when users need to: (1) create a new Hardhat or Foundry project, (2) install OpenZeppelin Contracts dependencies for Solidity, (3) configure remappings for Foundry, or (4) understand Solidity import conventions for OpenZeppelin./setup-stellar-contractsSet up a Stellar/Soroban smart contract project with OpenZeppelin Contracts for Stellar. Use when users need to: (1) install Stellar CLI and Rust toolchain for Soroban, (2) create a new Soroban project, (3) add OpenZeppelin Stellar dependencies to Cargo.toml, or (4) understand Soroban import conventions and contract patterns for OpenZeppelin./setup-stylus-contractsSet up a Stylus smart contract project with OpenZeppelin Contracts for Stylus on Arbitrum. Use when users need to: (1) install Rust toolchain and WASM target for Stylus, (2) create a new Cargo Stylus project, (3) add OpenZeppelin Stylus dependencies to Cargo.toml, or (4) understand Stylus import conventions and storage patterns for OpenZeppelin.Other plugins' skills for the same job