Generate Foundry fork tests for contracts that need real on-chain integration coverage.

MITAuto-check passedTesting & QA

Install Fork Test

skills CLI
$ npx skills add OriginProtocol/origin-dollar --skill fork-test -a claude-code

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

GitHub CLI
$ gh skill install OriginProtocol/origin-dollar fork-test --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/OriginProtocol/origin-dollar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/fork-test .claude/skills/fork-test && 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
fork-test
GitHub stars
153
Token cost
~1.2k tokens
SKILL.md length
455 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Generate Foundry fork tests for contracts that need real on-chain integration coverage.

  • Works in 6 steps: Directory layout → Inheritance chain → Shared setup contract → …
  • The user asks for fork tests
  • SKILL.md covers 1. Directory layout, 2. Inheritance chain, 3. Shared setup contract and 4. Concrete test naming, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Fork Test is an agent skill from OriginProtocol/origin-dollar. Generate Foundry fork tests for contracts that need real on-chain integration coverage. Use when the user asks for fork tests, mainnet or chain fork coverage, or integration tests against live protocol state.

Its SKILL.md is about 1.2k 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 Testing & QA, covering Smart contracts and Integration testing. The repository describes itself as: OUSD and OETH are stablecoins that passively accrue yield while you are holding it. The licence is MIT.

When your agent uses it

  • The user asks for fork tests
  • Chain fork coverage
  • Integration tests against live protocol state

Example prompts

  • “/fork-test”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Directory layout
  2. Inheritance chain
  3. Shared setup contract
  4. Concrete test naming
  5. What belongs in fork tests
  6. Chain mapping

What it can do on your machine

Read from SKILL.md and the folder at commit ae82163. 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

Fork Test loads about 1.2k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 455 words of instructions outside code blocks.

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

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 OriginProtocol/origin-dollar at commit ae82163, republished under its MIT licence (© OriginProtocol). 455 words, ~1,192 tokens.

