Agent skill

Cast Commands

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when interacting with Ethereum contracts and data from the command line using Foundry's cast.

MITAuto-check passed

Install Cast Commands

skills CLI
$ npx skills add ccashwell/evm-cortex --skill cast-commands -a claude-code

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

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

At a glance

A skill your agent uses when interacting with Ethereum contracts and data from the command line using Foundry's cast.

  • Interacting with Ethereum contracts and data from the command line using Foundrys cast
  • SKILL.md covers Overview, Reading State (cast call), Writing State (cast send) and Storage Inspection (cast…, plus 8 more sections
  • Needs PRIVATE_KEY and ETHERSCAN_API_KEY

What it does

Cast Commands is an agent skill from ccashwell/evm-cortex. Use when interacting with Ethereum contracts and data from the command line using Foundry's cast. Covers read/write calls, storage inspection, ABI encoding/decoding, block queries, and common one-liners.

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.

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

When your agent uses it

  • Interacting with Ethereum contracts and data from the command line using Foundrys cast

Example prompts

  • “/cast-commands”

Requirements

  • A credential in PRIVATE_KEY
  • A credential in ETHERSCAN_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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are 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:

    • PRIVATE_KEY
    • ETHERSCAN_API_KEY

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

Context cost

Cast Commands loads about 1.5k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 96 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.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). 96 words, ~1,495 tokens.

