# Foundry

> Ethereum development with foundry (forge, cast, anvil)

- Skill: `majiayu000/foundry` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/foundry`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/foundry/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/foundry

---


## When to Use This Skill
This guide covers how we write Solidity code for Ehtereum programs with foundry (forge, cast, anvil)

## References
Check appropriate references before getting started.

# Forge
| Need to...                                    | Read this resource                                                           |
|-----------------------------------------------|------------------------------------------------------------------------------|
| understand how to use `forge` for testing     | [forge-test-overview.md](reference/forge-test-overview.md)                   |
| write tests in Solidity with `forge`          | [forge-writing-tests.md](reference/forge-writing-tests.md)                   |
| use cheatcodes to manipulate blockchain state | [forge-test-cheatcodes.md](reference/forge-test-cheatcodes.md)               |
| debug tests with detailed call traces         | [forge-test-traces.md](reference/forge-test-traces.md)                       |
| test with randomized inputs (fuzz testing)    | [forge-fuzz-testing.md](reference/forge-fuzz-testing.md)                     |
| organize test cases in table format           | [forge-table-testing.md](reference/forge-table-testing.md)                   |
| test protocol invariants                      | [forge-invariant-testing.md](reference/forge-invariant-testing.md)           |
| replay test failures                          | [forge-replay-testing.md](reference/forge-replay-testing.md)                 |
| test against live blockchain state (forking)  | [forge-fork-testing.md](reference/forge-fork-testing.md)                     |
| deploy smart contracts                        | [forge-deploy.md](reference/forge-deploy.md)                                 |
| generate gas consumption reports              | [forge-gas-reports.md](reference/forge-gas-reports.md)                       |
| capture gas snapshots for functions           | [forge-gas-function-snapshots.md](reference/forge-gas-function-snapshots.md) |
| capture gas snapshots for code sections       | [forge-gas-section-snapshots.md](reference/forge-gas-section-snapshots.md)   |
| lint Solidity code                            | [forge-linting.md](reference/forge-linting.md)                               |
| use Forge Standard Library utilities          | [forge-std.md](reference/forge-std.md)                                       |

# Cast
| Need to...                                    | Read this resource                                                |
|-----------------------------------------------|-------------------------------------------------------------------|
| use cast for Ethereum interactions            | [cast-overview.md](reference/cast-overview.md)                    |

# Anvil
| Need to...                                    | Read this resource                                                |
|-----------------------------------------------|-------------------------------------------------------------------|
| run a local Ethereum development node         | [anvil-overview.md](reference/anvil-overview.md)                  | 