Download SKILL.mdSave it as .claude/skills/fork-test/SKILL.md (or your agent's skills folder).
name
fork-test
description
Generate Foundry fork tests for contracts that need real on-chain integration coverage. Use when the user asks for fork tests, mainnet or chain fork coverage, or integration tests against live protocol state.

Fork Test

Generate Foundry fork tests for contracts whose behavior depends on real on-chain state, live liquidity, routers, gauges, or oracle reads.

1. Directory layout

text
contracts/tests/fork/<category>/<ContractName>/
├── shared/
│   └── Shared.t.sol
└── concrete/
    ├── Deposit.t.sol
    ├── Withdraw.t.sol
    └── Rebalance.t.sol

Rules:

  • fork tests are concrete only; do not add a fuzz/ directory
  • create files only for functions with meaningful on-chain integration behavior
  • keep simple setters, access control checks, and pure validation in unit tests

2. Inheritance chain

text
forge-std/Test
  └─ Base
       └─ BaseFork
            └─ Fork_<Contract>_Shared_Test
                 └─ Fork_Concrete_<Contract>_<Feature>_Test

Base owns shared actors, constants, IERC20 external token refs, and fork IDs. All typed contract/proxy/mock state variables are declared in each Shared.t.sol using interface types. BaseFork owns chain fork helpers.

Interface-only testing

Same rules as unit tests — use interfaces, not concrete contracts:

  • Import interfaces: IVault, IOToken, IProxy, strategy interfaces from contracts/interfaces/strategies/
  • Deploy fresh contracts with vm.deployCode instead of new (except mocks), and always reference artifact paths through tests/utils/Artifacts.sol (e.g. vm.deployCode(Vaults.OETH, abi.encode(address(weth)))); add the entry to the relevant sub-library if it does not exist yet
  • Cast forked addresses to interfaces: oethVault = IVault(Mainnet.OETH_VAULT)
  • Reference events from interfaces: emit IVault.EventName(...)
Product-specific vault types
ProductTokenVaultChainArtifacts reference
OUSDOUSDOUSDVaultMainnetVaults.OUSD
OETHOETHOETHVaultMainnetVaults.OETH
OSonicOSonicOSVaultSonicVaults.OS
OETHBaseOETHBaseOETHBaseVaultBaseVaults.OETH_BASE

Add the entry to tests/utils/Artifacts.sol if it does not exist yet.

Never use OETHVault for Sonic tests.

3. Shared setup contract

shared/Shared.t.sol should keep setup in this order:

solidity
function setUp() public virtual override {
    super.setUp();
    _createAndSelectFork<Chain>();
    _deployFreshContracts();
    _configureContracts();
    label();
}

Decision rule:

  • deploy fresh contracts that the strategy or vault under test owns or manages
  • use forked addresses for external infrastructure such as routers, tokens, factories, and oracles

Pull canonical addresses from tests/utils/Addresses.sol.

4. Concrete test naming

File and contract naming:

text
concrete/Deposit.t.sol
Fork_Concrete_<ContractName>_Deposit_Test

Function naming patterns:

  • test_<function>()
  • test_<function>_<behavior>()
  • test_<function>_RevertWhen_<condition>()
  • test_<function>_emits<EventName>()

Casing rules:

  • function, behavior, and condition stay camelCase
  • RevertWhen is the only PascalCase token in the test name
Show full SKILL.md (173 more words)Show less

5. What belongs in fork tests

Fork-test these categories:

  • AMO pool interactions
  • real router swaps
  • oracle reads
  • gauge reward flows
  • cross-chain and bridge flows
  • vault rebases with real balances
  • zapper flows
  • multi-step end-to-end operations

Do not fork-test:

  • simple setters
  • straightforward view functions
  • access control checks
  • constructor validation
  • pure math and helper logic
  • input-validation-only reverts

Litmus test:

If a mock can faithfully reproduce the behavior, keep it in unit tests.

6. Chain mapping

Use the repository's fork helpers and address libraries consistently:

  • Mainnet -> _createAndSelectForkMainnet()
  • Base -> _createAndSelectForkBase()
  • Sonic -> _createAndSelectForkSonic()
  • Arbitrum if relevant -> _createAndSelectForkArbitrum()

Output expectations

When implementing fork tests:

  • keep them narrowly focused on real integration value
  • prefer a few strong end-to-end tests over broad but redundant coverage
  • label both fresh and forked contracts for readable traces
  • use interface-only imports; no concrete contract imports except mocks
  • deploy fresh contracts with vm.deployCode, not new (mocks are fine with new), and reference all artifact paths through tests/utils/Artifacts.sol — no inline "contracts/...sol:Name" strings
  • mirror existing fork test structure in the nearest comparable test suite before introducing a new pattern

© OriginProtocol, 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 .codex/skills/fork-test of OriginProtocol/origin-dollar.

Open the folder on GitHubat commit ae82163

Compare with similar skills

Fork Test 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.

Fork Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fork Test this skillOriginProtocol/origin-dollar153—~1.2kAutomated safety check: PassMIT
Web3 Testingwshobson/agents40k11 repos~2kAutomated safety check: PassMIT
DevchainNethereum/Nethereum2.3k—~1.7kAutomated safety check: PassMIT
Contract Testscalus3/scalus105—~1.6kAutomated safety check: PassApache-2.0
Plugin Testingpolyipseity/obsidian-terminal948—~828Automated safety check: PassAGPL-3.0
Create Modulecartography-cncf/cartography4.1k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Web3 Testing

    wshobson/agents

    Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking.

    40k GitHub starsUsed in 11 repos~2k tokens
    Testing & QAAuto-check passed
  • Devchain

    Nethereum/Nethereum

    Help users run a local Ethereum dev chain, write integration tests, fork networks, debug transactions, or replace Hardhat/Anvil with Nethereum DevChain (.NET).

    2.3k GitHub stars~1.7k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Contract Test

    scalus3/scalus

    Guide for testing Scalus smart contracts. An agent skill from scalus3/scalus.

    105 GitHub stars~1.6k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Plugin Testing

    polyipseity/obsidian-terminal

    Skill for testing Obsidian plugin features in this repository.

    948 GitHub stars~828 tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Create Module

    cartography-cncf/cartography

    Author a new Cartography intel module end-to-end (entry point, sync GET/TRANSFORM/LOAD/CLEANUP, declarative data model, integration test, schema docs).

    4.1k GitHub stars~2.5k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharnesstest.go.

    250 GitHub stars~1.2k tokensUpdated 7 days ago
    Testing & QAAuto-check passed

More from OriginProtocol/origin-dollar

  • Organize Test

    OriginProtocol/origin-dollar

    Reorganize Foundry test files (.t.sol) for readability and consistency without changing semantics.

    153 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Smoke Test

    OriginProtocol/origin-dollar

    Generate Foundry smoke tests that validate deployment health using DeployManager/Resolver against real on-chain state with pending governance applied.

    153 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Commit

    OriginProtocol/origin-dollar

    Handle git commits with auto-staging, targeted pre-commit formatting, and Conventional Commit messages.

    153 GitHub stars~850 tokensUpdated yesterday
    Auto-check: warnings
  • Talos Action Development

    OriginProtocol/origin-dollar

    Develop, modify, review, and maintain standalone Talos actions in contracts/tasks/actions, including chain guardrails, contract bindings, transaction safety, schedules, action catalogues, and Talos…

    153 GitHub stars~896 tokensUpdated yesterday
    Auto-check passed
  • Unit Test

    OriginProtocol/origin-dollar

    Generate Foundry unit tests for a contract using this repository's conventions, structure, and naming.

    153 GitHub stars~1.6k tokensUpdated yesterday
    Auto-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
    Auto-check: notes

Categories

Questions about Fork Test

What does Fork Test do?

Generate Foundry fork tests for contracts that need real on-chain integration coverage. Fork Test is an agent skill from OriginProtocol/origin-dollar. Generate Foundry fork tests for contracts that need real on-chain integration coverage.

When should I use Fork Test?

Fork Test fits situations like: the user asks for fork tests; chain fork coverage; integration tests against live protocol state.

How do I install Fork Test in Claude Code?

Run `npx skills add OriginProtocol/origin-dollar --skill fork-test -a claude-code`. Or copy the skill folder (.codex/skills/fork-test in OriginProtocol/origin-dollar) into .claude/skills/fork-test in your project. Claude Code loads it when a task matches its description.

How do I install Fork Test in Codex?

Run `npx skills add OriginProtocol/origin-dollar --skill fork-test -a codex`. Or copy the skill folder (.codex/skills/fork-test in OriginProtocol/origin-dollar) into .agents/skills/fork-test in your project. Codex loads it when a task matches its description.

Can I use Fork Test 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 OriginProtocol/origin-dollar --skill fork-test -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-test, .gemini/skills/fork-test, .github/skills/fork-test and .opencode/skills/fork-test in your project.

What does Fork Test need to run?

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

Does Fork Test 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 Fork Test 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 Fork Test use?

Fork Test 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 Fork Test use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 Fork Test?

Skills that share tags, products or a category with Fork Test: Web3 Testing (wshobson/agents, 40k stars), Devchain (Nethereum/Nethereum, 2.3k stars), Contract Test (scalus3/scalus, 105 stars) and Plugin Testing (polyipseity/obsidian-terminal, 948 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fork Test?

OriginProtocol (a GitHub organization) maintains it in OriginProtocol/origin-dollar, which has 153 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.

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