Upgrade Cairo Contracts
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.
Install
/plugin marketplace add OpenZeppelin/openzeppelin-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add OpenZeppelin/openzeppelin-skills --skill upgrade-cairo-contractsgit clone --depth 1 https://github.com/OpenZeppelin/openzeppelin-skills.git /tmp/openzeppelin-skills
mkdir -p ~/.claude/skills
cp -r /tmp/openzeppelin-skills/skills/upgrade-cairo-contracts ~/.claude/skills/upgrade-cairo-contractsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Cairo Upgrades ## Contents - [Starknet Upgrade Model](#starknet-upgrade-model) - [Using the OpenZeppelin Upgradeable Component](#using-the-openzeppelin-upgradeable-component) - [Access Control](#access-control) - [Upgrade Safety](#upgrade-safety) ## Starknet Upgrade Model Starknet separates **contract instances** from **contract classes**. A class is the compiled program (identified by its class hash); a contract is a deployed instance pointing to a class. Multiple contracts can share the same class. Upgrading a contract means **replacing its class hash** so it points to a new class. The contract keeps its address, storage, and nonce — only the code changes. This is fundamentally different from EVM proxy patterns: | | Starknet | EVM (proxy pattern) | |---|---|---| | **Mechanism** | `replace_class_syscall` swaps the class hash in-place | Proxy `delegatecall`s to a separate implementation contract | | **Proxy contract needed** | No — the contract upgrades itself | Yes — a proxy sits in front of the implementation | | **Storage location** | Belongs to the contract directly | Lives in the proxy, accessed via delegatecall | | **Fallback routing** | Not applicable — no fallback/catch-all mechanism in Cairo | Proxy forwards all calls via fallback function |
Details
- Skill name
upgrade-cairo-contracts- Repository
- OpenZeppelin/openzeppelin-skills
- Path
skills/upgrade-cairo-contracts/SKILL.md- License
- AGPL-3.0
- Repo updated
- 11 November 2026
FAQ
What does the Upgrade Cairo Contracts skill do?
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.
How do I install the Upgrade Cairo 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 Upgrade Cairo Contracts popular?
It lives in OpenZeppelin/openzeppelin-skills, which has 223 GitHub stars and 38 forks.
Related skills
Develop Secure Contracts
223OpenZeppelin/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.
Migrate Defender to Cre
223OpenZeppelin/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.
Review Sui Contracts
223OpenZeppelin/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.
Upgrade Solidity Contracts
223OpenZeppelin/openzeppelin-skills
Upgrade Solidity smart contracts using OpenZeppelin proxy patterns. Use when users need to: (1) make contracts upgradeable with UUPS, Transparent, or Beacon proxies, (2) write initializers instead of constructors, (3) use the Hardhat or Foundry upgrades plugins, (4) understand storage layout rules and ERC-7201 namespaced storage, (5) validate upgrade safety, (6) manage proxy deployments and upgrades, or (7) understand upgrade restrictions between OpenZeppelin Contracts major versions.
Setup Sui Contracts
223OpenZeppelin/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.
Upgrade Stellar Contracts
223OpenZeppelin/openzeppelin-skills
Upgrade Stellar/Soroban smart contracts using OpenZeppelin's upgradeable module. Use when users need to: (1) make Soroban contracts upgradeable via native WASM replacement, (2) use Upgradeable or UpgradeableMigratable derive macros, (3) implement atomic upgrade-and-migrate patterns with an Upgrader contract, (4) ensure storage key compatibility across upgrades, or (5) test upgrade paths for Soroban contracts.
Browse the most popular Claude skills, all marketing, sales & business skills, or write your own with the skills generator.