Agent skill · software engineering · wshobson

web3-testing

Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.

Why this skill is useful

Adds executable scripts for comprehensive smart contract testing using Hardhat and Foundry, including mainnet forking and gas optimization strategies.

What it needs

Requires foundry, hardhat installed locally. About 3k tokens when loaded. Last updated 2026-08-05. 38,570 stars on the source repository.

What this skill does

Web3 Smart Contract Testing Master comprehensive testing strategies for smart contracts using Hardhat, Foundry, and advanced testing patterns. When to Use This Skill Writing unit tests for smart contracts Setting up integration test suites Performing gas optimization testing Fuzzing for edge cases Forking mainnet for realistic testing Automating test coverage reporting Verifying contracts on Etherscan Hardhat Testing Setup Unit Testing Patterns Foundry Testing (Forge) Advanced Testing Patterns Snapshot and Revert Mainnet Forking Impersonating Accounts Additional patterns and templates More detailed templates and worked examples live in references/details.md. Read that file for the full pattern library.

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills wshobson/web3-testing

View the source on GitHub

Browse the @skills marketplace