Download SKILL.mdSave it as .claude/skills/cast-commands/SKILL.md (or your agent's skills folder).
name
cast-commands
description
Use when interacting with Ethereum contracts and data from the command line using Foundry's cast. Covers read/write calls, storage inspection, ABI encoding/decoding, block queries, and common one-liners.

Cast CLI Reference

Overview

cast is Foundry's command-line tool for interacting with EVM chains. Read state, send transactions, decode data, and inspect contracts without writing scripts.

Reading State (cast call)

bash
# Read a view function
cast call 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
  "balanceOf(address)(uint256)" 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 \
  --rpc-url $ETH_RPC_URL

# Read with named outputs
cast call 0xUniswapV3Pool "slot0()(uint160,int24,uint16,uint16,uint16,uint8,bool)" \
  --rpc-url $ETH_RPC_URL

# Call at a specific block
cast call 0xContract "totalSupply()(uint256)" --block 18000000 --rpc-url $ETH_RPC_URL

# Call to another address (simulated msg.sender)
cast call --from 0xWhale 0xContract "balanceOf(address)(uint256)" 0xWhale

Writing State (cast send)

bash
# Send a transaction
cast send 0xToken "transfer(address,uint256)" 0xRecipient 1000000 \
  --private-key $PRIVATE_KEY --rpc-url $ETH_RPC_URL

# Approve spending
cast send 0xToken "approve(address,uint256)" 0xSpender $(cast max-uint) \
  --private-key $PRIVATE_KEY --rpc-url $ETH_RPC_URL

# Send with value (ETH)
cast send 0xContract "deposit()" --value 1ether \
  --private-key $PRIVATE_KEY --rpc-url $ETH_RPC_URL

# Send with gas settings
cast send 0xContract "doStuff()" \
  --gas-limit 500000 --gas-price 30gwei \
  --private-key $PRIVATE_KEY --rpc-url $ETH_RPC_URL

Storage Inspection (cast storage)

bash
# Read raw storage slot
cast storage 0xContract 0 --rpc-url $ETH_RPC_URL

# Read specific slot (e.g., ERC-1967 implementation slot)
cast storage 0xProxy \
  0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc \
  --rpc-url $ETH_RPC_URL

# Read mapping value: slot = keccak256(key . mappingSlot)
# For mapping at slot 2, key = 0xAddress:
cast index address 0xAddress 2
# Then read that computed slot
cast storage 0xContract $(cast index address 0xAddress 2)

ABI Encoding / Decoding

bash
# Encode function calldata
cast calldata "transfer(address,uint256)" 0xRecipient 1000000

# Decode calldata
cast 4byte-decode 0xa9059cbb000000000000000000000000...

# Encode constructor arguments
cast abi-encode "constructor(string,string,uint256)" "MyToken" "MTK" 1000000

# Decode ABI-encoded data
cast abi-decode "balanceOf(address)(uint256)" 0x00000000000000000000000000000000000000000000000000000000000f4240

# Get function selector (first 4 bytes of keccak256)
cast sig "transfer(address,uint256)"
# Output: 0xa9059cbb

# Reverse lookup selector
cast 4byte 0xa9059cbb

Block and Chain Info

bash
# Current block number
cast block-number --rpc-url $ETH_RPC_URL

# Block details
cast block latest --rpc-url $ETH_RPC_URL
cast block 18000000 --rpc-url $ETH_RPC_URL

# Base fee
cast base-fee --rpc-url $ETH_RPC_URL

# Gas price
cast gas-price --rpc-url $ETH_RPC_URL

# Chain ID
cast chain-id --rpc-url $ETH_RPC_URL

# Client version
cast client --rpc-url $ETH_RPC_URL

Contract Inspection

bash
# Get contract bytecode
cast code 0xContract --rpc-url $ETH_RPC_URL

# Get contract bytecode size
cast code 0xContract --rpc-url $ETH_RPC_URL | wc -c

# Generate interface from Etherscan
cast interface 0xContract --etherscan-api-key $ETHERSCAN_API_KEY

# Download verified source from Etherscan
cast etherscan-source 0xContract --etherscan-api-key $ETHERSCAN_API_KEY -d ./source

Account and Balance

bash
# ETH balance
cast balance 0xAddress --rpc-url $ETH_RPC_URL
cast balance 0xAddress --rpc-url $ETH_RPC_URL --ether  # human-readable

# Nonce
cast nonce 0xAddress --rpc-url $ETH_RPC_URL

# Resolve ENS
cast resolve-name vitalik.eth --rpc-url $ETH_RPC_URL
cast lookup-address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --rpc-url $ETH_RPC_URL

Transaction Inspection

bash
# Get transaction details
cast tx 0xTxHash --rpc-url $ETH_RPC_URL

# Get transaction receipt
cast receipt 0xTxHash --rpc-url $ETH_RPC_URL

# Decode transaction input
cast 4byte-decode $(cast tx 0xTxHash input --rpc-url $ETH_RPC_URL)

# Trace a transaction (requires archive node)
cast run 0xTxHash --rpc-url $ETH_RPC_URL

Conversion Utilities

bash
# Wei to ether
cast from-wei 1000000000000000000
# Output: 1.000000000000000000

# Ether to wei
cast to-wei 1.5
# Output: 1500000000000000000

# Hex to decimal
cast to-dec 0xff
# Output: 255

# Decimal to hex
cast to-hex 255
# Output: 0xff

# Keccak256 hash
cast keccak "Transfer(address,address,uint256)"

# Max uint256
cast max-uint
# Output: 115792089237316195423570985008687907853269984665640564039457584007913129639935

Common One-Liners

bash
# Check if address is a contract
cast code 0xAddress --rpc-url $ETH_RPC_URL | grep -q "^0x$" && echo "EOA" || echo "Contract"

# Get USDC balance (6 decimals)
cast call 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
  "balanceOf(address)(uint256)" 0xAddress --rpc-url $ETH_RPC_URL | \
  xargs -I{} cast from-wei {} 6

# Read ERC-1967 proxy implementation
cast storage 0xProxy \
  0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc \
  --rpc-url $ETH_RPC_URL

# Simulate a swap (static call)
cast call 0xRouter \
  "getAmountsOut(uint256,address[])(uint256[])" \
  1000000000000000000 "[0xWETH,0xUSDC]" \
  --rpc-url $ETH_RPC_URL

# Estimate gas for a transaction
cast estimate 0xContract "doStuff(uint256)" 42 --rpc-url $ETH_RPC_URL

# Watch for new blocks
cast block-number --rpc-url $ETH_RPC_URL --watch

Tips

  • Set ETH_RPC_URL environment variable to avoid --rpc-url on every command
  • Use --json flag for machine-readable output
  • Pipe cast output to other cast commands for complex queries
  • Use cast wallet subcommands for key management
  • cast completions bash/zsh/fish generates shell completions

© 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/cast-commands of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Cast Commands 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.

Cast Commands compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cast Commands this skillccashwell/evm-cortex131—~1.5kAutomated safety check: PassMIT
Wagmi Feature Developmentwevm/wagmi6.8k—~3.8kAutomated safety check: PassMIT
Release Roundethereumjs/ethereumjs-monorepo2.8k—~2kAutomated safety check: PassNone
Update Est Fixturesethereumjs/ethereumjs-monorepo2.8k—~3.3kAutomated safety check: PassNone
Swapper Depositswapperfinance/swapper-toolkit852—~1.8kAutomated safety check: PassMIT
BNB Chain MCP Serverinternet-court/internet-court-skill6.5k1 repos~1.7kAutomated safety check: PassMIT

Similar skills

  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Release Round

    ethereumjs/ethereumjs-monorepo

    Runs a coordinated EthereumJS npm release round in six human-gated phases — intent and readiness, CHANGELOG, version bump, publish (human executes), post-publish verification, and announcements.

    2.8k GitHub stars~2k tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Update Est Fixtures

    ethereumjs/ethereumjs-monorepo

    Updates EthereumJS execution-spec test fixtures from an ethereum/execution-specs release, then (after a human merge) points the monorepo submodule, updates VM npm scripts, reports a first test run…

    2.8k GitHub stars~3.3k tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Swapper Deposit

    swapperfinance/swapper-toolkit

    Deposit and bridge funds into a wallet or protocol using Swapper Finance.

    852 GitHub stars~1.8k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • BNB Chain MCP Server

    internet-court/internet-court-skill

    Connects an agent to the BNB Chain MCP server to read blocks and contracts, move tokens and NFTs, register ERC-8004 agents and use Greenfield storage.

    6.5k GitHub starsUsed in 1 repo~1.7k tokens
    Agent WorkflowsAuto-check passed
  • Minara Crypto Trading and Wallet

    Minara-AI/minara-skills

    Drives the Minara CLI for crypto swaps, perps, limit orders, wallet transfers, deposits and withdrawals, plus AI market analysis.

    362 GitHub stars~5.7k tokensUpdated 22 days ago
    Business, Finance & HRAuto-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 9 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 9 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 9 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 9 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 9 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 9 days ago
    Auto-check passed

Works with

Questions about Cast Commands

What does Cast Commands do?

A skill your agent uses when interacting with Ethereum contracts and data from the command line using Foundry's cast. Cast Commands is an agent skill from ccashwell/evm-cortex. Use when interacting with Ethereum contracts and data from the command line using Foundry's cast.

When should I use Cast Commands?

Cast Commands fits situations like: interacting with Ethereum contracts and data from the command line using Foundrys cast.

How do I install Cast Commands in Claude Code?

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

How do I install Cast Commands in Codex?

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

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

What does Cast Commands need to run?

Going by SKILL.md and its folder, Cast Commands needs credentials named PRIVATE_KEY and ETHERSCAN_API_KEY. Our summary lists: A credential in PRIVATE_KEY; A credential in ETHERSCAN_API_KEY.

Does Cast Commands 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 Cast Commands 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 Cast Commands use?

Cast Commands 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 Cast Commands use?

About 1.5k tokens (SKILL.md is roughly 6k 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 Cast Commands?

Skills that share tags, products or a category with Cast Commands: Wagmi Feature Development (wevm/wagmi, 6.8k stars), Release Round (ethereumjs/ethereumjs-monorepo, 2.8k stars), Update Est Fixtures (ethereumjs/ethereumjs-monorepo, 2.8k stars) and Swapper Deposit (swapperfinance/swapper-toolkit, 852 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cast Commands?

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.