Skip to main content
skill CX Codex

upgrade-stylus-contracts — Claude Code skill: what it does

upgrade-stylus-contracts guides assistants through building upgradeable Arbitrum Stylus Rust contracts using OpenZeppelin proxy patterns.

AGPL-3.0-only 234 installs ★ 225 updated 2026-10-19

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-stylus-contracts -a claude-code
Open on GitHub

What upgrade-stylus-contracts does

This skill guides the agent through architecting upgradeable Stylus programs written in Rust. Because Stylus runs as WebAssembly within the EVM state structure on Arbitrum, standard proxy patterns like UUPS and Beacon work similarly to Solidity. The instructions outline slot layout rules with the #[storage] macro, initialization flows, and proxy integration.

Stylus lacks immutable state variables. Instead of checking a cached implementation address, the contract manages execution context with a dedicated boolean logic_flag. The implementation constructor marks this flag in its personal storage, allowing only_proxy() to detect direct executions and block unproxied upgrades.

WASM programs on Arbitrum mandate reactivation every 365 days or following network runtime updates. Access restriction is omitted from core upgrade handlers by default, meaning developers must safeguard upgrade_to_and_call themselves.

What it helps with

  • implement UUPS upgradeability inside an Arbitrum Stylus Rust program
  • verify memory layout safety before rolling out contract revisions
  • deploy a Beacon proxy setup for coordinated multi-contract upgrades
  • secure the upgrade_to_and_call handler with ownership checks

Example prompts for the agent

  • Set up UUPSUpgradeable for this Stylus contract with Ownable permissions
  • Check my #[storage] layout to ensure compatibility with the previous release
  • Generate the initialization code for an Erc1967Proxy targeting a Stylus program

How to install upgrade-stylus-contracts

1Skills CLI (Vercel)

npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-stylus-contracts -a claude-code

2Manually: put the files in place

~/.claude/skills/upgrade-stylus-contracts/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/upgrade-stylus-contracts/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about upgrade-stylus-contracts

How to install upgrade-stylus-contracts in Claude Code?

Run npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-stylus-contracts -a claude-code in your terminal.

What does upgrade-stylus-contracts do?

It equips coding assistants with best practices for managing Stylus smart contract proxies, slot alignments, and activation lifecycles on Arbitrum.

Why does Stylus use logic_flag instead of address checks?

Arbitrum Stylus does not support immutable fields, so it assigns a boolean storage marker during constructor execution to distinguish direct calls from delegatecall transactions.

Similar skills

All skills for Security →

From the same set5

Project sponsors

Companies that keep this analytics open