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
npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-stylus-contracts -a claude-codeWhat 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_callhandler 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-code2Manually: put the files in place
~/.claude/skills/upgrade-stylus-contracts/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/upgrade-stylus-contracts/
1Skills CLI (Vercel)
npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-stylus-contracts -a codex2Manually: put the files in place
.agents/skills/upgrade-stylus-contracts/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-stylus-contracts -a cursor2Manually: put the files in place
.cursor/skills/upgrade-stylus-contracts/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install OpenZeppelin/openzeppelin-skills skills/upgrade-stylus-contracts2Manually: put the files in place
.github/skills/upgrade-stylus-contracts/SKILL.md1Skills CLI (Vercel)
npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-stylus-contracts -a gemini-cli2Platform CLI
gemini skills install https://github.com/OpenZeppelin/openzeppelin-skills --path skills/upgrade-stylus-contractsManually: put the files in place
.devin/skills/upgrade-stylus-contracts/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-stylus-contracts -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.