cast-commands

cast-commands is a skill for Claude Code, Codex from ccashwell/evm-cortex. It costs 45 tokens per session (1,835 once invoked), scanned A, original, MIT.

A reference for Foundry’s cast command-line tool, which reads and changes Ethereum contract data without requiring a custom script.

In plain words
What is it for?
Use it to call read-only functions, send transactions, inspect storage, query blocks, and encode or decode Ethereum contract data.
Why use it?
It provides ready-made commands for common contract interactions, reducing the time needed to inspect state, encode data, or send transactions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to call read-only functions, send transactions, inspect storage, query blocks, and encode or decode Ethereum contract data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ccashwell/evm-cortex/cast-commands
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ccashwell/evm-cortex --skill cast-commands
Clone the repo
git clone --depth 1 https://github.com/ccashwell/evm-cortex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cast-commands

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccashwell/evm-cortex/cast-commands/github.svg)](https://agentmods.dev/skills/ccashwell/evm-cortex/cast-commands)
Your own site
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/cast-commands"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/cast-commands/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cast-commands

Your own site · 80×15
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/cast-commands"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/cast-commands.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,835 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01835
Opus 5.5 $0.00018 $0.00734
Sonnet 5.5 $0.00009 $0.00367
Haiku 4.5 $0.00005 $0.00184

Measured 1mo ago against content hash 1883509865e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cast-commands scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cast-commands/SKILL.md · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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)

# 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)

# 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)

# 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

# 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

Read the full file on GitHub · 226 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 226 lines · 45 tokens per session scan A 1883509865e0

Subscribe to this mod's changes

cast-commands is a skill published in the GitHub repository ccashwell/evm-cortex (131 stars, last pushed 17d ago), licensed MIT. It adds 45 tokens to every session and 1,835 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.