Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/nirholas/three.wsnpx agentmods add skills/nirholas/three.ws/smart-contract-testingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nirholas/three.ws/smart-contract-testing)<a href="https://agentmods.dev/skills/nirholas/three.ws/smart-contract-testing"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/smart-contract-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nirholas/three.ws/smart-contract-testing"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/smart-contract-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.01385 |
| Opus 5.5 | $0.00013 | $0.00554 |
| Sonnet 5.5 | $0.00007 | $0.00277 |
| Haiku 4.5 | $0.00003 | $0.00138 |
Grade A, and why
smart-contract-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Smart Contract Testing
When to use this skill
Use when the user asks about:
- Writing tests for smart contracts
- Setting up a testing framework (Foundry or Hardhat)
- Fuzz testing or invariant testing strategies
- Fork testing against mainnet state
- Gas benchmarking and optimization verification
- Debugging failing contract tests
Testing Framework Selection
Foundry vs Hardhat
| Feature | Foundry | Hardhat |
|---|---|---|
| Language | Solidity | JavaScript/TypeScript |
| Speed | Very fast (native) | Slower (JS runtime) |
| Fuzzing | Built-in | Requires plugins |
| Fork testing | Built-in | Built-in |
| Debugging | forge debug, traces | console.sol, traces |
| Ecosystem | Growing rapidly | Mature, large plugin ecosystem |
Recommendation: Use Foundry for new projects. Use Hardhat when you need complex JS scripting or specific Hardhat plugins.
Testing with Foundry
1. Unit Test Structure
Follow this pattern for each test:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {Test} from "forge-std/Test.sol";
import {MyContract} from "../src/MyContract.sol";
contract MyContractTest is Test {
MyContract internal target;
address internal alice = makeAddr("alice");
address internal bob = makeAddr("bob");
function setUp() public {
target = new MyContract();
deal(alice, 100 ether);
}
function test_deposit_succeeds() public {
vm.prank(alice);
target.deposit{value: 1 ether}();
assertEq(target.balanceOf(alice), 1 ether);
}
function test_deposit_revertsWhenZero() public {
vm.prank(alice);
vm.expectRevert(MyContract.ZeroAmount.selector);
target.deposit{value: 0}();
}
}
Naming conventions:
test_functionName_scenariofor expected-pass teststest_functionName_revertsWhen_conditionfor expected-revert teststestFuzz_functionNamefor fuzz tests
2. Fuzz Testing
Let Foundry generate random inputs to find edge cases:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 204 lines · 33 tokens per session scan A f2686ee6864a
smart-contract-testing is a skill published in the GitHub repository nirholas/three.ws (244 stars, last pushed today), licensed Apache-2.0. It adds 33 tokens to every session and 1,385 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
solidity-testing
Every core function must have tests covering.
swift-protocol-di-testing
Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.
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.
building-pydantic-ai-agents
Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), workspaces, structured output, streaming, testing, and multi-agent patterns. Use when the user mentions Pydantic AI, imports pydanticai, or asks to build an AI agent, add tools/capabilities, attach a workspace, defer capability…
test-fixtures
Use when setting up test environments for Solidity protocols. Covers mock contracts, fork-based fixtures, shared setUp, factory patterns, token deployments, and reusable test helpers.
cairo-testing
Cairo smart-contract testing with snforge. Trigger on "write tests", "add unit tests", "fuzz test", "integration test", "test this contract", "regression test". Guides test strategy, cheatcode usage, and coverage.