Setup Stylus Contracts

Set 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.

223 stars 38 forksMarketing, Sales & Business Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add OpenZeppelin/openzeppelin-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add OpenZeppelin/openzeppelin-skills --skill setup-stylus-contracts
Manual install
git clone --depth 1 https://github.com/OpenZeppelin/openzeppelin-skills.git /tmp/openzeppelin-skills
mkdir -p ~/.claude/skills
cp -r /tmp/openzeppelin-skills/skills/setup-stylus-contracts ~/.claude/skills/setup-stylus-contracts

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Stylus Setup

## Rust & Cargo Stylus Setup

Install the Rust toolchain and WASM target:

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
```

Install the Cargo Stylus CLI:

```bash
cargo install --force cargo-stylus
```

Create a new Stylus project:

```bash
cargo stylus new my_project
```

After creating the project, verify it compiles with `cargo stylus check` (see Build & Deploy section below).

> A Rust nightly toolchain is required. The project should include a `rust-toolchain.toml` specifying the nightly channel, `rust-src` component, and `wasm32-unknown-unknown` target. Check the [rust-contracts-stylus repo](https://github.com/OpenZeppelin/rust-contracts-stylus) for the current recommended nightly date.

## Adding OpenZeppelin Dependencies

Look up the current version from [crates.io/crates/openzeppelin-stylus](https://crates.io/crates/openzeppelin-stylus) before adding. Add to `Cargo.toml`:

```toml
[dependencies]
openzeppelin-stylus = "=<VERSION>"
```

Enable the `export-abi` feature flag for ABI generation:

```toml
[features]
export-abi = ["openzeppelin-stylus/export-abi"]
```

The crate must be compiled as both a library and a cdylib:

```toml
[lib]
crate-type = ["lib", "cdylib"]
```

## Import Conventions

Imports use `openzeppelin_stylus` (underscores) as the crate root:
Read the full skill on GitHub

Details

Skill name
setup-stylus-contracts
Path
skills/setup-stylus-contracts/SKILL.md
License
AGPL-3.0
Repo updated
11 November 2026

FAQ

What does the Setup Stylus Contracts skill do?

Set 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.

How do I install the Setup Stylus Contracts skill?

Claude Code plugin: /plugin marketplace add OpenZeppelin/openzeppelin-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Setup Stylus Contracts popular?

It lives in OpenZeppelin/openzeppelin-skills, which has 223 GitHub stars and 38 forks.

Related skills

Develop Secure Contracts

223

OpenZeppelin/openzeppelin-skills

Develop 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.

Marketing, Sales & Business38

Migrate Defender to Cre

223

OpenZeppelin/openzeppelin-skills

Migrate 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.

Productivity & Notes38

Review Sui Contracts

223

OpenZeppelin/openzeppelin-skills

Review Sui Move code that integrates OpenZeppelin Contracts for Sui against the library's own patterns and conventions. Use this when a developer wants their integration checked before shipping. Triggers: "review my Sui Move code", "am I using OpenZeppelin correctly", "check this integration", "is this idiomatic", "review before audit". Checks correct use of OZ primitives, deviations from examples/doc-comments, upheld invariants, test coverage, and code-quality/style. This is an AI code review, not a formal security audit.

Marketing, Sales & Business38

Setup Sui Contracts

223

OpenZeppelin/openzeppelin-skills

Set up a Sui Move smart contract project with OpenZeppelin Contracts for Sui. Use when users need to: (1) install the Sui CLI and Move toolchain, (2) create a new Sui Move package, (3) discover and add OpenZeppelin Sui dependencies to Move.toml via the Move Registry (MVR), (4) learn the integration pattern from the library's examples and API docs before implementing, or (5) understand Sui Move import conventions and build/test commands for OpenZeppelin.

Marketing, Sales & Business38

Setup Stellar Contracts

223

OpenZeppelin/openzeppelin-skills

Set 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.

Marketing, Sales & Business38

Upgrade Cairo Contracts

223

OpenZeppelin/openzeppelin-skills

Upgrade Cairo smart contracts using OpenZeppelin's UpgradeableComponent on Starknet. Use when users need to: (1) make Cairo contracts upgradeable via replace_class_syscall, (2) integrate the OpenZeppelin UpgradeableComponent, (3) understand Starknet's class-based upgrade model vs EVM proxy patterns, (4) ensure storage compatibility across upgrades, (5) guard upgrade functions with access control, or (6) test upgrade paths for Cairo contracts.

Marketing, Sales & Business38

Browse the most popular Claude skills, all marketing, sales & business skills, or write your own with the skills generator.