Agent skill

Add Network

by OriginProtocol in OriginProtocol/origin-dollar

Checklist for adding a new EVM network (mainnet or testnet) to the origin-dollar repo.

MITAuto-check: notesBackend & APIs

Install Add Network

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

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

GitHub CLI
$ gh skill install OriginProtocol/origin-dollar add-network --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/.claude/skills/add-network .claude/skills/add-network && 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
add-network
GitHub stars
153
Token cost
~2.8k tokens
SKILL.md length
914 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Checklist for adding a new EVM network (mainnet or testnet) to the origin-dollar repo.

  • Works in 12 steps: Decide network classification → Gather constants → contracts/utils/hardhat-helpers.js → …
  • The user wants to add support for a new chain — e.g
  • SKILL.md covers 0. Decide network classification, 1. Gather constants, 2.… and 3. contracts/hardhat.config.js, plus 16 more sections
  • Calls pnpm; reaches api-sepolia.basescan.org and sepolia.basescan.org; needs ETHERSCAN_API_KEY

What it does

Add Network is an agent skill from OriginProtocol/origin-dollar. Checklist for adding a new EVM network (mainnet or testnet) to the origin-dollar repo. Walks through every file that needs touching: hardhat config, package.json scripts, utils/{addresses,hardhat-helpers}.js, fork-test.sh, deploy/{network}/ directory, and (optionally) CI lanes. Use when the user wants to add support for a new chain — e.g. "register Sepolia", "add Hyperliquid", "wire up Mantle." References PR 2485 (Plume) and PR 2839 (HyperEVM) as worked examples.

Its SKILL.md is about 2.8k 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 Smart contracts. It works with npm and Hyperliquid. 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 wants to add support for a new chain — e.g
  • Tasks that involve Smart contracts

Example prompts

  • “register Sepolia”
  • “add Hyperliquid”
  • “wire up Mantle.”
  • “/add-network”

Requirements

  • A credential in ETHERSCAN_API_KEY

Workflow steps

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

  1. Decide network classification
  2. Gather constants
  3. contracts/utils/hardhat-helpers.js
  4. contracts/hardhat.config.js
  5. contracts/package.json
  6. contracts/utils/addresses.js
  7. contracts/utils/deploy.js
  8. contracts/fork-test.sh
  9. contracts/dev.env
  10. contracts/deploy/{network}/
  11. contracts/deployments/{network}/
  12. contracts/test/helpers.js (only if fork/unit tests follow)

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • pnpm

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api-sepolia.basescan.org
    • sepolia.basescan.org

    Also links to:

    • docs.chain.link

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ETHERSCAN_API_KEY

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

Context cost

Add Network loads about 2.8k tokens when it runs. Until then it costs about 120 tokens; SKILL.md has 914 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:200
    he new env vars (this file is copied to `.env` for local dev):

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 5b2c5d6, republished under its MIT licence (© OriginProtocol). 914 words, ~2,831 tokens.

