upgrade-safety

Review Solidity upgradeable smart contracts for storage layout and initializer safety.

2|1|Updated Nov 13, 2025
One-click install
npx skills add https://github.com/MolcajeteAI/plugin --skill upgrade-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upgrade-safety
Source: https://github.com/MolcajeteAI/plugin/tree/main/deprecated/tech-stacks/solidity/skills/upgrade-safety
Command: npx skills add https://github.com/MolcajeteAI/plugin --skill upgrade-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance and best practices to prevent critical vulnerabilities and data loss during the upgrade process of smart contracts, ensuring the integrity and security of decentralized applications.

Core Features & Use Cases

  • Storage Layout Safety: Rules for adding or modifying state variables to avoid collisions and data corruption.
  • Initializer Safety: Guidelines for using initializer and reinitializer modifiers to prevent re-entrancy and unauthorized initialization.
  • Authorization Checks: Ensures proper authorization mechanisms are in place for upgradeability, especially for UUPS patterns.
  • Use Case: When planning to deploy a new version of an upgradeable smart contract, use this Skill to review the storage layout, initializer functions, and authorization logic to ensure a safe and secure upgrade.

Quick Start

Use the upgrade-safety skill to review the storage layout rules for upgradeable smart contracts.

Frequently Asked Questions about upgrade-safety

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

FAQPage Schema
How do I prevent storage layout collisions when upgrading Solidity smart contracts?

To prevent storage layout collisions in upgradeable Solidity smart contracts, follow specific rules for adding or modifying state variables to avoid data corruption. This ensures storage layout safety and maintains data integrity across contract versions.

What is the best way to secure initializer functions in upgradeable smart contracts?

Securing initializer functions in upgradeable smart contracts requires using `initializer` and `reinitializer` modifiers correctly. This prevents re-entrancy attacks and unauthorized initialization during the contract upgrade process.

How does authorization work for UUPS and transparent proxy patterns?

Authorization for UUPS and transparent proxy patterns ensures proper mechanisms verify who can trigger contract upgrades. Implementing these checks prevents unauthorized users from executing malicious logic updates in decentralized applications.

Can I modify existing state variables in an upgradeable smart contract without data loss?

Modifying existing state variables in upgradeable smart contracts risks data loss and corruption. You must follow strict storage layout rules to preserve data integrity when adding new variables or changing contract logic.

What verification tools should I use to check smart contract upgrade safety?

Checking smart contract upgrade safety involves running specific verification tool commands provided by the skill. These commands validate that storage layout, initializer functions, and authorization logic meet secure upgrade practices.

When do I need to review upgradeability patterns for a Solidity smart contract?

You need to review upgradeability patterns for a Solidity smart contract when planning to deploy a new version. Reviewing storage layout, initializers, and authorization logic ensures a safe and secure upgrade.