/foundry-agent:foundry-agent-safetyfrom foundry-agent
Safety policy for AI agents using Foundry cast/forge on live chains. Use before any cast send, forge script --broadcast, or value transfer. Covers chain confirmation, secrets, dry-run, and confirmation gates.
Ships in foundry-agent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Prevent accidental mainnet writes, wrong-chain sends, and secret leakage when agents use cast / forge script --broadcast.
cast chain-id --rpc-url $ETH_RPC_URL
# Base Sepolia = 84532; Base = 8453; Ethereum = 1
ETH_RPC_URL or --rpc-url is the intended endpoint (not a surprise public mainnet when testing).cast wallet address --private-key $PRIVATE_KEY
# or: cast wallet address --keystore $KEYSTORE --password $KEYSTORE_PASSWORD
cast balance $USER --rpc-url $ETH_RPC_URL
cast call $TOKEN "balanceOf(address)(uint256)" $USER --rpc-url $ETH_RPC_URL
cast call / cast estimate before cast send:cast call $TARGET "$SIG" $ARGS --rpc-url $ETH_RPC_URL --from $USER
cast estimate $TARGET "$SIG" $ARGS --rpc-url $ETH_RPC_URL --from $USER
cast receipt $TX --rpc-url $ETH_RPC_URL
cast tx $TX --rpc-url $ETH_RPC_URL
cast 4byte 0x08c379a0 # example Error(string) selector
cast receipt $TX --rpc-url $ETH_RPC_URL -j
Prefer Anvil fork before mainnet writes:
anvil --fork-url $ETH_RPC_URL --chain-id 31337
# point ETH_RPC_URL at http://127.0.0.1:8545 for dry execution with anvil keys
See skill anvil-node for forking details.
$PRIVATE_KEY, keystore passwords, or API keys in chat logs.bankr-ops.cast-commands, foundry-script-opsbankr-ops (same confirmation gates)What SKILL.md sets; muted values are Claude Code's defaults
foundry-agent@cyotee is listed by cyotee/cyotee-claude-plugins — review the source before installing
npx claudepluginhub cyotee/cyotee-claude-plugins --plugin foundry-agent4 skills in this plugin
/anvil-nodeRun local Ethereum nodes with Anvil. Use when setting up local development environments, forking mainnet for testing, or running integration tests against a local node./cast-commandsInteract with EVM chains using Cast CLI. Use when querying blockchain data, sending transactions, calling contracts, or converting between formats. Cast is the Swiss Army knife for chain interaction./foundry-script-opsMulti-step on-chain agent operations with forge script (approve then deposit, multi-call sequences). Use when sequential cast send is error-prone. Prefer cast for single reads/writes.
Other plugins' skills for the same job