Agent skill

Proxy Patterns

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when choosing or implementing proxy/upgrade patterns.

MITAuto-check passed

Install Proxy Patterns

skills CLI
$ npx skills add ccashwell/evm-cortex --skill proxy-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex proxy-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/proxy-patterns .claude/skills/proxy-patterns && rm -rf skills-src

Use ~/.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/

Facts

Skill name
proxy-patterns
GitHub stars
131
Token cost
~1.5k tokens
SKILL.md length
271 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when choosing or implementing proxy/upgrade patterns.

  • Works in 4 steps: Never remove or reorder storage… → Use storage gaps for inheritance chains → No constructors — use initialize +… → …
  • Implementing proxy/upgrade patterns
  • SKILL.md covers How Proxies Work, Pattern Comparison, UUPS Proxy (EIP-1822) —… and Transparent Upgradeable Proxy, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Proxy Patterns is an agent skill from ccashwell/evm-cortex. Use when choosing or implementing proxy/upgrade patterns. Compares UUPS (EIP-1822), TransparentUpgradeableProxy, Beacon proxy, minimal proxy (EIP-1167), and Diamond (EIP-2535) with gas costs, flexibility, and security tradeoffs.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Implementing proxy/upgrade patterns

Example prompts

  • “/proxy-patterns”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Never remove or reorder storage variables — only append
  2. Use storage gaps for inheritance chains
  3. No constructors — use initialize + Initializable
  4. No immutable variables that depend on constructor (immutables are in bytecode, not storage)

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are solidity).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Proxy Patterns loads about 1.5k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 271 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 271 words, ~1,477 tokens.

