Back to Skills

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.

26,022stars2,863forksUpdated 1/20/2026

Security Assessment

Medium Risk(50/100)

Detected risks:

Secret Exposure([SKILL.md] PRIVATE_KEY, [SKILL.md] Token =, [SKILL.md] token =)
Sensitive File Access([SKILL.md] .env)
Security Score50/100

About web3-testing

The web3-testing skill provides a robust framework for testing smart contracts in a comprehensive manner using tools like Hardhat and Foundry. This skill addresses the challenges of ensuring that smart contracts function correctly, efficiently, and securely before deployment, which is crucial in the rapidly evolving landscape of decentralized finance (DeFi) and blockchain technology. By employing various testing strategies, developers can mitigate risks associated with smart contract vulnerabilities and ensure reliability in their applications.

FAQ

What types of tests can be conducted using this skill?

You can conduct unit tests, integration tests, gas optimization tests, and perform mainnet forking for realistic testing.

Is this skill compatible with all versions of Solidity?

This skill is configured for Solidity version 0.8.19 as per the Hardhat setup.

What are the requirements for using this skill?

You need to have Hardhat and related dependencies installed, as well as access to an RPC URL for mainnet forking and other networks.

Can I automate test coverage reporting with this skill?

Yes, the setup includes the solidity-coverage plugin which allows for automated test coverage reporting.

What is the purpose of gas optimization testing?

Gas optimization testing helps ensure that your smart contract functions are efficient and cost-effective in terms of gas usage.

Install web3-testing

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

wshobson/agents