Agent skill

Contract Verification

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when verifying deployed contracts on block explorers.

MITAuto-check passed

Install Contract Verification

skills CLI
$ npx skills add ccashwell/evm-cortex --skill contract-verification -a claude-code

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

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

At a glance

A skill your agent uses when verifying deployed contracts on block explorers.

  • Verifying deployed contracts on block explorers
  • SKILL.md covers Why Verify, forge verify-contract, Chain-Specific Verification and Blockscout Verification, plus 7 more sections
  • Calls curl; reaches api.basescan.org and api-optimistic.etherscan.io; needs ETHERSCAN_API_KEY and BASESCAN_API_KEY

What it does

Contract Verification is an agent skill from ccashwell/evm-cortex. Use when verifying deployed contracts on block explorers. Covers forge verify-contract, Etherscan/Basescan/Arbiscan APIs, Blockscout verification, constructor args encoding, flattening, proxy verification, and multi-file verification.

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.

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

When your agent uses it

  • Verifying deployed contracts on block explorers

Example prompts

  • “/contract-verification”

Requirements

  • A credential in ETHERSCAN_API_KEY
  • A credential in BASESCAN_API_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

    Shell commands in SKILL.md call:

    • curl

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.basescan.org
    • api-optimistic.etherscan.io
    • api.arbiscan.io
    • api.etherscan.io
    • base.blockscout.com

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ETHERSCAN_API_KEY
    • BASESCAN_API_KEY
    • OPSCAN_API_KEY
    • ARBISCAN_API_KEY

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

Context cost

Contract Verification loads about 1.6k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 173 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
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). 173 words, ~1,619 tokens.

