
from ethskills196
Practical guide and patterns for smart contract tests using Foundry: unit tests, fuzzing, fork tests, and invariants to catch economic and integration bugs.
Provides pragmatic patterns, examples, and checklists for testing Ethereum smart contracts with Foundry. Covers unit tests, fuzz testing, fork testing against real protocol contracts, and invariant testing to surface economic failures. Includes sample test code and a pre-deploy checklist.
Use this skill when writing or reviewing tests for Solidity contracts — especially when you need to test integrations (Uniswap/Aave), fuzz inputs, or assert invariants across random sequences. Ideal for CI test suites and pre-deploy safety checks.
Useful for developer-focused agents and CI automation that can run Foundry (forge) in CI environments; agent outputs are mostly actionable test code and checklists.
Pure documentation skill for smart contract testing with Foundry. Covers unit tests, fuzz testing, fork testing, and invariant testing with solid code examples and practical guidance. No scripts to execute. Well-structured content with clear progressive disclosure from basics to advanced patterns.
No executable scripts — static analysis only. The skill is a well-written reference guide with concrete Solidity code examples. Encourages good testing practices (fuzzing, invariants, fork tests) and explicitly calls out anti-patterns. Minor concern: fork testing section references external RPC URLs which could encourage hardcoded API keys, though the skill itself doesn't hardcode any.