Download SKILL.mdSave it as .claude/skills/proxy-patterns/SKILL.md (or your agent's skills folder).
name
proxy-patterns
description
Use when choosing or implementing proxy/upgrade patterns. Compares UUPS (EIP-1822), TransparentUpgradeableProxy, Beacon proxy, minimal proxy (EIP-1167), and Diamond (EIP-2535) with gas costs, flexibility, and security tradeoffs.

Proxy Patterns Overview

How Proxies Work

A proxy contract delegates all calls to an implementation contract via delegatecall. Storage lives in the proxy, logic lives in the implementation. Upgrading means pointing the proxy at a new implementation.

User → Proxy (storage) --delegatecall--> Implementation (logic)

Pattern Comparison

PatternGas (deploy)Gas (call)Upgrade mechanismBest for
UUPSLowLow (~200 overhead)Implementation upgrades itselfMost contracts
TransparentMediumMedium (~2100 overhead)Admin-only proxy upgradeGoverned protocols
BeaconMediumMedium (~2600 overhead)Beacon stores impl addressMany identical proxies
Minimal (1167)Very lowLow (~700 overhead)Not upgradeableFactory clones
Diamond (2535)HighMediumPer-function routingLarge systems

The upgrade logic lives in the implementation contract. Smaller proxy, cheaper deployment.

solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

contract MyContractV1 is Initializable, UUPSUpgradeable, OwnableUpgradeable {
    uint256 public value;

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() { _disableInitializers(); }

    function initialize(address owner_) external initializer {
        __Ownable_init(owner_);
        __UUPSUpgradeable_init();
    }

    function setValue(uint256 v) external { value = v; }

    function _authorizeUpgrade(address newImpl) internal override onlyOwner {}
}

Deploy with:

solidity
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

address impl = address(new MyContractV1());
bytes memory data = abi.encodeCall(MyContractV1.initialize, (msg.sender));
address proxy = address(new ERC1967Proxy(impl, data));

Transparent Upgradeable Proxy

Upgrade logic is in the proxy itself. Admin address is blocked from calling implementation functions (prevents selector clashing).

solidity
import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

ProxyAdmin admin = new ProxyAdmin(msg.sender);
TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy(
    address(impl), address(admin), initData
);

// Upgrade:
admin.upgradeAndCall(ITransparentUpgradeableProxy(address(proxy)), newImpl, "");

Storage Layout Rules (Critical)

Upgradeable contracts MUST follow strict storage rules:

  1. Never remove or reorder storage variables — only append
  2. Use storage gaps for inheritance chains:
solidity
contract BaseV1 is Initializable {
    uint256 public x;
    uint256[49] private __gap; // reserve 49 slots

    // V2 can use a gap slot:
    // uint256 public y;
    // uint256[48] private __gap;
}
  1. No constructors — use initialize + Initializable
  2. No immutable variables that depend on constructor (immutables are in bytecode, not storage)

Decision Tree

Need upgradeability?
├── No → Minimal Proxy (EIP-1167) for clones, or deploy directly
└── Yes
    ├── Many identical proxies? → Beacon Proxy
    ├── Large contract (>24kb)? → Diamond (EIP-2535)
    ├── Governance / multisig admin? → Transparent Proxy
    └── Default → UUPS Proxy

Upgrade Safety Checklist

  • Storage layout is append-only (no reorder, no removal)
  • Use __gap arrays in base contracts (reserve 50 slots)
  • Constructor calls _disableInitializers()
  • initialize uses initializer modifier
  • _authorizeUpgrade has proper access control (UUPS)
  • New implementation is tested against existing storage
  • Run forge inspect --storage-layout to compare layouts
  • Test upgrade path: deploy v1 → upgrade to v2 → verify state
  • ERC-1967 storage slots used for impl/admin/beacon addresses
  • No selfdestruct in implementation (would kill proxy)

ERC-1967 Storage Slots

Standard slots prevent storage collisions:

solidity
// Implementation: bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1)
bytes32 constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

// Admin: bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)
bytes32 constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

// Beacon: bytes32(uint256(keccak256("eip1967.proxy.beacon")) - 1)
bytes32 constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

Testing Upgrades with Foundry

solidity
function test_upgrade() public {
    // Deploy V1
    MyContractV1 implV1 = new MyContractV1();
    ERC1967Proxy proxy = new ERC1967Proxy(
        address(implV1), abi.encodeCall(MyContractV1.initialize, (address(this)))
    );
    MyContractV1(address(proxy)).setValue(42);

    // Deploy V2 and upgrade
    MyContractV2 implV2 = new MyContractV2();
    MyContractV1(address(proxy)).upgradeToAndCall(address(implV2), "");

    // State is preserved
    assertEq(MyContractV2(address(proxy)).value(), 42);
    // New V2 functionality works
    MyContractV2(address(proxy)).newFunction();
}

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/proxy-patterns of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Proxy Patterns 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.

Proxy Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Proxy Patterns this skillccashwell/evm-cortex131—~1.5kAutomated safety check: PassMIT
gstack Upgradegarrytan/gstack136k—~5.5kAutomated safety check: NotesMIT
Odoo Upgrade Advisorsickn33/agentic-awesome-skills47k2 repos~1.3kAutomated safety check: PassMIT
Upgrade Mediabunnyremotion-dev/remotion62k—~258Automated safety check: PassCustom licence
Reverse Proxysickn33/agentic-awesome-skills47k2 repos~2.8kAutomated safety check: NotesMIT
Upgradenowork-studio/notfair-plugin3.9k—~1.4kAutomated safety check: NotesMIT

Similar skills

  • gstack Upgrade

    garrytan/gstack

    Upgrades an installed gstack to the latest version, handling global and vendored installs, optional auto-upgrade and snooze, and showing what is new.

    136k GitHub stars~5.5k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Odoo Upgrade Advisor

    sickn33/agentic-awesome-skills

    Step-by-step Odoo version upgrade advisor: pre-upgrade checklist, community vs enterprise upgrade path, OCA module compatibility, and post-upgrade validation.

    47k GitHub starsUsed in 2 repos~1.3k tokens
    DevelopmentAuto-check passed
  • Upgrade Mediabunny

    remotion-dev/remotion

    Official

    Upgrade Mediabunny and related @mediabunny packages across the Remotion repo.

    62k GitHub stars~258 tokensUpdated today
    Media & CreativeAuto-check passed
  • Reverse Proxy

    sickn33/agentic-awesome-skills

    Configure nginx and Traefik as reverse proxies. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.8k tokens
    DevOps & CloudAuto-check: notes
  • Upgrade

    nowork-studio/notfair-plugin

    Upgrade the NotFair plugin to the latest version. An agent skill from nowork-studio/notfair-plugin.

    3.9k GitHub stars~1.4k tokensUpdated 6 days ago
    Marketing & SEOAuto-check: notes
  • Dotnet Upgrade

    github/awesome-copilot

    Official

    Ready-to-use prompts for comprehensive .NET framework upgrade analysis and execution

    40k GitHub starsUsed in 1 repo~1.8k tokens
    DevOps & CloudAuto-check passed

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    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.

    131 GitHub stars~25k tokensUpdated 7 days ago
    Auto-check passed
  • Aave Integration

    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.

    131 GitHub stars~1.3k tokensUpdated 7 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 7 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 7 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed
  • Audit Depth Analysis

    ccashwell/evm-cortex

    A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

    131 GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check passed

Questions about Proxy Patterns

What does Proxy Patterns do?

A skill your agent uses when choosing or implementing proxy/upgrade patterns. Proxy Patterns is an agent skill from ccashwell/evm-cortex. Use when choosing or implementing proxy/upgrade patterns.

When should I use Proxy Patterns?

Proxy Patterns fits situations like: implementing proxy/upgrade patterns.

How do I install Proxy Patterns in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill proxy-patterns -a claude-code`. Or copy the skill folder (skills/proxy-patterns in ccashwell/evm-cortex) into .claude/skills/proxy-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Proxy Patterns in Codex?

Run `npx skills add ccashwell/evm-cortex --skill proxy-patterns -a codex`. Or copy the skill folder (skills/proxy-patterns in ccashwell/evm-cortex) into .agents/skills/proxy-patterns in your project. Codex loads it when a task matches its description.

Can I use Proxy Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill proxy-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/proxy-patterns, .gemini/skills/proxy-patterns, .github/skills/proxy-patterns and .opencode/skills/proxy-patterns in your project.

What does Proxy Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Proxy Patterns is instructions for the agent only.

Does Proxy Patterns access the network?

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.

Is Proxy Patterns safe to install?

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.

What licence does Proxy Patterns use?

Proxy Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Proxy Patterns use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Proxy Patterns?

Skills that share tags, products or a category with Proxy Patterns: gstack Upgrade (garrytan/gstack, 136k stars), Odoo Upgrade Advisor (sickn33/agentic-awesome-skills, 47k stars), Upgrade Mediabunny (remotion-dev/remotion, 62k stars) and Reverse Proxy (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Proxy Patterns?

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.