upgrade-safety

Identify and mitigate upgrade vulnerability risks in Solidity proxy contracts.

120|12|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ccashwell/evm-cortex --skill upgrade-safety-ccashwell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upgrade-safety
Source: https://github.com/ccashwell/evm-cortex/tree/main/skills/upgrade-safety
Command: npx skills add https://github.com/ccashwell/evm-cortex --skill upgrade-safety-ccashwell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading Solidity proxies can introduce critical vulnerabilities if upgrade processes are not correctly implemented. This Skill helps identify and mitigate upgrade-related risks in proxy patterns to protect deployed contracts.

Core Features & Use Cases

  • Detects uninitialized proxies and enforces safe initialization in deployment and upgrades.
  • Verifies storage layout compatibility across versions to prevent state corruption.
  • Checks upgrade authorization hooks (e.g., _authorizeUpgrade) and selector clashes to ensure safe upgrades.
  • Provides guidance for integrating OpenZeppelin upgrade tooling and best practices in UUPS, Transparent, or Diamond proxies.

Quick Start

Review your proxy upgrade plan and ensure uninitialized initialization, proper storage gaps, and _authorizeUpgrade checks are in place.

Frequently Asked Questions about upgrade-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check storage layout compatibility before upgrading a Solidity proxy contract?

To check storage layout compatibility before upgrading a Solidity proxy contract, diff storage layouts across versions to prevent state corruption. This involves verifying storage gaps and ensuring no existing variable orders are modified.

What happens if a Solidity proxy initializer is uninitialized during an upgrade?

If a Solidity proxy initializer is uninitialized during an upgrade, the contract becomes vulnerable to unauthorized state manipulation. You must enforce safe initialization checks during deployment and upgrades to mitigate this critical risk.

How do I prevent selector collisions when implementing a Diamond proxy in Solidity?

To prevent selector collisions in a Solidity Diamond proxy, check for function selector clashes across facets. Verifying these clashes ensures safe upgrades and prevents routing calls to unintended functions.

Does OpenZeppelin tooling support validating UUPS and Transparent proxy upgrades?

OpenZeppelin tooling supports validating UUPS and Transparent proxy upgrades by providing standard patterns for upgrade authorization checks. Integrating this tooling helps validate storage layouts and enforce secure upgrade hooks.

Why do I need _authorizeUpgrade checks in my UUPS proxy contract?

You need _authorizeUpgrade checks in a UUPS proxy contract to restrict upgrade authorization to privileged accounts. Implementing these hooks ensures safe upgrades and prevents unauthorized modification of the contract logic.