web3-testing Skill (wshobson) for Claude: What It Does and How to Install It
Helps Claude test Solidity smart contracts with Hardhat and Foundry, including fuzzing, mainnet forking, gas reports and coverage.
- Installs
- 11K
- on skills.sh
- Stars
- 42.1K
- on GitHub
- Files
- 1
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
This is a testing guide for Claude, from wshobson's agents collection. SKILL.md has a Hardhat config, unit test patterns with fixtures, Foundry tests with fuzzing and cheatcodes, and advanced patterns: snapshot and revert, mainnet forking and impersonating accounts. references/details.md adds gas optimization testing, coverage reporting, Etherscan verification and a CI workflow.
It loads when you test Solidity contracts or set up a blockchain test suite. It bundles no scripts. The examples read RPC URLs and a private key from environment variables, so keep real keys out of the chat and out of committed files.
Good for
- Solidity developers writing unit and integration tests
- DeFi teams that test against forked mainnet state
- Teams that want gas reports, coverage and Etherscan verification in CI
Install web3-testing
Claude Code
- 1
Copy this prompt.
Install the web3-testing skill in Claude Code. Run this command: /plugin marketplace add wshobson/agents /plugin install blockchain-web3@claude-code-workflows Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin routes install the whole blockchain-web3 plugin: 1 agent, 0 commands and 4 skills (counted from the plugin folder in the repo tree, which has no hooks or MCP config files). The skills-only routes install just this skill, with no agents or commands. The skill needs a Hardhat or Foundry project of your own. Its example config reads RPC URLs, a private key and API keys from environment variables.
From the project README. Source.
What's in the skill
When it loads
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.
Sections in SKILL.md
- When to Use This Skill
- Hardhat Testing Setup
- Unit Testing Patterns
- Foundry Testing (Forge)
- Advanced Testing Patterns
- Snapshot and Revert
- Mainnet Forking
- Impersonating Accounts
- Additional patterns and templates
Key facts
- Author
- wshobson (repo owner)
- License
- MIT
- Installs on skills.sh
- 10,988 (Nov 2, 2026)
- Last repo commit
- Oct 30, 2026
What it includes
hardhat.config.js with gas reporter, coverage and Etherscan
Sets Solidity 0.8.19, the optimizer, mainnet forking, a Goerli network and plugin imports.
Try: “Write Hardhat tests for my ERC-20 token, including events and reverts.”
Write ·
Hardhat testing setupHardhat tests with loadFixture for deployment, transfers, events and time
Examples check owner and supply, token balance changes, emitted events, time travel and a gas ceiling.
Write ·
Unit testing patternsforge-std tests with fuzzing and cheatcodes
Uses vm.prank, vm.expectRevert, vm.assume, vm.deal and a fuzz test, plus a createSelectFork mainnet fork test.
Write ·
Foundry testsReset chain state between tests with evm_snapshot
Takes a snapshot before each test and reverts after it.
Write ·
Snapshot and revertRun tests against real mainnet contracts via hardhat_reset
Forks mainnet at a block number from MAINNET_RPC_URL and talks to Uniswap and DAI contracts.
Write ·
Mainnet forkinghardhat_impersonateAccount to act as another address
Lets a test move tokens from another address on a local fork.
Write ·
Impersonating accountsGas tests, npx hardhat coverage and npx hardhat verify (details.md)
The verify command targets a network and a contract address with constructor arguments.
Runs code ·
Gas, coverage and verificationGitHub Actions job that compiles, tests and covers (details.md)
Runs npm install, npx hardhat compile, test and coverage, then uploads to Codecov.
Runs code ·
CI workflow
From the official docs
Permissions
Medium risk
The main risk is a private key or RPC key leaking, or a command touching a live network. Use a test-only key, keep it in environment variables and review each command.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
The example config uses a private key
hardhat.config.js passes process.env.PRIVATE_KEY as an account for the Goerli network. Use a test-only key, keep it in an environment variable and do not commit it. github.com
The verify command publishes to Etherscan
details.md shows npx hardhat verify --network mainnet with a contract address and constructor arguments, and the config holds an Etherscan API key. Only run it for contracts you mean to publish. github.com
Forking and impersonation hit live RPC endpoints
The fork examples read MAINNET_RPC_URL and use real mainnet contract addresses such as the Uniswap router and DAI. Check which RPC endpoint and block number your tests point at. github.com
The plugin route installs more than this skill
The blockchain-web3 plugin has 4 skills, 1 agent and 0 commands. The repo tree shows no hooks or MCP config files in its folder. The skills-only routes install only this skill. github.com
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only mode. Use version control. |
|---|---|
| Talks to | Your mainnet and Goerli RPC providers, and eth-mainnet.alchemyapi.io, the URL hard-coded in the Foundry fork example. Etherscan, when you run the verify command. Codecov, in the CI example |
| Sign-in and keys | The examples read keys from environment variables such as PRIVATE_KEY, ETHERSCAN_API_KEY and COINMARKETCAP_API_KEY. SKILL.md does not say where you store them. |
| Scopes |
|
Questions
What does the web3-testing skill do?
It gives Claude patterns for testing smart contracts. Claude uses it to write Hardhat and Foundry tests, fuzz inputs, fork mainnet and set up coverage and CI.
How do I install web3-testing?
Use the install box at the top of this page. It lists the plugin route and two skills-only commands: npx skills add wshobson/agents --skill web3-testing and gh skill install wshobson/agents web3-testing (GitHub CLI 2.90 or later). The skills-only commands skip the plugin's agents and commands.
Does it need API keys or a wallet key?
The example Hardhat config reads MAINNET_RPC_URL, GOERLI_RPC_URL, PRIVATE_KEY, COINMARKETCAP_API_KEY and ETHERSCAN_API_KEY from the environment. Use a throwaway test key, never one that holds real funds.
Does it send transactions to a real network?
The examples fork mainnet locally. The config also lists a Goerli network with an account key, and details.md has an npx hardhat verify command for mainnet, which publishes contract details to Etherscan. Check the network before you run anything.
Hardhat or Foundry?
It covers both. Hardhat examples are JavaScript with Chai, and Foundry examples are Solidity tests that import forge-std.
Is it safe?
Installing it adds a guide and one reference file, with no scripts. The examples reference a private key, RPC URLs and a verify command, so keep keys in environment variables, never paste them into the chat, and review each command before Claude runs it.
Is this skill from Anthropic?
No. It is in wshobson/agents, a community collection. The skill sits in the blockchain-web3 plugin there.
Should I install the whole blockchain-web3 plugin?
Only if you want the rest. The README documents a plugin route for Claude Code and Codex. The plugin folder holds 4 skills, 1 agent and 0 commands, and the repo tree shows no hooks or MCP config files in it.
Information
updated Nov 2, 2026
- Repository
- wshobson/agents
- Folder
plugins/blockchain-web3/skills/web3-testing
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- web3-testing SKILL.md · github.com
- wshobson/agents README · github.com
- blockchain-web3 plugin.json · github.com
- web3-testing details.md · github.com