Agent skill

L2 Deployment

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when deploying contracts to L2 networks (Base, Optimism, Arbitrum).

MITAuto-check passedDevOps & Cloud

Install L2 Deployment

skills CLI
$ npx skills add ccashwell/evm-cortex --skill l2-deployment -a claude-code

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

GitHub CLI
$ gh skill install ccashwell/evm-cortex l2-deployment --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/l2-deployment .claude/skills/l2-deployment && 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
l2-deployment
GitHub stars
131
Token cost
~1.6k tokens
SKILL.md length
235 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when deploying contracts to L2 networks (Base, Optimism, Arbitrum).

  • Deploying contracts to L2 networks (Base
  • SKILL.md covers L2 Gas Economics, L2-Specific Considerations, Foundry Multi-L2 Deployment… and L1 Data Cost Estimation, plus 3 more sections
  • Needs DEPLOYER_PRIVATE_KEY
  • Tasks that involve Deployment

What it does

L2 Deployment is an agent skill from ccashwell/evm-cortex. Use when deploying contracts to L2 networks (Base, Optimism, Arbitrum). Covers L2-specific considerations, PUSH0 compatibility, gas estimation, L1 data costs, bridge integration, and deployment scripts.

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 DevOps & Cloud, covering Deployment. It works with Arbitrum and Ethereum. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Deploying contracts to L2 networks (Base
  • Tasks that involve Deployment

Example prompts

  • “/l2-deployment”

Requirements

  • A credential in DEPLOYER_PRIVATE_KEY

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, toml and bash).

    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 these keys or tokens, usually read from environment variables:

    • DEPLOYER_PRIVATE_KEY

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

Context cost

L2 Deployment loads about 1.6k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 235 words of instructions outside code blocks.

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

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). 235 words, ~1,621 tokens.

