·upgrade-cairo-contracts
!

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.

45Installs·5Trend·@openzeppelin

Installation

$npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill upgrade-cairo-contracts

How to Install upgrade-cairo-contracts

Quickly install upgrade-cairo-contracts AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill upgrade-cairo-contracts
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: openzeppelin/openzeppelin-skills.

SKILL.md

View raw

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:

| Mechanism | replaceclasssyscall swaps the class hash in-place | Proxy delegatecalls 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 |

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill upgrade-cairo-contracts
Category
!Security
Verified
First Seen
2026-03-06
Updated
2026-03-10

Browse more skills from openzeppelin/openzeppelin-skills

Quick answers

What is 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. Source: openzeppelin/openzeppelin-skills.

How do I install upgrade-cairo-contracts?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill upgrade-cairo-contracts Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Where is the source repository?

https://github.com/openzeppelin/openzeppelin-skills