Web3 Testing
wshobson/agents
Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking.
A skill your agent uses when testing against live protocol state on mainnet or L2 forks.
$ npx skills add ccashwell/evm-cortex --skill fork-testing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccashwell/evm-cortex fork-testing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/fork-testing .claude/skills/fork-testing && rm -rf skills-srcUse ~/.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/
Install the "fork-testing" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/fork-testing into .claude/skills/fork-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fork-testing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ccashwell/evm-cortex/tree/main/skills/fork-testingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ccashwell/evm-cortex --skill fork-testing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccashwell/evm-cortex fork-testing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/fork-testing .agents/skills/fork-testing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "fork-testing" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/fork-testing into .agents/skills/fork-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fork-testing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ccashwell/evm-cortex --skill fork-testing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccashwell/evm-cortex fork-testing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/fork-testing .cursor/skills/fork-testing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "fork-testing" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/fork-testing into .cursor/skills/fork-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fork-testing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ccashwell/evm-cortex.git --path skills/fork-testing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ccashwell/evm-cortex --skill fork-testing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccashwell/evm-cortex fork-testing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/fork-testing .gemini/skills/fork-testing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "fork-testing" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/fork-testing into .gemini/skills/fork-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fork-testing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ccashwell/evm-cortex fork-testingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ccashwell/evm-cortex --skill fork-testing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/fork-testing .github/skills/fork-testing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "fork-testing" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/fork-testing into .github/skills/fork-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fork-testing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ccashwell/evm-cortex --skill fork-testing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ccashwell/evm-cortex fork-testing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/fork-testing .opencode/skills/fork-testing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "fork-testing" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/fork-testing into .opencode/skills/fork-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fork-testing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
fork-testingA skill your agent uses when testing against live protocol state on mainnet or L2 forks.
Fork Testing is an agent skill from ccashwell/evm-cortex. Use when testing against live protocol state on mainnet or L2 forks. Covers vm.createFork, account impersonation, block pinning, token dealing, and patterns for DeFi integration testing.
Its SKILL.md is about 1.5k 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 Business, Finance & HR, covering Integration testing and Crypto and DeFi analysis. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.
Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are solidity, toml and bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Fork Testing loads about 1.5k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 136 words of instructions outside code blocks.
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.
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.
The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 136 words, ~1,545 tokens.
.claude/skills/fork-testing/SKILL.md (or your agent's skills folder).Fork testing runs your tests against a snapshot of a live blockchain. This lets you test interactions with real deployed contracts (Aave, Uniswap, Chainlink) without deploying mocks.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Test, console2} from "forge-std/Test.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract ForkTest is Test {
uint256 mainnetFork;
// Mainnet addresses
address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address constant AAVE_POOL = 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2;
function setUp() public {
// Pin to a specific block for reproducibility
mainnetFork = vm.createFork(vm.envString("ETH_RPC_URL"), 19_500_000);
vm.selectFork(mainnetFork);
}
function test_forkIsActive() public view {
assertEq(vm.activeFork(), mainnetFork);
assertEq(block.number, 19_500_000);
}
}In foundry.toml:
[rpc_endpoints]
mainnet = "${ETH_RPC_URL}"
arbitrum = "${ARBITRUM_RPC_URL}"
optimism = "${OPTIMISM_RPC_URL}"
base = "${BASE_RPC_URL}"Usage: vm.createFork("mainnet", blockNumber)
// Impersonate a whale to get tokens
address USDC_WHALE = 0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503; // Binance
function test_impersonateWhale() public {
vm.prank(USDC_WHALE);
IERC20(USDC).transfer(address(this), 1_000_000e6);
assertEq(IERC20(USDC).balanceOf(address(this)), 1_000_000e6);
}// deal() writes directly to storage — works for standard ERC20s
function test_dealTokens() public {
deal(USDC, address(this), 1_000_000e6);
assertEq(IERC20(USDC).balanceOf(address(this)), 1_000_000e6);
// For tokens with non-standard storage (e.g., USDT):
deal(USDC, address(this), 1_000_000e6, true); // true = adjust totalSupply
}
// For complex tokens where deal() fails, impersonate a holder:
function _getTokens(address token, uint256 amount, address to) internal {
address whale = _findWhale(token);
vm.prank(whale);
IERC20(token).transfer(to, amount);
}contract AaveForkedTest is Test {
IPool constant pool = IPool(0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2);
function setUp() public {
vm.createSelectFork("mainnet", 19_500_000);
}
function test_supplyAndBorrow() public {
address user = makeAddr("user");
// Give user WETH collateral
deal(WETH, user, 10 ether);
vm.startPrank(user);
// Supply WETH as collateral
IERC20(WETH).approve(address(pool), 10 ether);
pool.supply(WETH, 10 ether, user, 0);
// Borrow USDC against WETH
pool.borrow(USDC, 5_000e6, 2, 0, user);
assertEq(IERC20(USDC).balanceOf(user), 5_000e6);
// Check health factor
(,,,,,uint256 hf) = pool.getUserAccountData(user);
assertGt(hf, 1e18, "should be healthy");
vm.stopPrank();
}
function test_liquidation() public {
address borrower = makeAddr("borrower");
address liquidator = makeAddr("liquidator");
// Setup underwater position using price manipulation
_setupUnderwaterPosition(borrower);
// Liquidate
deal(USDC, liquidator, 10_000e6);
vm.startPrank(liquidator);
IERC20(USDC).approve(address(pool), 10_000e6);
pool.liquidationCall(WETH, USDC, borrower, 5_000e6, false);
vm.stopPrank();
// Verify liquidator received collateral
assertGt(IERC20(WETH).balanceOf(liquidator), 0);
}
}Test cross-chain interactions:
function test_crossChainState() public {
uint256 mainnetFork = vm.createFork("mainnet");
uint256 arbitrumFork = vm.createFork("arbitrum");
// Check mainnet state
vm.selectFork(mainnetFork);
uint256 mainnetBalance = IERC20(USDC).totalSupply();
// Check Arbitrum state
vm.selectFork(arbitrumFork);
address ARB_USDC = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831;
uint256 arbBalance = IERC20(ARB_USDC).totalSupply();
// Contracts deployed on a fork persist only on that fork
vm.selectFork(mainnetFork);
MyBridge bridge = new MyBridge();
// bridge only exists on mainnetFork
}// Mock Chainlink feed to simulate price crash
function _crashPrice(address feed, int256 newPrice) internal {
// Find the storage slot for the latest answer
// Or use vm.mockCall:
vm.mockCall(
feed,
abi.encodeWithSelector(AggregatorV3Interface.latestRoundData.selector),
abi.encode(uint80(1), newPrice, block.timestamp, block.timestamp, uint80(1))
);
}# Run all fork tests
forge test --fork-url $ETH_RPC_URL
# Run with specific block
forge test --fork-url $ETH_RPC_URL --fork-block-number 19500000
# Only fork tests (convention: separate test directory)
forge test --match-path "test/fork/*" --fork-url $ETH_RPC_URL
# Cache RPC calls for speed
forge test --fork-url $ETH_RPC_URL --fork-block-number 19500000
# Foundry auto-caches in ~/.foundry/cache/rpc/vm.envString() for RPC URLs (never hardcode)deal() over whale impersonation when possible© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/fork-testing of ccashwell/evm-cortex.
Open the folder on GitHubat commit f8f3301
Fork Testing 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Fork Testing this skillccashwell/evm-cortex | 131 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Web3 Testingwshobson/agents | 40k | 11 repos | ~2k | Automated safety check: Pass | MIT | |
| Technical Analysttradermonty/claude-trading-skills | 3k | 5 repos | ~4.6k | Automated safety check: Pass | MIT | |
| Polyclawchainstacklabs/polyclaw | 360 | 1 repos | ~2k | Automated safety check: Pass | Apache-2.0 | |
| Longbridge Researchhelsome/folio | 269 | 3 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Stock Analysis24mlight/StockClaw | 101 | 2 repos | ~2k | Automated safety check: Notes | MIT |
wshobson/agents
Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking.
tradermonty/claude-trading-skills
This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.
chainstacklabs/polyclaw
Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.
helsome/folio
Institution ratings, consensus price targets, EPS/revenue forecasts, finance calendar, shareholder data, fund holders, insider trades (SEC Form 4), short interest, industry rankings, peer group…
24mlight/StockClaw
Analyze stocks and cryptocurrencies using Yahoo Finance data.
swapperfinance/swapper-toolkit
Deposit and bridge funds into a wallet or protocol using Swapper Finance.
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.
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.
ccashwell/evm-cortex
Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.
ccashwell/evm-cortex
A skill your agent uses when running a local Ethereum node with Anvil.
ccashwell/evm-cortex
A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.
ccashwell/evm-cortex
A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.
Categories
A skill your agent uses when testing against live protocol state on mainnet or L2 forks. Fork Testing is an agent skill from ccashwell/evm-cortex. Use when testing against live protocol state on mainnet or L2 forks.
Fork Testing fits situations like: testing against live protocol state on mainnet; tasks that involve Integration testing; tasks that involve Crypto and DeFi analysis.
Run `npx skills add ccashwell/evm-cortex --skill fork-testing -a claude-code`. Or copy the skill folder (skills/fork-testing in ccashwell/evm-cortex) into .claude/skills/fork-testing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccashwell/evm-cortex --skill fork-testing -a codex`. Or copy the skill folder (skills/fork-testing in ccashwell/evm-cortex) into .agents/skills/fork-testing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill fork-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fork-testing, .gemini/skills/fork-testing, .github/skills/fork-testing and .opencode/skills/fork-testing in your project.
SKILL.md names no scripts, command-line tools or credentials: Fork Testing is instructions for the agent only.
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.
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.
Fork Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Fork Testing: Web3 Testing (wshobson/agents, 40k stars), Technical Analyst (tradermonty/claude-trading-skills, 3k stars), Polyclaw (chainstacklabs/polyclaw, 360 stars) and Longbridge Research (helsome/folio, 269 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.