Download SKILL.mdSave it as .claude/skills/add-network/SKILL.md (or your agent's skills folder).
name
add-network
description
Checklist for adding a new EVM network (mainnet or testnet) to the origin-dollar repo. Walks through every file that needs touching: hardhat config, package.json scripts, utils/{addresses,hardhat-helpers}.js, fork-test.sh, deploy/{network}/ directory, and (optionally) CI lanes. Use when the user wants to add support for a new chain — e.g. "register Sepolia", "add Hyperliquid", "wire up Mantle." References PR #2485 (Plume) and PR #2839 (HyperEVM) as worked examples.
when-to-use
- User asks to add support for a new chain in this repo. - User wants to register a testnet for staging contracts before mainnet. - User asks "what files do I…

Add a network to origin-dollar

Adding a network in this codebase is mechanical but spread across ~12–15 files. Follow this checklist top to bottom. Skip the (optional) items if you don't need fork tests / CI / Defender automation for the new network.

Working dir convention. All file paths below are relative to the repo root /Volumes/origin/origin-dollar/. Run all commands from contracts/.

0. Decide network classification

Up front, classify the network. This drives which files actually need touching:

DimensionOptionsAffects
Mainnet or testnetmainnet, testnetWhether you bother with CI lanes; whether the network appears in top-level README's "Deployed on …" list.
L1 / L2 / sidechainL1, OP Stack rollup, ZK rollup, sidechainWhether you need L1StandardBridge addresses, finality assumptions, canonical-bridge support.
Native assetETH, custom tokenAffects gas / fee plumbing in adapters and strategies.
Primary bridge protocolsCCIP, CCTP, LayerZero, OP canonical, customDrives which adapters get deployed + what address constants you'll need.
EVM-compatible explorerEtherscan family, Blockscout, customDrives etherscan.customChains config.

Pick the answers before editing any files — they affect which sections below apply.

1. Gather constants

You'll need these before touching any file. Keep them in a scratch note:

  • chainId (e.g., Sepolia = 11155111)
  • providerURL env var name (e.g., SEPOLIA_PROVIDER_URL)
  • CCIP chain selector (if using CCIP — look up at https://docs.chain.link/ccip/directory)
  • Canonical bridge addresses (if L2 — L1StandardBridge, L2StandardBridge)
  • Explorer URL + API key (or Blockscout-style endpoint)
  • Deployer / governor / strategist EOAs or multisigs
  • WETH / USDC / etc. token addresses (mainnet equivalents on the new chain)
  • Per-network address registry contents the strategies will need

2. contracts/utils/hardhat-helpers.js

Add the network-detection flags and provider URL. Mirror the existing pattern for similar networks (e.g., if adding an L2 testnet, copy how holesky / hoodi look).

js
const isSepolia = process.env.NETWORK === "sepolia";
const isSepoliaFork = process.env.FORK_NETWORK_NAME === "sepolia";
const isSepoliaForkTest = isSepoliaFork && isForkTest;
const isSepoliaUnitTest = isSepolia && process.env.IS_TEST === "true";
// ...

const sepoliaProviderUrl = process.env.SEPOLIA_PROVIDER_URL || "";

Also branch in adjustTheForkBlockNumber() for the new network if you use BLOCK_NUMBER fork pinning.

Export everything at the bottom of the file so hardhat.config.js can import.

3. contracts/hardhat.config.js

Three sections to update:

(a) Imports — add the new flags + providerUrl to the destructure at the top:

js
const {
  // ... existing imports
  isSepolia,
  isSepoliaFork,
  isSepoliaForkTest,
  sepoliaProviderUrl,
} = require("./utils/hardhat-helpers.js");

(b) networks.<name> entry — within the networks config:

js
sepolia: {
  url: sepoliaProviderUrl,
  accounts: [
    process.env.DEPLOYER_PK || privateKeyPlaceholder,
    process.env.GOVERNOR_PK || privateKeyPlaceholder,
  ],
  chainId: 11155111,
  tags: ["sepolia"],
  live: true,
  saveDeployments: true,
},

(c) namedAccounts — add per-network deployer/governor/strategist indexes:

js
namedAccounts: {
  deployer: { default: 0, sepolia: 0, baseSepolia: 0, ... },
  governorAddr: { default: 1, sepolia: 1, baseSepolia: 1, ... },
  strategistAddr: { default: 2, sepolia: 2, baseSepolia: 2, ... },
},

(d) Etherscan verification — within etherscan config:

js
etherscan: {
  apiKey: {
    sepolia: process.env.ETHERSCAN_API_KEY,
    baseSepolia: process.env.ETHERSCAN_API_KEY,  // Etherscan V2 multichain key
    // ...
  },
  customChains: [
    // Add an entry if the network isn't built into hardhat-verify.
    {
      network: "baseSepolia",
      chainId: 84532,
      urls: {
        apiURL: "https://api-sepolia.basescan.org/api",
        browserURL: "https://sepolia.basescan.org",
      },
    },
  ],
},

4. contracts/package.json

Add per-network scripts. Minimum set:

json
{
  "scripts": {
    "deploy:sepolia": "hardhat deploy --network sepolia",
    "node:sepolia": "FORK=true FORK_NETWORK_NAME=sepolia hardhat node",
    "test:sepolia-fork": "FORK_NETWORK_NAME=sepolia bash fork-test.sh"
  }
}

If you'll have coverage runs or Anvil-based local nodes:

json
{
  "test:coverage:sepolia-fork": "REPORT_COVERAGE=true FORK_NETWORK_NAME=sepolia bash fork-test.sh",
  "node:anvil:sepolia": "anvil --fork-url $SEPOLIA_PROVIDER_URL"
}

5. contracts/utils/addresses.js

Add the new network and populate it with what the strategies need:

js
addresses.sepolia = {};
addresses.sepolia.WETH = "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9";
addresses.sepolia.CCIPRouter = "0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59";
// ...

For L2s, document both sides of the lane in the L1's entry (e.g., the L1 side stores both Sepolia-side endpoints AND L1StandardBridge for the L2's rollup). Otherwise deploy scripts have to cross-reference and that gets brittle.

6. contracts/utils/deploy.js

Usually no changes. Check for any isMainnet* / isBase* style helper predicates inside withConfirmation or deployWithConfirmation that gate on network — mirror them if your new network needs the same behaviour.

7. contracts/fork-test.sh

Add an elif branch in the network-mapping switch (~line 30–60):

bash
elif [[ $FORK_NETWORK_NAME == "sepolia" ]]; then
  PROVIDER_URL=$SEPOLIA_PROVIDER_URL;
  BLOCK_NUMBER=$SEPOLIA_BLOCK_NUMBER;
elif [[ $FORK_NETWORK_NAME == "baseSepolia" ]]; then
  PROVIDER_URL=$BASE_SEPOLIA_PROVIDER_URL;
  BLOCK_NUMBER=$BASE_SEPOLIA_BLOCK_NUMBER;

8. contracts/dev.env

Document the new env vars (this file is copied to .env for local dev):

SEPOLIA_PROVIDER_URL=
SEPOLIA_BLOCK_NUMBER=
BASE_SEPOLIA_PROVIDER_URL=
BASE_SEPOLIA_BLOCK_NUMBER=

9. contracts/deploy/{network}/

Create the directory and add numbered deploy scripts. Pattern from PR #2485 (Plume) and PR #2839 (HyperEVM):

  • 001_mock_*.js — mocks if testnet (Mock vault, Mock OToken, etc.)
  • 002_*.js … 00N_*.js — actual strategy / contract deploys
  • Final script — wiring (authorise adapters, set caps, whitelist on vault)

Each script:

  1. Exports a deployFunction async with (hre) signature.
  2. Tags: {module.exports.tags = ["network-name", "specific-tag"]}.
  3. Uses helpers from utils/deploy.js:
    • withConfirmation(promise) — awaits and logs.
    • deployWithConfirmation(name, args, contractName) — deploys with verify support.
    • deployProxyWithCreateX(name, args, salt, contractName) — CREATE3 for peer-parity addresses.
Show full SKILL.md (367 more words)Show less

10. contracts/deployments/{network}/

This directory is auto-created by hardhat-deploy on first run. To make it explicit and discoverable, commit a stub .chainId file with the chain ID:

$ echo "11155111" > contracts/deployments/sepolia/.chainId

11. contracts/test/helpers.js (only if fork/unit tests follow)

Add to the network detection flags block (~line 314–328):

js
const isSepolia = hre.network.name === "sepolia";
const isSepoliaFork = process.env.FORK_NETWORK_NAME === "sepolia";
const isSepoliaOrFork = isSepolia || isSepoliaFork;
// ...
module.exports = { isSepolia, isSepoliaFork, isSepoliaOrFork, ... }

Also branch getAssetAddresses(hre) if the new network has different token addresses than mainnet.

12. contracts/test/_fixture-{network}.js (optional)

Only if you'll have unit or fork tests for the network. Copy test/_fixture-base.js as a template and adapt for the new network's fixtures.

13. .github/workflows/defi.yml (optional)

Add a contracts-{network}-forktest job mirroring the existing pattern (~line 173–228). Requires CI secrets configured for {NETWORK}_PROVIDER_URL. Skip if you don't need CI-level fork tests for the network.

14. contracts/scripts/defender-actions/ (optional)

Only relevant if cross-chain relay automation or scheduled jobs need to run for the new network. Mirror existing scripts (e.g., scripts/defender-actions/crossChainRelay.js).

15. Top-level README.md

Add the network to the "Deployed on Ethereum Mainnet, Base, Arbitrum, Sonic, Plume, Holesky, Hoodi, …" list at the top.

16. Verify

bash
cd contracts
pnpm hardhat compile                       # compiles
pnpm prettier:sol && pnpm prettier:js      # format
pnpm lint:sol && pnpm lint:js              # lint
pnpm hardhat console --network {network}   # provider resolves (will error on connect if URL is empty, that's OK)
pnpm hardhat deploy --network {network} --dry-run   # deploy wiring sanity

17. Smoke test on the new network

After actual deploy:

  • Read back a key contract's address via hardhat console.
  • Read a public view function to confirm the deployment actually accepted calls.
  • For CREATE3 deploys: confirm peer-chain addresses are byte-identical.

Edge cases & gotchas

  • Sonic added isSonicForkTest as a separate flag from isSonicFork. Some networks need both depending on how tests are wired. Look at existing usage in test/helpers.js to decide.
  • HyperEVM has no Etherscan-family verifier; uses customChains with the HyperEVM block explorer endpoint.
  • Plume Explorer is Blockscout-compatible at explorer.plume.org/api; no API key needed.
  • Base / Base Sepolia: basescan.org's V1 API is deprecated. Use the Etherscan V2 multichain API key with a customChains entry pointing at Etherscan's per-chain endpoint.
  • L2s: register both directions in addresses.js — the L2-side bridge components AND the L1-side companion components on the L1's address entry (L1StandardBridge for the L2's rollup, etc.).
  • accounts field in networks.<name>: do NOT use defaultAccounts blindly. Specify deployer + governor PK env vars so devs can override per-environment.

