Agent skill

Test Fixtures

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when setting up test environments for Solidity protocols.

MITAuto-check passedBackend & APIs

Install Test Fixtures

skills CLI
$ npx skills add ccashwell/evm-cortex --skill test-fixtures -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex test-fixtures --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/test-fixtures .claude/skills/test-fixtures && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
test-fixtures
GitHub stars
131
Token cost
~1.9k tokens
SKILL.md length
95 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when setting up test environments for Solidity protocols.

  • Setting up test environments for Solidity protocols
  • SKILL.md covers Base Test Contract, Mock ERC20 Token, Token Fixture Library and Mock Oracle, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Test data and fixtures

What it does

Test Fixtures is an agent skill from ccashwell/evm-cortex. 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.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Test data and fixtures, Deployment and Smart contracts. It works with Solidity. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Setting up test environments for Solidity protocols
  • Tasks that involve Test data and fixtures
  • Tasks that involve Deployment

Example prompts

  • “/test-fixtures”

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are solidity).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Test Fixtures loads about 1.9k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 95 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 95 words, ~1,886 tokens.

Download SKILL.mdSave it as .claude/skills/test-fixtures/SKILL.md (or your agent's skills folder).
name
test-fixtures
description
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.

Test Fixtures & Helpers

Base Test Contract

Shared setUp that all test files inherit:

solidity
// 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

solidity
// 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

solidity
// 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);
    }
}

Mock Oracle

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

contract MockChainlinkFeed {
    int256 private _price;
    uint8 private _decimals;
    uint256 private _updatedAt;
    uint80 private _roundId;

    constructor(int256 price, uint8 decimals_) {
        _price = price;
        _decimals = decimals_;
        _updatedAt = block.timestamp;
        _roundId = 1;
    }

    function latestRoundData() external view returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    ) {
        return (_roundId, _price, _updatedAt, _updatedAt, _roundId);
    }

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

    function setPrice(int256 newPrice) external {
        _price = newPrice;
        _updatedAt = block.timestamp;
        _roundId++;
    }

    function setStale() external {
        _updatedAt = block.timestamp - 2 days;
    }
}

Protocol Deployment Fixture

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

import {BaseTest} from "./BaseTest.sol";
import {Vault} from "../../src/Vault.sol";
import {StakingRewards} from "../../src/StakingRewards.sol";
import {MockERC20} from "./MockERC20.sol";
import {MockChainlinkFeed} from "./MockChainlinkFeed.sol";

abstract contract ProtocolFixture is BaseTest {
    MockERC20 public usdc;
    MockERC20 public weth;
    MockChainlinkFeed public ethUsdFeed;
    Vault public vault;
    StakingRewards public staking;

    function setUp() public virtual override {
        super.setUp();

        vm.startPrank(deployer);

        usdc = new MockERC20("USDC", "USDC", 6);
        weth = new MockERC20("WETH", "WETH", 18);
        ethUsdFeed = new MockChainlinkFeed(3500e8, 8);

        vault = new Vault(address(usdc));
        staking = new StakingRewards(
            address(vault),
            address(usdc),
            deployer
        );

        vm.stopPrank();

        _fundUsers();
        _labelAll();
        vm.label(address(usdc), "USDC");
        vm.label(address(weth), "WETH");
        vm.label(address(vault), "Vault");
        vm.label(address(staking), "Staking");
    }

    function _fundUsers() internal {
        for (uint256 i = 0; i < _users().length; i++) {
            address user = _users()[i];
            usdc.mint(user, 1_000_000e6);
            weth.mint(user, 1_000e18);

            vm.startPrank(user);
            usdc.approve(address(vault), type(uint256).max);
            usdc.approve(address(staking), type(uint256).max);
            weth.approve(address(vault), type(uint256).max);
            vm.stopPrank();
        }
    }

    function _users() internal view returns (address[] memory) {
        address[] memory users = new address[](3);
        users[0] = alice;
        users[1] = bob;
        users[2] = carol;
        return users;
    }
}

Usage in Tests

solidity
import {ProtocolFixture} from "./helpers/ProtocolFixture.sol";

contract VaultTest is ProtocolFixture {
    function test_deposit() public {
        vm.prank(alice);
        vault.deposit(1000e6, alice);
        assertEq(vault.balanceOf(alice), 1000e6);
    }

    function test_priceDropLiquidation() public {
        vm.prank(alice);
        vault.deposit(1000e6, alice);

        ethUsdFeed.setPrice(1000e8); // crash ETH price
        assertTrue(vault.isLiquidatable(alice));
    }
}

Fork-Based Fixtures