Download SKILL.mdSave it as .claude/skills/l2-deployment/SKILL.md (or your agent's skills folder).
name
l2-deployment
description
Use when deploying contracts to L2 networks (Base, Optimism, Arbitrum). Covers L2-specific considerations, PUSH0 compatibility, gas estimation, L1 data costs, bridge integration, and deployment scripts.

L2 Deployment Patterns

L2 Gas Economics

L2 transaction cost = L2 execution gas + L1 data posting cost

OperationL1 (Ethereum)L2 (Base/OP/Arb)Savings
ETH transfer~$0.50~$0.000399.9%
ERC-20 transfer~$2.00~$0.00199.9%
Uniswap swap~$8.00~$0.002-0.00399.9%
NFT mint~$5.00~$0.00299.9%
Contract deploy~$50-500~$0.05-0.5099%

Post-EIP-4844 (blobs), L1 data costs dropped 10-100x for L2s.

L2-Specific Considerations

PUSH0 Opcode Compatibility

PUSH0 was introduced in the Shanghai upgrade (EVM version). Some L2s may lag behind on EVM version support:

toml
# foundry.toml — set EVM version explicitly for L2
[profile.default]
evm_version = "cancun"     # Base, Optimism, Arbitrum all support cancun

# If targeting an L2 that doesn't support cancun:
# evm_version = "paris"    # No PUSH0
Block Time Differences
ChainBlock TimeImplication
Ethereum~12sStandard
Base2sFaster confirmations
Optimism2sFaster confirmations
Arbitrum~0.25sNear-instant

Avoid hardcoding time assumptions based on block numbers.

L2-Specific Addresses
solidity
// Optimism / Base predeploys (same addresses on all OP Stack chains)
address constant L2_CROSS_DOMAIN_MESSENGER = 0x4200000000000000000000000000000000000007;
address constant L2_STANDARD_BRIDGE = 0x4200000000000000000000000000000000000010;
address constant L2_TO_L1_MESSAGE_PASSER = 0x4200000000000000000000000000000000000016;
address constant WETH = 0x4200000000000000000000000000000000000006;
address constant L1_BLOCK = 0x4200000000000000000000000000000000000015;
address constant GAS_PRICE_ORACLE = 0x420000000000000000000000000000000000000F;

// Arbitrum system addresses
address constant ARB_SYS = 0x0000000000000000000000000000000000000064;
address constant ARB_RETRYABLE_TX = 0x000000000000000000000000000000000000006E;

Foundry Multi-L2 Deployment Script

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

import {Script, console2} from "forge-std/Script.sol";
import {MyProtocol} from "../src/MyProtocol.sol";

contract DeployL2 is Script {
    struct L2Config {
        string rpcAlias;
        uint256 chainId;
        address weth;
        address usdc;
    }

    function getConfigs() internal pure returns (L2Config[] memory) {
        L2Config[] memory configs = new L2Config[](3);

        configs[0] = L2Config({
            rpcAlias: "base",
            chainId: 8453,
            weth: 0x4200000000000000000000000000000000000006,
            usdc: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
        });

        configs[1] = L2Config({
            rpcAlias: "optimism",
            chainId: 10,
            weth: 0x4200000000000000000000000000000000000006,
            usdc: 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
        });

        configs[2] = L2Config({
            rpcAlias: "arbitrum",
            chainId: 42161,
            weth: 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1,
            usdc: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831
        });

        return configs;
    }

    function run() external {
        uint256 deployerKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
        L2Config[] memory configs = getConfigs();

        for (uint256 i = 0; i < configs.length; i++) {
            L2Config memory cfg = configs[i];
            console2.log("Deploying to chain:", cfg.chainId);

            vm.createSelectFork(cfg.rpcAlias);
            vm.startBroadcast(deployerKey);

            MyProtocol protocol = new MyProtocol(cfg.weth, cfg.usdc);
            console2.log("  Deployed at:", address(protocol));

            vm.stopBroadcast();
        }
    }
}
bash
# Deploy to all L2s
forge script script/DeployL2.s.sol --broadcast --multi --verify

L1 Data Cost Estimation

On OP Stack chains (Base, Optimism), query the gas price oracle:

solidity
interface IGasPriceOracle {
    function getL1Fee(bytes memory data) external view returns (uint256);
    function getL1GasUsed(bytes memory data) external view returns (uint256);
}

IGasPriceOracle oracle = IGasPriceOracle(0x420000000000000000000000000000000000000F);
uint256 l1Fee = oracle.getL1Fee(txData);

On Arbitrum, L1 data costs are embedded in the gas price.

Bridge Integration

OP Stack Bridge (Base / Optimism)
solidity
interface IL2StandardBridge {
    function bridgeETHTo(address to, uint32 minGasLimit, bytes calldata extraData) external payable;
    function bridgeERC20To(
        address localToken, address remoteToken,
        address to, uint256 amount, uint32 minGasLimit, bytes calldata extraData
    ) external;
}

// Bridge ETH from L2 to L1
IL2StandardBridge(0x4200000000000000000000000000000000000010).bridgeETHTo{value: amount}(
    recipient, 200_000, ""
);
Arbitrum Bridge
solidity
interface IArbSys {
    function withdrawEth(address destination) external payable returns (uint256);
    function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);
}

// Withdraw ETH from Arbitrum to L1
IArbSys(0x0000000000000000000000000000000000000064).withdrawEth{value: amount}(recipient);

Testing on Forked L2s

solidity
function setUp() public {
    vm.createSelectFork("base", 20_000_000);
}

function test_swapOnBase() public {
    address whale = 0x...; // Known USDC holder on Base
    vm.startPrank(whale);
    // Interact with real Base contracts
    vm.stopPrank();
}

L2 Deployment Checklist

  • Set correct evm_version in foundry.toml for target L2
  • Use L2-specific WETH and token addresses (not mainnet addresses)
  • Account for different block times in time-based logic
  • Test on forked L2 before deploying
  • Estimate L1 data costs for gas-sensitive operations
  • Verify contracts on the correct L2 block explorer
  • Configure bridge integration if cross-chain messaging needed
  • Test with L2-specific gas prices (much lower than L1)
  • Check L2 predeploy addresses for system contracts
  • Deploy to testnet first (Base Sepolia, OP Sepolia, Arbitrum Sepolia)