Reference PRs

When in doubt, look at how the most-similar existing network is wired and mirror that pattern. Don't invent new conventions.

© 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 .claude/skills/add-network of OriginProtocol/origin-dollar.

Open the folder on GitHubat commit 5b2c5d6

Compare with similar skills

Add Network 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.

Add Network compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Network this skillOriginProtocol/origin-dollar153—~2.8kAutomated safety check: NotesMIT
Deposit QrSuperior-Trade/superior-skills214—~1.1kAutomated safety check: PassMIT
Okx Dapp Discoveryinternet-court/internet-court-skill6.5k1 repos~6.9kAutomated safety check: PassMIT
Okx Dapp Discoveryaiskillstore/marketplace4301 repos~5.6kAutomated safety check: PassMIT
1m TradeLeoYeAI/openclaw-master-skills2.2k—~4.9kAutomated safety check: NotesMIT
CapacitrBankrBot/skills1.2k—~3kAutomated safety check: PassNone

Similar skills

  • Deposit Qr

    Superior-Trade/superior-skills

    A skill your agent uses when a user needs a QR code or wallet payment URI to fund a Superior-managed EVM wallet on a specific chain before using Lighter, Polymarket, Hyperliquid, or other Superior…

    214 GitHub stars~1.1k tokensUpdated 29 days ago
    Backend & APIsAuto-check passed
  • Okx Dapp Discovery

    internet-court/internet-court-skill

    Plugin router for 20 third-party DeFi protocols (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun…

    6.5k GitHub starsUsed in 1 repo~6.9k tokens
    Backend & APIsAuto-check passed
  • Okx Dapp Discovery

    aiskillstore/marketplace

    Plugin router for 20 third-party DeFi protocols (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun…

    430 GitHub starsUsed in 1 repo~5.6k tokens
    Backend & APIsAuto-check passed
  • 1m Trade

    LeoYeAI/openclaw-master-skills

    Integrated on-chain operations hub: integrates BlockBeats market intelligence, Hyperliquid DEX trading via hl1m, wallet creation and management at https://www.1m-trade.com, and supports local…

    2.2k GitHub stars~4.9k tokensUpdated 2 mo ago
    Backend & APIsAuto-check: notes
  • Capacitr

    BankrBot/skills

    Paste a URL or free text and get matched Polymarket / Hyperliquid / Deribit markets with Quotient edge scores.

    1.2k GitHub stars~3k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Okx Dex Market

    internet-court/internet-court-skill

    HARD BLOCK — never use for prediction-market/Polymarket UpDown queries; route to okx-dapp-discovery when a named DApp (Polymarket/Aave/Hyperliquid/PancakeSwap/Morpho) appears with a timeframe, or…

    6.5k GitHub starsUsed in 1 repo~1.7k tokens
    Backend & APIsAuto-check passed

More from OriginProtocol/origin-dollar

All 8 skills in this repo
  • Fork Test

    OriginProtocol/origin-dollar

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

    153 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • 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

Works with

Questions about Add Network

What does Add Network do?

Checklist for adding a new EVM network (mainnet or testnet) to the origin-dollar repo. Add Network is an agent skill from OriginProtocol/origin-dollar. Checklist for adding a new EVM network (mainnet or testnet) to the origin-dollar repo.

When should I use Add Network?

Add Network fits situations like: the user wants to add support for a new chain — e.g; tasks that involve Smart contracts.

How do I install Add Network in Claude Code?

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

How do I install Add Network in Codex?

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

Can I use Add Network 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 add-network -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-network, .gemini/skills/add-network, .github/skills/add-network and .opencode/skills/add-network in your project.

What does Add Network need to run?

Going by SKILL.md and its folder, Add Network needs the command-line tools its instructions call (pnpm) and credentials named ETHERSCAN_API_KEY. Our summary lists: A credential in ETHERSCAN_API_KEY.

Does Add Network access the network?

SKILL.md names 3 domains. In commands or code: api-sepolia.basescan.org and sepolia.basescan.org; the agent is likely to contact these when it follows the instructions. As links in the text: docs.chain.link. This is read from the text; nothing was executed.

Is Add Network safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Add Network use?

Add Network 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 Add Network use?

About 2.8k tokens (SKILL.md is roughly 11k 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 Add Network?

Skills that share tags, products or a category with Add Network: Deposit Qr (Superior-Trade/superior-skills, 214 stars), Okx Dapp Discovery (internet-court/internet-court-skill, 6.5k stars), Okx Dapp Discovery (aiskillstore/marketplace, 430 stars) and 1m Trade (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Network?

OriginProtocol (a GitHub organization) maintains it in OriginProtocol/origin-dollar, which has 153 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 8, 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.