Skills / Community / Foundry & Solidity

Foundry & Solidity

Develop and test Solidity smart contracts with the Foundry toolkit. Write Forge tests, deploy with scripts, and debug using Cast and Anvil. Triggers on forge/cast/anvil commands and files like foundry.toml, *.t.sol, and *.s.sol.

This skill makes Claude fluent in the Foundry smart-contract workflow. It writes and runs Forge tests (including fuzz and invariant tests), authors deployment scripts, simulates and debugs transactions with Cast and Anvil, and follows Solidity best practices — covering the full forge/cast/anvil loop from `foundry.toml` to deployed contract.

foundry solidity ethereum smart-contracts forge

When to use

Use when developing Ethereum smart contracts, writing Forge tests, scripting deployments, debugging with Cast or Anvil, or working with foundry.toml, *.t.sol, and *.s.sol files.

Examples

Forge fuzz tests

Write property-based tests for a contract

Write Forge fuzz and invariant tests for this ERC-20 vault contract to catch rounding and accounting bugs

Deploy script

Author a Foundry deployment script

Create a Foundry deployment script (*.s.sol) that deploys my contract, verifies it on Etherscan, and reads the address from an env var
Added to wishlist