© 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/l2-deployment of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

L2 Deployment 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.

L2 Deployment compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
L2 Deployment this skillccashwell/evm-cortex131—~1.6kAutomated safety check: PassMIT
ClankerBankrBot/skills1.2k1 repos~3kAutomated safety check: NotesNone
OrlixBankrBot/skills1.2k—~2.7kAutomated safety check: PassNone
Ophis Swaphashgraph-online/awesome-codex-plugins1.2k—~3.3kAutomated safety check: PassApache-2.0
Juicebox V6BankrBot/skills1.2k—~1.5kAutomated safety check: PassMIT
Build On Basebase/skills121—~804Automated safety check: PassMIT

Similar skills

  • Clanker

    BankrBot/skills

    Deploy ERC20 tokens on Base, Ethereum, Arbitrum, and other EVM chains using the Clanker SDK.

    1.2k GitHub starsUsed in 1 repo~3k tokens
    DevOps & CloudAuto-check: notes
  • Orlix

    BankrBot/skills

    Personal AI Operating System on Base. An agent skill from BankrBot/skills.

    1.2k GitHub stars~2.7k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed
  • Ophis Swap

    hashgraph-online/awesome-codex-plugins

    A skill your agent uses when the user wants to swap, trade, buy, sell, or convert tokens onchain, get a best-execution swap quote, compare a swap against DEX aggregators, or read wallet balances…

    1.2k GitHub stars~3.3k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Juicebox V6

    BankrBot/skills

    Build, inspect, configure, and safely transact with Juicebox V6 projects, terminals, rulesets, hooks, tiered NFTs, Revnets, Croptop, Bendystraw, and omnichain deployments.

    1.2k GitHub stars~1.5k tokensUpdated 3 days ago
    Business, Finance & HRAuto-check passed
  • Build On Base

    base/skills

    Complete Base development playbook. An agent skill from base/skills.

    121 GitHub stars~804 tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • Orchestration

    austintgriffith/ethskills

    How an AI agent plans, builds, and deploys a complete Ethereum dApp.

    294 GitHub stars~2.2k tokensUpdated 1 mo ago
    Backend & APIsAuto-check: notes

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 8 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 8 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 8 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 8 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 8 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 8 days ago
    Auto-check passed

Categories

Questions about L2 Deployment

What does L2 Deployment do?

A skill your agent uses when deploying contracts to L2 networks (Base, Optimism, Arbitrum). L2 Deployment is an agent skill from ccashwell/evm-cortex. Use when deploying contracts to L2 networks (Base, Optimism, Arbitrum).

When should I use L2 Deployment?

L2 Deployment fits situations like: deploying contracts to L2 networks (Base; tasks that involve Deployment.

How do I install L2 Deployment in Claude Code?

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

How do I install L2 Deployment in Codex?

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

Can I use L2 Deployment 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 l2-deployment -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/l2-deployment, .gemini/skills/l2-deployment, .github/skills/l2-deployment and .opencode/skills/l2-deployment in your project.

What does L2 Deployment need to run?

Going by SKILL.md and its folder, L2 Deployment needs credentials named DEPLOYER_PRIVATE_KEY. Our summary lists: A credential in DEPLOYER_PRIVATE_KEY.

Does L2 Deployment 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 L2 Deployment 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 L2 Deployment use?

L2 Deployment 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 L2 Deployment use?

About 1.6k tokens (SKILL.md is roughly 6.5k 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 L2 Deployment?

Skills that share tags, products or a category with L2 Deployment: Clanker (BankrBot/skills, 1.2k stars), Orlix (BankrBot/skills, 1.2k stars), Ophis Swap (hashgraph-online/awesome-codex-plugins, 1.2k stars) and Juicebox V6 (BankrBot/skills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains L2 Deployment?

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.