test-fixtures

test-fixtures is a skill for Claude Code, Codex from ccashwell/evm-cortex. It costs 37 tokens per session (1,926 once invoked), scanned A, original, MIT.

A collection of reusable test setup patterns for Solidity protocols, including mock contracts, blockchain forks, token deployments, and shared helpers.

In plain words
What is it for?
Use it to create test accounts, fund users with native tokens or ERC-20 tokens, deploy fixtures, configure fork-based tests, and share common setup.
Why use it?
It reduces repeated setup code and makes protocol tests easier to organize and reuse across test files.

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 {Vault} from "../../src/Vault.sol";.

Good fit Use it to create test accounts, fund users with native tokens or…

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/ccashwell/evm-cortex
agentmods
npx agentmods add skills/ccashwell/evm-cortex/test-fixtures

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 test-fixtures

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccashwell/evm-cortex/test-fixtures.svg)](https://agentmods.dev/skills/ccashwell/evm-cortex/test-fixtures)
Your own site
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/test-fixtures"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/test-fixtures.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,926 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 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.00037 $0.01926
Opus 5 $0.00018 $0.00963
Sonnet 5 $0.00007 $0.00385
Haiku 4.5 $0.00004 $0.00193

Measured 3d ago against content hash bf18bb9ff7c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

test-fixtures 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 3d 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/test-fixtures/SKILL.md · 285 lines

How it starts

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

Test Fixtures & Helpers

Base Test Contract

Shared setUp that all test files inherit:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {Test} from "forge-std/Test.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

abstract contract BaseTest is Test {
    address public alice;
    address public bob;
    address public carol;
    address public deployer;
    address public treasury;

    function setUp() public virtual {
        alice = makeAddr("alice");
        bob = makeAddr("bob");
        carol = makeAddr("carol");
        deployer = makeAddr("deployer");
        treasury = makeAddr("treasury");

        vm.deal(alice, 100 ether);
        vm.deal(bob, 100 ether);
        vm.deal(carol, 100 ether);
    }

    function _labelAll() internal {
        vm.label(alice, "Alice");
        vm.label(bob, "Bob");
        vm.label(carol, "Carol");
        vm.label(deployer, "Deployer");
        vm.label(treasury, "Treasury");
    }

    function _fundToken(address token, address to, uint256 amount) internal {
        deal(token, to, amount);
    }

    function _approveToken(address token, address owner, address spender, uint256 amount) internal {
        vm.prank(owner);
        IERC20(token).approve(spender, amount);
    }
}

Mock ERC20 Token

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MockERC20 is ERC20 {
    uint8 private _decimals;

    constructor(string memory name, string memory symbol, uint8 decimals_)
        ERC20(name, symbol)
    {
        _decimals = decimals_;
    }

    function decimals() public view override returns (uint8) {
        return _decimals;
    }

    function mint(address to, uint256 amount) external {
        _mint(to, amount);
    }

    function burn(address from, uint256 amount) external {
        _burn(from, amount);
    }
}

Token Fixture Library

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {MockERC20} from "./MockERC20.sol";

library TokenFixtures {
    function deployUSDC() internal returns (MockERC20) {
        return new MockERC20("USD Coin", "USDC", 6);
    }

    function deployWETH() internal returns (MockERC20) {
        return new MockERC20("Wrapped Ether", "WETH", 18);
    }

    function deployDAI() internal returns (MockERC20) {
        return new MockERC20("Dai Stablecoin", "DAI", 18);
    }

    function deployWithDecimals(uint8 decimals) internal returns (MockERC20) {
        return new MockERC20("Test Token", "TEST", decimals);
    }
}

Read the full file on GitHub · 285 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. 3d ago First seen · 285 lines · 37 tokens per session scan A bf18bb9ff7c7

Subscribe to this mod's changes

test-fixtures is a skill published in the GitHub repository ccashwell/evm-cortex (127 stars, last pushed today), licensed MIT. It adds 37 tokens to every session and 1,926 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

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.

wshobson/agents · 46 tokens

smart-contract-testing

Guide for testing smart contracts using Foundry and Hardhat, covering unit tests, fuzz testing, invariant testing, fork testing, and gas benchmarking.

nirholas/three.ws · 33 tokens

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.

keep-starknet-strange/starknet-agentic · 54 tokens

verification-protocol

How to prove a hypothesis is TRUE or FALSE using Move unit tests.

PlamenTSV/plamen · 18 tokens

foundry-solidity

Build and test Solidity smart contracts with Foundry toolkit. Use when developing Ethereum contracts, writing Forge tests, deploying with scripts, or debugging with Cast/Anvil. Triggers on Foundry commands (forge, cast, anvil), Solidity testing, smart contract development, or files like foundry.toml, .t.sol, .s.sol.

tenequm/skills · 75 tokens

blockchain-testing

Use this skill when asked about testing smart contracts, Foundry tests, Hardhat tests, fuzz testing, invariant testing, property-based testing, formal verification, audit preparation, integration testing for dApps, and blockchain testing patterns. Covers Foundry cheatcodes, Echidna fuzzing, Certora verification…

j4flmao/agent-skills · 117 tokens