Agent skill · software engineering · rmyndharis
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
Provides specific Hardhat and Foundry testing patterns and configurations that the AI wouldn't reliably generate on its own.
What it needs
Requires foundry, hardhat installed locally. About 5k tokens when loaded. Last updated 2026-08-02. 1,255 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. Do not use this skill when The task is unrelated to web3 smart contract testing You need a different domain or tool outside this scope Instructions Clarify goals, constraints, and required inputs. Apply relevant best practices and validate outcomes. Provide actionable steps and verification. Use this skill when 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 Gas Optimization Testing Coverage Reporting Contract Verification CI/CD Integration Resources references/hardhat-setup.md: Hardhat configuration guide references/foundry-setup.md: Foundry testing framework references/test-patterns.md: Testing best practices references/mainnet-forking.md: Fork testing strategies references/contract-verification.md: Etherscan verification assets/hardhat-config.js: Complete Hardhat configuration assets/test-suite.js: Comprehensive test examples assets/foundry.toml: Foundry configuration scripts/test-contract.sh: Automated testing script Best Practices 1. Test Coverage: Aim for >90% coverage 2. Edge Cases: Test boundary conditions 3. Gas Limits: Verify functions don't hit block gas limit 4. Reentrancy: Test for reentrancy vulnerabilities 5. Access Control: Test unauthorized access attempts 6. Events: Verify event emissions 7. Fixtures: Use fixtures to avoid code duplication 8. Mainnet Fork: Test with real contracts 9. Fuzzing: Use property-based testing 10. CI/CD: Automate testing on every commit
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills rmyndharis/web3-testing