Download SKILL.mdSave it as .claude/skills/contract-verification/SKILL.md (or your agent's skills folder).
name
contract-verification
description
Use when verifying deployed contracts on block explorers. Covers forge verify-contract, Etherscan/Basescan/Arbiscan APIs, Blockscout verification, constructor args encoding, flattening, proxy verification, and multi-file verification.

Contract Verification

Why Verify

Verified contracts show source code on block explorers, enabling:

  • Public auditability
  • Etherscan read/write UI for interaction
  • Trust from users and integrators
  • Required for many DeFi integrations

forge verify-contract

bash
# Basic verification
forge verify-contract 0xContractAddress src/MyContract.sol:MyContract \
  --chain-id 1 \
  --etherscan-api-key $ETHERSCAN_API_KEY

# With constructor arguments
forge verify-contract 0xContractAddress src/MyToken.sol:MyToken \
  --chain-id 1 \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  --constructor-args $(cast abi-encode "constructor(string,string,uint256)" "MyToken" "MTK" 1000000000000000000000000)

# With compiler settings matching deployment
forge verify-contract 0xContractAddress src/MyContract.sol:MyContract \
  --chain-id 1 \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  --compiler-version v0.8.28 \
  --num-of-optimizations 200

# Watch verification status
forge verify-contract 0xContractAddress src/MyContract.sol:MyContract \
  --chain-id 1 \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  --watch

Chain-Specific Verification

bash
# Mainnet (Etherscan)
forge verify-contract $ADDR MyContract \
  --chain-id 1 --etherscan-api-key $ETHERSCAN_API_KEY

# Base (Basescan)
forge verify-contract $ADDR MyContract \
  --chain-id 8453 \
  --verifier etherscan \
  --verifier-url https://api.basescan.org/api \
  --etherscan-api-key $BASESCAN_API_KEY

# Optimism (Optimistic Etherscan)
forge verify-contract $ADDR MyContract \
  --chain-id 10 \
  --verifier etherscan \
  --verifier-url https://api-optimistic.etherscan.io/api \
  --etherscan-api-key $OPSCAN_API_KEY

# Arbitrum (Arbiscan)
forge verify-contract $ADDR MyContract \
  --chain-id 42161 \
  --verifier etherscan \
  --verifier-url https://api.arbiscan.io/api \
  --etherscan-api-key $ARBISCAN_API_KEY

Blockscout Verification

bash
# Blockscout uses a different verifier
forge verify-contract $ADDR MyContract \
  --chain-id 8453 \
  --verifier blockscout \
  --verifier-url https://base.blockscout.com/api/

# Blockscout doesn't require an API key for most instances

Constructor Arguments

The most common verification failure is incorrect constructor args:

bash
# Encode constructor args
cast abi-encode "constructor(address,uint256,string)" \
  0xAdminAddress 1000000 "MyToken"

# For complex types (arrays, structs)
cast abi-encode "constructor(address[])" \
  "[0xAddr1,0xAddr2,0xAddr3]"

# If constructor takes no args, omit --constructor-args entirely

Flattening

When verification tools fail with import resolution, flatten the contract:

bash
# Flatten to single file
forge flatten src/MyContract.sol > MyContract.flat.sol

# Verify using flattened source (manual Etherscan upload)
# 1. Go to etherscan.io/verifyContract
# 2. Select "Solidity (Single file)"
# 3. Paste flattened source
# 4. Set compiler version and optimizer settings to match deployment

Proxy Verification

Verify Implementation
bash
# Verify the implementation contract first
forge verify-contract $IMPL_ADDR src/MyContract.sol:MyContract \
  --chain-id 1 --etherscan-api-key $ETHERSCAN_API_KEY
Mark Proxy on Etherscan

After verifying the implementation, mark the proxy:

bash
# Using Etherscan API to mark as proxy
curl "https://api.etherscan.io/api?module=contract&action=verifyproxycontract&apikey=$ETHERSCAN_API_KEY" \
  -d "address=$PROXY_ADDR"

# Check proxy verification status
curl "https://api.etherscan.io/api?module=contract&action=checkproxyverification&guid=$GUID&apikey=$ETHERSCAN_API_KEY"
Verify ERC-1967 Proxy
bash
# Verify the proxy contract itself (usually OpenZeppelin's)
forge verify-contract $PROXY_ADDR \
  lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol:ERC1967Proxy \
  --chain-id 1 \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  --constructor-args $(cast abi-encode "constructor(address,bytes)" $IMPL_ADDR $INIT_DATA)

Verification in Forge Scripts

bash
# Verify during deployment (recommended)
forge script script/Deploy.s.sol \
  --rpc-url $ETH_RPC_URL \
  --broadcast \
  --verify \
  --etherscan-api-key $ETHERSCAN_API_KEY

# This auto-verifies all deployed contracts with correct constructor args

foundry.toml Etherscan Config

toml
[etherscan]
mainnet = { key = "${ETHERSCAN_API_KEY}" }
sepolia = { key = "${ETHERSCAN_API_KEY}" }
base = { key = "${BASESCAN_API_KEY}", url = "https://api.basescan.org/api" }
optimism = { key = "${OPSCAN_API_KEY}", url = "https://api-optimistic.etherscan.io/api" }
arbitrum = { key = "${ARBISCAN_API_KEY}", url = "https://api.arbiscan.io/api" }

With this config, forge verify-contract auto-selects the right API based on --chain-id.

Troubleshooting

"Compiler version mismatch"
bash
# Check what version was used to compile
forge build --force
# Look in out/MyContract.sol/MyContract.json → metadata → compiler

# Specify exact version
forge verify-contract $ADDR MyContract --compiler-version v0.8.28+commit.7893614a
"Constructor arguments mismatch"
bash
# Get constructor args from deployment tx
cast tx $DEPLOY_TX_HASH input --rpc-url $ETH_RPC_URL
# The constructor args are appended after the bytecode
# Compare with: cast abi-encode "constructor(...)" args...
"Bytecode mismatch"

Ensure identical compiler settings:

  • Same solc version
  • Same optimizer settings (enabled, runs)
  • Same EVM version
  • Same via-ir setting
  • Same remappings
bash
# Rebuild with exact settings and compare
forge build --force
cast code $ADDR --rpc-url $ETH_RPC_URL > deployed.hex
# Compare with out/MyContract.sol/MyContract.json → deployedBytecode

Verification Checklist

  • Implementation contract verified first (for proxies)
  • Constructor arguments correctly encoded
  • Compiler version matches deployment exactly
  • Optimizer settings match (runs, via-ir, evm-version)
  • All imports are resolvable (check remappings)
  • Proxy marked on Etherscan after implementation verified
  • Verification confirmed on block explorer (green checkmark)
  • Read/Write contract tabs work on explorer

© 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/contract-verification of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Contract Verification 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.

Contract Verification compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Contract Verification this skillccashwell/evm-cortex131—~1.6kAutomated safety check: PassMIT
Deploy ContractNethereum/Nethereum2.3k—~1.2kAutomated safety check: PassMIT
Block No Verify Hookwshobson/agents40k—~1.9kAutomated safety check: NotesMIT
Land and Deploygarrytan/gstack136k—~18kAutomated safety check: NotesMIT
Deploy Setupgarrytan/gstack136k—~11kAutomated safety check: NotesMIT
Deployment Patternsaffaan-m/ECC275k1 repos~2.9kAutomated safety check: PassMIT

Similar skills

  • Deploy Contract

    Nethereum/Nethereum

    Deploy smart contracts to Ethereum using Nethereum typed deployment handlers (.NET/C).

    2.3k GitHub stars~1.2k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Block No Verify Hook

    wshobson/agents

    Configure a PreToolUse hook to prevent AI agents from skipping git pre-commit hooks with --no-verify and other bypass flags.

    40k GitHub stars~1.9k tokensUpdated 3 days ago
    Testing & QAAuto-check: notes
  • Land and Deploy

    garrytan/gstack

    Merges a pull request, waits for CI and the deploy, then verifies production health with canary checks, picking up where /ship leaves off.

    136k GitHub stars~18k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Deploy Setup

    garrytan/gstack

    Detects where an app deploys, its production URL and health checks, then saves the deploy configuration in CLAUDE.md for /land-and-deploy.

    136k GitHub stars~11k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Deployment iş akışları, CI/CD pipeline kalıpları, Docker konteynerizasyonu, sağlık kontrolleri, rollback stratejileri ve web uygulamaları için üretim hazırlığı kontrol listeleri.

    275k GitHub starsUsed in 1 repo~2.9k tokens
    DevOps & CloudAuto-check passed
  • Vercel Deploy

    bytedance/deer-flow

    Deploys a project to Vercel with one script and no login, then returns a live preview URL and a claim link for moving the deployment into your own Vercel account.

    83k GitHub starsUsed in 10 repos~797 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 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

Questions about Contract Verification

What does Contract Verification do?

A skill your agent uses when verifying deployed contracts on block explorers. Contract Verification is an agent skill from ccashwell/evm-cortex. Use when verifying deployed contracts on block explorers.

When should I use Contract Verification?

Contract Verification fits situations like: verifying deployed contracts on block explorers.

How do I install Contract Verification in Claude Code?

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

How do I install Contract Verification in Codex?

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

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

What does Contract Verification need to run?

Going by SKILL.md and its folder, Contract Verification needs the command-line tools its instructions call (curl) and credentials named ETHERSCAN_API_KEY, BASESCAN_API_KEY, OPSCAN_API_KEY and ARBISCAN_API_KEY. Our summary lists: A credential in ETHERSCAN_API_KEY; A credential in BASESCAN_API_KEY.

Does Contract Verification access the network?

SKILL.md names 5 domains. In commands or code: api.basescan.org, api-optimistic.etherscan.io, api.arbiscan.io, api.etherscan.io and base.blockscout.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Contract Verification 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 Contract Verification use?

Contract Verification 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 Contract Verification 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 Contract Verification?

Skills that share tags, products or a category with Contract Verification: Deploy Contract (Nethereum/Nethereum, 2.3k stars), Block No Verify Hook (wshobson/agents, 40k stars), Land and Deploy (garrytan/gstack, 136k stars) and Deploy Setup (garrytan/gstack, 136k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Contract Verification?

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.