solidity-testing

solidity-testing is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 57 tokens per session (745 once invoked), scanned A, original, MIT.

A testing standard for Solidity smart contracts, which are programs that run on a blockchain. It requires tests for core functions, including normal behavior, permissions, limits, and failures.

In plain words
What is it for?
Use it to organize contract test files, name tests, verify access checks and boundary values, cover revert paths, and run selected tests by contract or test name.
Why use it?
It reduces the risk of contract bugs by checking both expected results and cases where calls should be rejected. Tests are kept separate so one test does not depend on another.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/comeonoliver/skillshub/solidity-testing
Any agent
npx skills add ComeOnOliver/skillshub --skill solidity-testing
Clone the repo
git clone --depth 1 https://github.com/ComeOnOliver/skillshub

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for solidity-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/solidity-testing.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/solidity-testing)
Your own site
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/solidity-testing"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/solidity-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00057 $0.00745
Opus 5 $0.00028 $0.00373
Sonnet 5 $0.00011 $0.00149
Haiku 4.5 $0.00006 $0.00075

Measured 4d ago against content hash 8141dc8e5323, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

solidity-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 4d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/0xlayerghost/solidity-agent-kit/solidity-testing/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Standards

Language Rule

  • Always respond in the same language the user is using. If the user asks in Chinese, respond in Chinese. If in English, respond in English.

Test Organization

  • One test contract per source contract: MyToken.solMyToken.t.sol
  • File location: All tests in test/ directory
  • Naming: test_<feature>_<scenario> for passing tests, testFail_<feature>_<scenario> for expected reverts
    • Example: test_transfer_revertsWhenInsufficientBalance
    • Example: test_stake_updatesBalanceCorrectly
  • Independence: Each test must run in isolation — use setUp() for shared state, no cross-test dependencies
  • Filtering: Support --match-test and --match-contract for targeted runs

Coverage Requirements

Every core function must have tests covering:

Scenario What to verify
Happy path Standard input → expected output, correct state changes
Permission checks Unauthorized caller → vm.expectRevert with correct error
Boundary conditions Zero values, max values (type(uint256).max), off-by-one
Failure scenarios Every require / revert / custom error path
State changes Storage updates, balance changes, event emissions (vm.expectEmit)
Edge cases Empty arrays, duplicate calls, self-transfers

Foundry Cheatcodes Quick Reference

Cheatcode Usage
vm.prank(addr) Next call from addr
vm.startPrank(addr) All calls from addr until vm.stopPrank()
vm.warp(timestamp) Set block.timestamp
vm.roll(blockNum) Set block.number
vm.deal(addr, amount) Set ETH balance
vm.expectRevert(error) Next call must revert with specific error
vm.expectEmit(true,true,false,true) Verify event emission (topic checks)
vm.record() / vm.accesses() Track storage reads/writes
makeAddr("name") Create labeled address for readable traces

Fuzz Testing Rules

Read the full file on GitHub · 84 lines

Changes

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.

  1. 4d ago First seen · 84 lines · 57 tokens per session scan A 8141dc8e5323

Subscribe to this mod's changes

solidity-testing is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 57 tokens to every session and 745 once invoked, about $0.0003 per session on Opus 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-08-30.