solidity-agentic-stack: Skill for Claude Code

.claude/skills/foundry-cast/SKILL.md

foundry-cast is a skill for Claude Code from Hirama/solidity-agentic-stack. It costs 75 tokens per session (1,759 once invoked), scanned A, original, MIT.

A read-only command-line tool for inspecting blockchain data and smart contracts. It can read contract state, decode transaction data, query logs, and prepare call data without using private keys or sending transactions.

In plain words
What is it for?
Use it to inspect deployed contracts, read balances and storage, decode transactions and errors, look up function or event signatures, resolve ENS names, and simulate read-only calls.
Why use it?
It removes the need to write scripts or run a separate service for common blockchain lookups. It also lowers the risk of changing the blockchain while investigating it.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is Hirama/solidity-agentic-stack's own configuration. It tells Claude Code how to work on solidity-agentic-stack itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything solidity-agentic-stack configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Hirama/solidity-agentic-stack. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Hirama/solidity-agentic-stack/main/.claude/skills/foundry-cast/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Hirama/solidity-agentic-stack

Made for: Claude Code.

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 foundry-cast

README.md
[![agentmods](https://agentmods.dev/badge/skills/hirama/solidity-agentic-stack/foundry-cast/github.svg)](https://agentmods.dev/skills/hirama/solidity-agentic-stack/foundry-cast)
Your own site
<a href="https://agentmods.dev/skills/hirama/solidity-agentic-stack/foundry-cast"><img src="https://agentmods.dev/badge/skills/hirama/solidity-agentic-stack/foundry-cast/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 foundry-cast

Your own site · 80×15
<a href="https://agentmods.dev/skills/hirama/solidity-agentic-stack/foundry-cast"><img src="https://agentmods.dev/badge/skills/hirama/solidity-agentic-stack/foundry-cast.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,759 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.
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.00075 $0.01759
Opus 5.5 $0.00030 $0.00704
Sonnet 5.5 $0.00015 $0.00352
Haiku 4.5 $0.00007 $0.00176

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

Security

Grade A, and why

foundry-cast 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 2mo 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.

.claude/skills/foundry-cast/SKILL.md · 196 lines

How it starts

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

Cast — Foundry's Chain CLI

cast is the read-side counterpart to forge. Every chain operation an agent might want from an MCP server is already a cast subcommand. No server, no daemon, no shebang bugs — just the binary that ships with Foundry.

Full reference: https://getfoundry.sh/cast

When to use this skill

  • Inspecting a deployed contract (bytecode, storage, ABI)
  • Decoding a transaction's calldata or revert reason
  • Looking up a 4-byte selector or event signature
  • Fetching balance, nonce, code at an address
  • Reading state via eth_call without writing a Forge test
  • Resolving ENS names
  • Encoding calldata for a script

Setup

cast needs an RPC. Either pass --rpc-url per command or set ETH_RPC_URL:

export ETH_RPC_URL=https://eth.blockscout.com/api/eth-rpc   # free, no key
# or
export ETH_RPC_URL=$RPC_MAINNET                              # from .env

Blockscout's public RPC is the simplest no-key fallback for read-only ops.

Read-only cheat sheet

Account state

cast balance vitalik.eth                                 # ETH balance (wei)
cast balance vitalik.eth --ether                         # in ETH
cast nonce 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045    # tx count
cast code 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48     # runtime bytecode
cast codesize 0xa0b8...eb48
cast storage 0xa0b8...eb48 0                             # slot 0
cast proof 0xa0b8...eb48 0                               # merkle proof for slot

Block / chain

cast block-number
cast block latest
cast gas-price
cast chain-id
cast base-fee
cast age <block>                                         # human time
cast find-block <timestamp>                              # block at unix time

Transactions

cast tx <hash>                                           # tx envelope
cast receipt <hash>                                      # receipt + logs
cast run <hash>                                          # re-execute & trace
cast trace <hash>                                        # full call trace
cast decode-transaction <raw-hex>
cast 4byte-calldata 0xa9059cbb...                        # match selector → sig

Read the full file on GitHub · 196 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. 2mo ago First seen · 196 lines · 75 tokens per session scan A 1acd90940bf5

Subscribe to this mod's changes

foundry-cast is a skill published in the GitHub repository Hirama/solidity-agentic-stack (6 stars, last pushed 4mo ago), licensed MIT. It adds 75 tokens to every session and 1,759 once invoked, about $0.0003 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-08-31.