solidity
abstract contract MainnetFixture is BaseTest {
    IERC20 constant USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
    IERC20 constant WETH = IERC20(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
    IPool constant AAVE = IPool(0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2);

    function setUp() public virtual override {
        super.setUp();
        vm.createSelectFork("mainnet", 19_500_000);
        _labelMainnet();
    }

    function _labelMainnet() internal {
        vm.label(address(USDC), "USDC");
        vm.label(address(WETH), "WETH");
        vm.label(address(AAVE), "Aave Pool");
    }
}

Checklist

  • Base test contract provides common users, funding, and labels
  • Mock tokens support configurable decimals
  • Mock oracles support price manipulation and staleness simulation
  • Protocol fixture deploys complete system in correct order
  • All users pre-funded and pre-approved in setUp
  • All contract addresses labeled for readable traces
  • Fork fixtures pinned to specific blocks
  • Fixtures are abstract — tests inherit and extend
  • Separate mock directory: test/mocks/
  • Shared helpers in test/helpers/

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/test-fixtures of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Test Fixtures next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Test Fixtures compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Fixtures this skillccashwell/evm-cortex131—~1.9kAutomated safety check: PassMIT
Foundry Deploy Fixturesaviggiano/security144—~634Automated safety check: PassMIT
New Configlidofinance/diffyscan142—~1kAutomated safety check: PassMIT
Validate Configlidofinance/diffyscan142—~1.1kAutomated safety check: PassMIT
Foundry Differential Testsaviggiano/security144—~613Automated safety check: PassMIT
Add Explorerlidofinance/diffyscan142—~1kAutomated safety check: PassMIT

Similar skills

  • Foundry Deploy Fixtures

    aviggiano/security

    Create or refactor Foundry deployment fixtures for Solidity tests.

    144 GitHub stars~634 tokensUpdated 24 days ago
    Backend & APIsAuto-check passed
  • New Config

    lidofinance/diffyscan

    Creates or extends a Diffyscan verification config for a deployed contract or deployment.

    142 GitHub stars~1k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Validate Config

    lidofinance/diffyscan

    Reviews an existing Diffyscan YAML or JSON config for load errors, runtime prerequisites, pinned sources, address mappings and broad exceptions.

    142 GitHub stars~1.1k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Foundry Differential Tests

    aviggiano/security

    Create Foundry differential tests comparing production Solidity contracts against an independent reference model.

    144 GitHub stars~613 tokensUpdated 24 days ago
    Backend & APIsAuto-check passed
  • Add Explorer

    lidofinance/diffyscan

    Adds or repairs Diffyscan explorer API routing and response adapters for a new host, chain or payload format.

    142 GitHub stars~1k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Verify Deployment PR

    OriginProtocol/origin-dollar

    Verifies a POST-EXECUTION mainnet (or other network) smart-contract deployment PR for this repo: confirms every deployed contract is listed in the PR description, that the on-chain verified source…

    153 GitHub stars~2.6k tokensUpdated yesterday
    Backend & APIsAuto-check: notes

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    ccashwell/evm-cortex

    A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.

    131 GitHub stars~25k tokensUpdated 10 days ago
    Auto-check passed
  • Aave Integration

    ccashwell/evm-cortex

    A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.

    131 GitHub stars~1.3k tokensUpdated 10 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 10 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 10 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 10 days ago
    Auto-check passed
  • Audit Depth Analysis

    ccashwell/evm-cortex

    A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

    131 GitHub stars~1.6k tokensUpdated 10 days ago
    Auto-check passed

Works with

Questions about Test Fixtures

What does Test Fixtures do?

A skill your agent uses when setting up test environments for Solidity protocols. Test Fixtures is an agent skill from ccashwell/evm-cortex. Use when setting up test environments for Solidity protocols.

When should I use Test Fixtures?

Test Fixtures fits situations like: setting up test environments for Solidity protocols; tasks that involve Test data and fixtures; tasks that involve Deployment.

How do I install Test Fixtures in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill test-fixtures -a claude-code`. Or copy the skill folder (skills/test-fixtures in ccashwell/evm-cortex) into .claude/skills/test-fixtures in your project. Claude Code loads it when a task matches its description.

How do I install Test Fixtures in Codex?

Run `npx skills add ccashwell/evm-cortex --skill test-fixtures -a codex`. Or copy the skill folder (skills/test-fixtures in ccashwell/evm-cortex) into .agents/skills/test-fixtures in your project. Codex loads it when a task matches its description.

Can I use Test Fixtures in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill test-fixtures -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-fixtures, .gemini/skills/test-fixtures, .github/skills/test-fixtures and .opencode/skills/test-fixtures in your project.

What does Test Fixtures need to run?

SKILL.md names no scripts, command-line tools or credentials: Test Fixtures is instructions for the agent only.

Does Test Fixtures access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Test Fixtures safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Test Fixtures use?

Test Fixtures is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Fixtures use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Test Fixtures?

Skills that share tags, products or a category with Test Fixtures: Foundry Deploy Fixtures (aviggiano/security, 144 stars), New Config (lidofinance/diffyscan, 142 stars), Validate Config (lidofinance/diffyscan, 142 stars) and Foundry Differential Tests (aviggiano/security, 144 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Fixtures?

ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.

Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.