blockchain-testing

blockchain-testing is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 117 tokens per session (5,056 once invoked), scanned A, original, MIT.

A guide to testing blockchain programs and smart contracts before they are deployed, from small checks to fuzzing, invariant tests, and formal verification.

In plain words
What is it for?
Use it to plan Foundry, Hardhat, or Truffle tests, integration and end-to-end checks, fuzz and invariant tests, gas benchmarks, and audit preparation.
Why use it?
Blockchain mistakes can be difficult or impossible to undo after deployment, so tests need to cover both expected behavior and unusual inputs.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import "../src/Token.sol";.

Good fit Use it to plan Foundry, Hardhat, or Truffle tests, integration and end-to-end checks, fuzz and invariant tests, gas benchmarks, and audit preparation.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills
agentmods
npx agentmods add skills/j4flmao/agent-skills/blockchain-testing

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 blockchain-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/blockchain-testing/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/blockchain-testing)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/blockchain-testing"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/blockchain-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 blockchain-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/blockchain-testing"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/blockchain-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,056 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 538
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
How audits are shown
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.1 $0.00117 $0.05056
Opus 5.5 $0.00047 $0.02022
Sonnet 5.5 $0.00023 $0.01011
Haiku 4.5 $0.00012 $0.00506

Measured 1mo ago against content hash bca16bb9a129, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

skills/blockchain/blockchain-testing/SKILL.md · 546 lines

How it starts

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

Blockchain Testing

Purpose

Guide blockchain smart contract testing covering the full testing pyramid: unit tests, integration tests, fuzz tests, invariant tests, formal verification, and audit preparation. Ensures contract correctness before deployment.

Agent Protocol

Trigger

"smart contract test", "foundry test", "forge test", "hardhat test", "truffle test", "fuzz testing", "invariant testing", "property-based testing", "echidna", "certora", "formal verification", "audit preparation", "blockchain testing", "web3 testing", "dapp testing", "contract audit", "gas benchmark", "mainnet fork test", "integration test blockchain", "e2e blockchain test", "foundry cheatcode", "forge snapshot"

Input Context

  • Smart contracts to test (with source files)
  • Framework preference (Foundry/Hardhat/Truffle)
  • Testing phase (unit/fuzz/invariant/formal/audit)
  • Existing test suite and coverage
  • Target chains (EVM/Solana/Cosmos)
  • Security requirements (audit timeline, TVL at risk)

Output Artifact

Testing strategy specification: framework setup, test organization, fuzz/invariant properties, gas benchmarking, and audit preparation checklist.

Response Format

  1. Test strategy: unit vs integration vs fuzz vs invariant vs formal (testing pyramid)
  2. Framework setup: Foundry/Hardhat configuration, fork URLs, test accounts
  3. Unit tests: function-by-function coverage with boundary conditions
  4. Fuzz tests: input ranges, invariant properties, assertion types
  5. Integration tests: mainnet fork, multi-contract flows, protocol composition
  6. Gas & performance: benchmark snapshot, optimization targets
  7. Security audit: tooling (Slither, Mythril, Halmos), manual review checklist

Completion Criteria

  • Unit tests cover all functions with boundary values and error cases
  • Fuzz tests defined for all numeric inputs with reasonable ranges
  • Invariant tests capture protocol-level properties (solvency, access control, correctness)
  • Integration tests validate against mainnet fork with real protocol interactions
  • Gas benchmarks established and tracked in CI
  • Audit prep checklist completed (static analysis, fuzz, invariant, manual review)

Read the full file on GitHub · 546 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 Changed bca16bb9a129
  2. 1mo ago First seen · 546 lines · 117 tokens per session scan A 86d7bfadb0ae

Subscribe to this mod's changes

blockchain-testing is a skill published in the GitHub repository j4flmao/agent-skills (34 stars, last pushed 15d ago), licensed MIT. It adds 117 tokens to every session and 5,056 once invoked, about $0.0005 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.

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

generate-tests

Creates comprehensive test suites for Move contracts with 100% coverage requirement. Triggers on: 'generate tests', 'create tests', 'write test suite', 'test this contract', 'how to test', 'add test coverage', 'write unit tests'.

aptos-labs/aptos-agent-skills · 54 tokens

Smart Contract Testing

Smart contract testing with Hardhat, Foundry, and Brownie including unit tests, gas optimization, reentrancy checks, and fork testing.

PramodDutta/qaskills · 33 tokens

cadence-testing

Guide for writing, running, and debugging unit tests for Cadence smart contracts using the built-in Cadence Testing Framework and flow test. Covers test file structure (test.cdc, setup/beforeEach/tearDown), assertions and matchers, blockchain emulation (accounts, deployments, events, time manipulation), coverage…

onflow/flow-ai-tools · 264 tokens

test-master

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation…

Jeffallan/claude-skills · 104 tokens

axiom-testing

Use when writing ANY test, debugging flaky tests, making tests faster, or choosing Swift Testing vs XCTest. Covers unit tests, UI tests, async testing, test architecture.

CharlesWiltgen/Axiom · 38 tokens