solidity-testing

solidity-testing is a skill for Claude Code, Codex from 0xlayerghost/solidity-agent-kit. It costs 57 tokens per session (745 once invoked), scanned A, a copy of solidity-testing, MIT.

A set of testing rules for Solidity smart contracts, including where tests go, how they are named, and which situations they must cover. Tests are checks that confirm code behaves correctly and rejects invalid actions.

In plain words
What is it for?
Use it when building Solidity tests for successful operations, permission checks, boundary values, failed transactions, and targeted test runs.
Why use it?
It reduces the chance that core contract functions fail for normal inputs, unauthorized users, edge cases, or expected error conditions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building Solidity tests for successful operations, permission checks, boundary values, failed transactions, and targeted test runs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/0xlayerghost/solidity-agent-kit/solidity-testing
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.

Any agent
npx skills add 0xlayerghost/solidity-agent-kit --skill solidity-testing
Clone the repo
git clone --depth 1 https://github.com/0xlayerghost/solidity-agent-kit

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/0xlayerghost/solidity-agent-kit/solidity-testing/github.svg)](https://agentmods.dev/skills/0xlayerghost/solidity-agent-kit/solidity-testing)
Your own site
<a href="https://agentmods.dev/skills/0xlayerghost/solidity-agent-kit/solidity-testing"><img src="https://agentmods.dev/badge/skills/0xlayerghost/solidity-agent-kit/solidity-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.

agentmods 80×15 button for solidity-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/0xlayerghost/solidity-agent-kit/solidity-testing"><img src="https://agentmods.dev/badge/skills/0xlayerghost/solidity-agent-kit/solidity-testing.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.1 $0.00057 $0.00745
Opus 5.5 $0.00023 $0.00298
Sonnet 5.5 $0.00011 $0.00149
Haiku 4.5 $0.00006 $0.00075

Measured 1mo ago against content hash a9371413712f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

Origin

This is a copy

100% identical to solidity-testing — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/solidity-testing/SKILL.md · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 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.sol → MyToken.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 · 83 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. 1mo ago First seen · 83 lines · 57 tokens per session scan A a9371413712f

Subscribe to this mod's changes

solidity-testing is a skill published in the GitHub repository 0xlayerghost/solidity-agent-kit (4 stars, last pushed 27d ago), licensed MIT. It adds 57 tokens to every session and 745 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to solidity-testing, differing in 1 line, and is treated as a copy.

Related

Other skills, from other repositories

foundry-testing

Write and debug Foundry tests and Solidity scripts. Use when writing unit, fuzz, fork, or invariant tests, writing bulloak BTT .tree specs (Branching Tree Technique), using cheatcodes, benchmarking gas, measuring coverage, writing deploy scripts, or working in tests/ or script/.

PaulRBerg/foundry-template · 64 tokens

fuzzer

This skill defines how to extract invariants from smart contracts and generate Foundry fuzz tests to verify them.

ZealynxSecurity/krait · 0 tokens

propfund

Trade on PropFund, the decentralized on-chain prop firm for AI agents. Two layers: PropFund SCREENS you (a free evaluation, then a virtual "funded" probation leg that builds an immutable on-chain record — pool-as-counterparty, no real firm capital), and AgentDesk PAYS you (once your record clears the bar you graduate…

NO7r34L/PropFund.eth · 0 tokens

playground

Interactively test any ChainGPT API endpoint. Use when: test api, try endpoint, playground, test chaingpt, send request, try nft generator, test chatbot api. Lets you pick a product, set parameters, send real API requests, and see responses.

ChainGPT-org/chaingpt-claude-skill · 57 tokens

programmable-v4-hook-builder

Build, repair, validate, submit, or track a complete Programmable Uniswap v4 Custom launch through the public V3 API. Use when the user names Programmable and wants implementation or launch work for a hook, token, multi-contract graph, app, game, service, or hybrid. Do not use for explanation-only questions, unrelated…

programmablehq/PROGRAMMABLE · 90 tokens

web3-bug-classes

Complete reference for all 10 DeFi smart contract bug classes. Use this when hunting for specific vulnerability types, need attack patterns for accounting desync, access control, incomplete path, off-by-one, oracle manipulation, ERC4626 vaults, reentrancy, flash loans, signature replay, or proxy/upgrade bugs.

Awarexone/web3-bug-bounty-hunting-ai-skills · 72 tokens