storage-layout-safety

Audit EVM Solidity contracts for storage-layout safety and proxy slot collisions.

276|56|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/PlamenTSV/plamen --skill storage-layout-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storage-layout-safety
Source: https://github.com/PlamenTSV/plamen/tree/main/agents/skills/evm/storage-layout-safety
Command: npx skills add https://github.com/PlamenTSV/plamen --skill storage-layout-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audit smart contracts for storage-layout safety to prevent misaligned storage, proxy slot collisions, and unsafe inline assembly from causing state corruption.

Core Features & Use Cases

  • Detects storage vs memory confusion in contract state variables and mappings.
  • Analyzes proxy upgrade layouts for slot collisions and gap integrity to ensure upgrade safety.
  • Provides a structured methodology for Step 1-5 storage analysis across complex contracts.

Quick Start

Perform a storage-layout safety audit on a target EVM contract by outlining its storage surface and upgrade path to identify risky patterns.

Frequently Asked Questions about storage-layout-safety

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

FAQPage Schema
How do I audit a Solidity smart contract for storage-layout safety?

Analyze contract state variables, memory vs storage references, proxy patterns, and inline assembly usage to verify slot calculations. This prevents misaligned storage and state corruption during EVM upgrades.

Why does my EVM proxy contract have storage slot collisions after upgrading?

Storage slot collisions happen when upgrade paths lack gap integrity or misalign state variables. Analyze proxy patterns and slot calculations to detect collisions and ensure safe contract upgrades.

Can I use this storage analysis methodology for diamond proxy patterns?

Yes, this analysis applies to upgradeable contracts using diamonds and standard proxies. It verifies slot calculations and gap integrity across both simple and complex EVM deployments.

How do I prevent storage vs memory confusion in Solidity mappings?

Detect storage vs memory confusion by auditing contract state variables and mappings. This identifies risky patterns where incorrect memory references overwrite storage and cause state corruption.

What are the limitations of auditing inline assembly for storage safety?

Auditing inline assembly requires verifying manual EVM slot calculations. Limitations arise when complex contracts use unsafe assembly, risking misaligned storage and proxy slot collisions without proper gap integrity.