Squash Bugbot
LFDT-Lineth/lineth-monorepo
Triage unresolved bot review comments on a GitHub PR. An agent skill from LFDT-Lineth/lineth-monorepo.
EVM storage layout expertise for struct packing, proxy storage patterns, and collision avoidance.
$ npx skills add ccashwell/evm-cortex --skill storage-layout -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccashwell/evm-cortex storage-layout --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/storage-layout .claude/skills/storage-layout && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "storage-layout" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/storage-layout into .claude/skills/storage-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storage-layout", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ccashwell/evm-cortex/tree/main/skills/storage-layoutType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ccashwell/evm-cortex --skill storage-layout -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccashwell/evm-cortex storage-layout --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/storage-layout .agents/skills/storage-layout && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "storage-layout" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/storage-layout into .agents/skills/storage-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storage-layout", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ccashwell/evm-cortex --skill storage-layout -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccashwell/evm-cortex storage-layout --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/storage-layout .cursor/skills/storage-layout && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "storage-layout" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/storage-layout into .cursor/skills/storage-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storage-layout", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ccashwell/evm-cortex.git --path skills/storage-layout--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ccashwell/evm-cortex --skill storage-layout -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccashwell/evm-cortex storage-layout --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/storage-layout .gemini/skills/storage-layout && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "storage-layout" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/storage-layout into .gemini/skills/storage-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storage-layout", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ccashwell/evm-cortex storage-layoutInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ccashwell/evm-cortex --skill storage-layout -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/storage-layout .github/skills/storage-layout && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "storage-layout" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/storage-layout into .github/skills/storage-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storage-layout", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ccashwell/evm-cortex --skill storage-layout -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ccashwell/evm-cortex storage-layout --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/storage-layout .opencode/skills/storage-layout && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "storage-layout" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/storage-layout into .opencode/skills/storage-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storage-layout", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
storage-layoutEVM storage layout expertise for struct packing, proxy storage patterns, and collision avoidance.
Storage Layout is an agent skill from ccashwell/evm-cortex. EVM storage layout expertise for struct packing, proxy storage patterns, and collision avoidance. Use when designing data structures, working with upgradeable proxies, optimizing storage costs, or debugging storage-related issues.
Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Smart contracts. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.
Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are solidity and bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Storage Layout loads about 1.6k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 212 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 212 words, ~1,551 tokens.
.claude/skills/storage-layout/SKILL.md (or your agent's skills folder).Each storage slot is 32 bytes (256 bits). State variables are assigned slots sequentially starting at slot 0. Multiple variables smaller than 32 bytes are packed into a single slot when possible.
// Slot 0: addr (20 bytes) + isActive (1 byte) + role (1 byte) = 22 bytes — fits one slot
// Slot 1: balance (32 bytes) — full slot
// Slot 2: lastUpdate (8 bytes) — new slot (won't pack with previous full slot)
contract Packed {
address addr; // 20 bytes | slot 0
bool isActive; // 1 byte | slot 0
uint8 role; // 1 byte | slot 0
uint256 balance; // 32 bytes | slot 1
uint64 lastUpdate; // 8 bytes | slot 2
}Order fields from largest to smallest alignment, grouping sub-32-byte fields together.
// BAD: 4 slots (128 bytes)
struct UserBad {
bool isActive; // 1 byte | slot 0 (31 bytes wasted)
uint256 balance; // 32 bytes | slot 1
address wallet; // 20 bytes | slot 2 (12 bytes wasted)
uint256 rewards; // 32 bytes | slot 3
}
// GOOD: 3 slots (96 bytes)
struct UserGood {
uint256 balance; // 32 bytes | slot 0
uint256 rewards; // 32 bytes | slot 1
address wallet; // 20 bytes | slot 2
bool isActive; // 1 byte | slot 2 (packed with wallet)
}// 1 slot (32 bytes) for a position record
struct Position {
address owner; // 20 bytes
uint48 openedAt; // 6 bytes (good until year 8.9M)
uint40 collateral; // 5 bytes (up to ~1.1T with scaling)
bool isLong; // 1 byte
}
// Total: 20 + 6 + 5 + 1 = 32 bytes = 1 slot| Type | Bytes | Max Value | Overflow Date |
|---|---|---|---|
| uint32 | 4 | 4.29B | Feb 2106 |
| uint40 | 5 | 1.1T | Year ~36812 |
| uint48 | 6 | 281T | Year ~8.9M |
Use uint48 for timestamps in most protocol designs. uint32 overflows in 2106.
// Fixed-size variables: sequential slots starting at 0
// Mappings: keccak256(key . slot)
// Dynamic arrays: length at slot, elements at keccak256(slot) + index
// Nested mappings: keccak256(innerKey . keccak256(outerKey . slot))
// Example: mapping(address => mapping(uint256 => uint256)) at slot 5
// Value at [addr][id] is stored at:
// keccak256(abi.encode(id, keccak256(abi.encode(addr, 5))))# Forge: inspect storage layout
forge inspect src/MyContract.sol:MyContract storage-layout --pretty
# Output shows slot, offset, type, and variable name
# Use this to verify packing and detect collisions before deployment// Implementation slot
bytes32 internal constant _IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
// bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1)
// Admin slot
bytes32 internal constant _ADMIN_SLOT =
0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
// bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)
// Beacon slot
bytes32 internal constant _BEACON_SLOT =
0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
// bytes32(uint256(keccak256("eip1967.proxy.beacon")) - 1)abstract contract StorageGapExample {
uint256 public value1;
address public admin;
// Reserve 48 slots for future storage variables
// When adding new variables, reduce the gap size accordingly
uint256[48] private __gap;
}
// In V2, adding a new variable:
abstract contract StorageGapExampleV2 {
uint256 public value1;
address public admin;
uint256 public newValue; // added in V2
uint256[47] private __gap; // reduced from 48 to 47
}library LibDiamond {
bytes32 constant DIAMOND_STORAGE_POSITION =
keccak256("diamond.standard.diamond.storage");
struct DiamondStorage {
mapping(bytes4 => address) selectorToFacet;
mapping(bytes4 => uint96) selectorToSlotPosition;
bytes4[] selectors;
mapping(bytes4 => bool) supportedInterfaces;
address contractOwner;
}
function diamondStorage() internal pure returns (DiamondStorage storage ds) {
bytes32 position = DIAMOND_STORAGE_POSITION;
assembly {
ds.slot := position
}
}
}/// @custom:storage-location erc7201:myprotocol.storage.vault
struct VaultStorage {
mapping(address => uint256) balances;
uint256 totalDeposited;
bool paused;
}
// keccak256(abi.encode(uint256(keccak256("myprotocol.storage.vault")) - 1))
// & ~bytes32(uint256(0xff))
bytes32 private constant VAULT_STORAGE_LOCATION =
0x...;
function _getVaultStorage() private pure returns (VaultStorage storage $) {
assembly {
$.slot := VAULT_STORAGE_LOCATION
}
}__gap when adding variablesuint128 to uint256 shifts layout)forge inspect before deploying upgradesforge inspect --storage-layout on both old and new versions__gap reduced by exactly the number of new slots used© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/storage-layout of ccashwell/evm-cortex.
Open the folder on GitHubat commit f8f3301
Storage Layout next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Storage Layout this skillccashwell/evm-cortex | 131 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Squash BugbotLFDT-Lineth/lineth-monorepo | 126 | — | ~3.3k | Automated safety check: Pass | Apache-2.0 | |
| Auditsablier-labs/evm-monorepo | 353 | — | ~1.8k | Automated safety check: Pass | Custom licence | |
| near-kit for NEAR Protocolinternet-court/internet-court-skill | 6.4k | 1 repos | ~2k | Automated safety check: Pass | Custom licence | |
| Trustless Agentsinternet-court/internet-court-skill | 6.4k | 1 repos | ~510 | Automated safety check: Pass | MIT | |
| Foundry Reference Modelaviggiano/security | 144 | — | ~516 | Automated safety check: Pass | MIT |
LFDT-Lineth/lineth-monorepo
Triage unresolved bot review comments on a GitHub PR. An agent skill from LFDT-Lineth/lineth-monorepo.
sablier-labs/evm-monorepo
Security audit and code review for Solidity smart contracts.
internet-court/internet-court-skill
Covers the near-kit TypeScript library for NEAR: reading contracts, sending tokens, transaction building, typed contracts, wallets, React hooks and sandbox testing.
internet-court/internet-court-skill
ERC-8004 Trustless Agents — on-chain agent identity + reputation.
aviggiano/security
Build a simple independent Solidity reference implementation for Foundry tests.
Nethereum/Nethereum
Validate and perfect a Nethereum documentation section end-to-end.
ccashwell/evm-cortex
A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.
ccashwell/evm-cortex
A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.
ccashwell/evm-cortex
Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.
ccashwell/evm-cortex
A skill your agent uses when running a local Ethereum node with Anvil.
ccashwell/evm-cortex
A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.
ccashwell/evm-cortex
A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.
Categories
EVM storage layout expertise for struct packing, proxy storage patterns, and collision avoidance. Storage Layout is an agent skill from ccashwell/evm-cortex. EVM storage layout expertise for struct packing, proxy storage patterns, and collision avoidance.
Storage Layout fits situations like: designing data structures; working with upgradeable proxies; optimizing storage costs; debugging storage-related issues.
Run `npx skills add ccashwell/evm-cortex --skill storage-layout -a claude-code`. Or copy the skill folder (skills/storage-layout in ccashwell/evm-cortex) into .claude/skills/storage-layout in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccashwell/evm-cortex --skill storage-layout -a codex`. Or copy the skill folder (skills/storage-layout in ccashwell/evm-cortex) into .agents/skills/storage-layout in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill storage-layout -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/storage-layout, .gemini/skills/storage-layout, .github/skills/storage-layout and .opencode/skills/storage-layout in your project.
SKILL.md names no scripts, command-line tools or credentials: Storage Layout is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Storage Layout is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Storage Layout: Squash Bugbot (LFDT-Lineth/lineth-monorepo, 126 stars), Audit (sablier-labs/evm-monorepo, 353 stars), near-kit for NEAR Protocol (internet-court/internet-court-skill, 6.4k stars) and Trustless Agents (internet-court/internet-court-skill, 6.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.
Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.