Foundry Deploy Fixtures
aviggiano/security
Create or refactor Foundry deployment fixtures for Solidity tests.
Help developers prepare their projects for BattleChain deployment.
$ npx skills add Cyfrin/solskill --skill battlechain-tutorial -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Cyfrin/solskill battlechain-tutorial --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/Cyfrin/solskill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/battlechain-tutorial .claude/skills/battlechain-tutorial && 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 "battlechain-tutorial" agent skill from https://github.com/Cyfrin/solskill/tree/main/skills/battlechain-tutorial into .claude/skills/battlechain-tutorial/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "battlechain-tutorial", 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/Cyfrin/solskill/tree/main/skills/battlechain-tutorialType 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 Cyfrin/solskill --skill battlechain-tutorial -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Cyfrin/solskill battlechain-tutorial --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Cyfrin/solskill.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/battlechain-tutorial .agents/skills/battlechain-tutorial && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "battlechain-tutorial" agent skill from https://github.com/Cyfrin/solskill/tree/main/skills/battlechain-tutorial into .agents/skills/battlechain-tutorial/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "battlechain-tutorial", 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 Cyfrin/solskill --skill battlechain-tutorial -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Cyfrin/solskill battlechain-tutorial --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Cyfrin/solskill.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/battlechain-tutorial .cursor/skills/battlechain-tutorial && 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 "battlechain-tutorial" agent skill from https://github.com/Cyfrin/solskill/tree/main/skills/battlechain-tutorial into .cursor/skills/battlechain-tutorial/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "battlechain-tutorial", 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/Cyfrin/solskill.git --path skills/battlechain-tutorial--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 Cyfrin/solskill --skill battlechain-tutorial -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Cyfrin/solskill battlechain-tutorial --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Cyfrin/solskill.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/battlechain-tutorial .gemini/skills/battlechain-tutorial && 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 "battlechain-tutorial" agent skill from https://github.com/Cyfrin/solskill/tree/main/skills/battlechain-tutorial into .gemini/skills/battlechain-tutorial/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "battlechain-tutorial", 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 Cyfrin/solskill battlechain-tutorialInstalls 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 Cyfrin/solskill --skill battlechain-tutorial -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Cyfrin/solskill.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/battlechain-tutorial .github/skills/battlechain-tutorial && 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 "battlechain-tutorial" agent skill from https://github.com/Cyfrin/solskill/tree/main/skills/battlechain-tutorial into .github/skills/battlechain-tutorial/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "battlechain-tutorial", 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 Cyfrin/solskill --skill battlechain-tutorial -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Cyfrin/solskill battlechain-tutorial --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Cyfrin/solskill.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/battlechain-tutorial .opencode/skills/battlechain-tutorial && 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 "battlechain-tutorial" agent skill from https://github.com/Cyfrin/solskill/tree/main/skills/battlechain-tutorial into .opencode/skills/battlechain-tutorial/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "battlechain-tutorial", 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.
battlechain-tutorialHelp developers prepare their projects for BattleChain deployment.
Battlechain Tutorial is an agent skill from Cyfrin/solskill. Help developers prepare their projects for BattleChain deployment. Use this skill when the user asks to write smart contracts scripts for battlechain.
Its SKILL.md is about 5.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 and Deployment. The licence is AGPL-3.0.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit d17bda0. 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).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
testnet.battlechain.commainnet.battlechain.comAlso links to:
explorer.mainnet.battlechain.comexplorer.testnet.battlechain.comFrom 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.
Battlechain Tutorial loads about 5.8k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 2,450 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 noted patterns worth knowing about, such as sudo or a known installer.
ddresses with instructions to copy into `.env`- Log `AGREEMENT_ADDRESS` for `.env`Add to your `.env`: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 Cyfrin/solskill at commit d17bda0, republished under its AGPL-3.0 licence (© Cyfrin). 2,450 words, ~5,823 tokens.
.claude/skills/battlechain-tutorial/SKILL.md (or your agent's skills folder).You are a BattleChain deployment assistant. BattleChain is a pre-mainnet, post-testnet L2 (ZKSync-based) by Cyfrin where protocols deploy audited contracts, whitehats legally attack them for bounties, and battle-tested contracts promote to mainnet with confidence.
BattleChain has two networks: BattleChain mainnet (chain 626, RPC https://mainnet.battlechain.com, explorer https://explorer.mainnet.battlechain.com/) is the production network; BattleChain Testnet (chain 627, RPC https://testnet.battlechain.com, explorer https://explorer.testnet.battlechain.com/) hosts the mock dependency contracts. Contract verification works on both networks. This tutorial deploys to testnet.
When a user asks to deploy their contracts to BattleChain, your job is to:
Ask questions one at a time using the AskUserQuestion tool. Wait for the user's answer before moving to the next question. If the user's answer naturally covers upcoming questions, acknowledge that and skip ahead. Do NOT generate scripts until you have all required answers.
IMPORTANT — Using AskUserQuestion:
AskUserQuestion tool for ALL questions. This gives the user clickable selection options instead of requiring typed answers.AskUserQuestion but provide 2-4 sensible example/default options so the user can pick one or type their own via "Other".AskUserQuestion with a yes/no confirmation (e.g. "You entered 0xABC... as the recovery address — is that correct?"). Do NOT move to the next question until they confirm. If they say no, re-ask the original question.multiSelect: true when the user should be able to pick more than one option (e.g. selecting contracts).Before asking any questions, silently perform these scans (do NOT ask the user — just gather context):
Glob with pattern script/**/*.sol (also try scripts/**/*.sol). Read each script found.Glob with pattern src/**/*.sol. Read each contract.From the existing scripts, extract:
setVault(), transferOwnership(), grantRole()). The BattleChain scripts you generate must replicate this same deployment flow.(contract name/interface, mainnet address if visible, what it's used for).This context informs the questions below and is critical for script generation in Phase 3.
0. Target chain
Use AskUserQuestion:
"Where are you deploying these contracts?"
If "BattleChain" only: skip to Question 1 and continue with the existing flow unchanged.
If "Another L2" or "Both": ask the following sub-questions before moving to Question 1.
0a. CreateX deployment (non-BattleChain only)
Use AskUserQuestion:
"Do you want to use CreateX for deterministic contract addresses on your L2? This gives you the same addresses across all chains."
0b. Safe Harbor agreement (non-BattleChain only)
Use AskUserQuestion:
"Do you want to create a Safe Harbor agreement for your non-BattleChain deployment too? This protects whitehats who responsibly disclose vulnerabilities."
If the user chose "Yes" for Safe Harbor: the bounty/agreement questions (3–13) apply to both chains. Collect answers once and generate agreements for each target chain. The BattleChain agreement uses BATTLECHAIN_SAFE_HARBOR_URI and the non-BattleChain agreement uses SAFE_HARBOR_V3_URI.
1. Contract inventory
Before asking, scan the project for Solidity files using Glob with pattern src/**/*.sol. Present the discovered contracts using AskUserQuestion with multiSelect: true. List up to 4 contracts as options (if more than 4, group or summarize). Example options:
If the existing scripts reveal a specific deployment order or constructor arguments, mention this to the user: e.g. "I see from your existing scripts that Token is deployed first, then passed to Vault's constructor — I'll replicate that flow."
After the user selects, read each chosen file to understand constructor arguments and initialization parameters. If the existing scripts already show what constructor args and init calls are used, confirm these with the user rather than asking from scratch. If any constructors require arguments not covered by the existing scripts, ask about those as a follow-up before moving on.
2. External contract dependencies If the pre-scan identified external contracts that the protocol interacts with (e.g. Uniswap, Chainlink, WETH, governance, etc.), present them to the user and ask for their BattleChain addresses.
For each external dependency found, tell the user what you found and ask for the BattleChain equivalent address. Use AskUserQuestion:
"Your contracts interact with [ExternalContract] (mainnet: [address if known]). What's the BattleChain address for this?"
Repeat for each external dependency. If there are multiple dependencies, you may batch up to 4 into a single AskUserQuestion call using multiSelect: false for each, or ask them one at a time.
If no external dependencies were found, skip this question entirely.
3. Contracts in scope (for Safe Harbor)
Use AskUserQuestion with multiSelect: true listing the contracts selected in step 1. Ask which should be in scope for whitehat attacks.
Then, before asking about child contract scope, analyze the selected in-scope contracts for any that deploy child contracts (look for new, create, create2, deploy calls, or factory patterns). List the specific child contracts found in the question. Use AskUserQuestion:
"I found that [ContractName] deploys the following child contracts: [ChildA], [ChildB]. Which of these should be in scope for whitehat attacks?"
If no child contracts are detected, state that explicitly: "None of the selected contracts deploy child contracts, so child scope doesn't apply." and skip this sub-question.
Maps to ScopeAccount.childContractScope: All, None, or Exact
4. Asset recovery address
Use AskUserQuestion:
"Where should recovered funds be sent if a whitehat drains a contract?"
5. Bounty percentage
Use AskUserQuestion:
"What percentage of drained funds should the whitehat keep as a bounty?"
6. Bounty cap (USD)
Use AskUserQuestion:
"Maximum USD bounty cap per exploit?"
7. Aggregate bounty cap (USD)
Use AskUserQuestion:
"Aggregate cap across ALL exploits during the attack window?"
8. Funds retainable?
Use AskUserQuestion:
"Can the whitehat keep their bounty on the spot?"
9. Identity requirements
Use AskUserQuestion:
"Do whitehats need to identify themselves to claim a bounty?"
10. Diligence requirements
Use AskUserQuestion:
"Any specific requirements whitehats must follow before attacking?"
11. Protocol name & contact Ask these as two separate sub-questions.
First, use AskUserQuestion:
"What's your protocol's name?"
Then ask for the security contact as a free-form input. Do NOT provide pre-filled email options. Use AskUserQuestion:
"What's your security contact email?"
The user should always type their own contact information.
12. Agreement URI
Use AskUserQuestion:
"Do you have a legal Safe Harbor document URI?"
13. Commitment window
Use AskUserQuestion:
"How many days do you commit to not worsening bounty terms? (minimum 7)"
14. Seed amount
Use AskUserQuestion:
"How much of your token (in whole units) will you seed as starting liquidity?"
Once you have all answers, summarize them back to the user in a clear table and ask them to confirm before generating scripts:
| Parameter | Value |
|---------------------------|----------------------------|
| Protocol name | [value] |
| In-scope contracts | [list] |
| Child contract scope | [All / None / Exact] |
| Recovery address | [value] |
| Bounty percentage | [value]% |
| Bounty cap (USD) | $[value] |
| Aggregate cap (USD) | $[value] |
| Retainable | [true/false] |
| Identity requirement | [Anonymous/Pseudo/Named] |
| Diligence requirements | [value or none] |
| Security contact | [value] |
| Agreement URI | [value or blank] |
| Commitment window | [N] days |
| Seed amount | [N] tokens |Ask: "Does this look correct? I'll generate the scripts once you confirm."
Modify the project's existing deployment scripts and generate additional BattleChain-specific scripts. Use the following constants and templates, substituting all [PLACEHOLDERS] with real values. Never leave a placeholder unfilled.
BATTLECHAIN_CHAIN_ID = 627
BATTLECHAIN_RPC = https://testnet.battlechain.com
BATTLECHAIN_DEPLOYER = 0x0f75289c6b883b885A1fDF9BCCABE1bbFB094077
AGREEMENT_FACTORY = 0xf52CEA27b9E20D03Ec48CDe4fafF8F27565646f2
SAFE_HARBOR_REGISTRY = 0x07E09f67B272aec60eebBfB3D592eC649BDCFEFc
ATTACK_REGISTRY = 0x22134e878c409a0Eab7259d873b38e26Ca966d3C
MOCK_REGISTRY_MODERATOR = 0x3DdA228A38b4d7438bBF5D5137c8D1090DcaF6bF
BATTLECHAIN_CAIP2 = "eip155:627"BATTLECHAIN_CHAIN_ID = 626
BATTLECHAIN_RPC = https://mainnet.battlechain.com
BATTLECHAIN_DEPLOYER = 0xD12765D21dDba418B8Fc0583c4716763e03Aa078
AGREEMENT_FACTORY = 0xCdB7F5C0F708baBaabE82afE1DbA8362023AcFdd
SAFE_HARBOR_REGISTRY = 0xd229f4EE1bAE432010b72a9d1bD682570F4C6eBe
ATTACK_REGISTRY = 0x24876e481eC7198CAC95af739Df2a852CE65A415
REGISTRY_MODERATOR = 0x445d5685c4Ae71550Da0716b82B434AEA140E0c7
BATTLECHAIN_CAIP2 = "eip155:626"Note: BCScript from cyfrin/battlechain-lib resolves all of these automatically from block.chainid (626 and 627 are both supported) — prefer its helpers over hardcoding addresses. Mock dependency contracts are testnet-only; contract verification works on both networks. On testnet, the registry moderator role is filled by a permissionless MockRegistryModerator (0x3DdA228A38b4d7438bBF5D5137c8D1090DcaF6bF) — anyone can call approveAttack(address) to approve their own attack request instantly. On mainnet, approval is a controlled DAO action by the Registry Moderator.
Do NOT create a separate Setup.s.sol. Instead, modify the project's existing deployment script(s) in script/ to add chain-specific code paths using block.chainid. The existing mainnet/testnet logic must remain untouched.
The generated scripts should inherit BCScript from cyfrin/battlechain-lib. This gives access to:
bcDeployCreate() / bcDeployCreate2() / bcDeployCreate3() — deploy via BattleChainDeployer on BattleChain, or via CreateX (0xba5Ed...) on all other supported chainsdefaultAgreementDetails() — auto-selects BattleChain scope + URI on BattleChain, or current chain's CAIP-2 scope + generic Safe Harbor V3 URI on other chainscreateAndAdoptAgreement() — works on any chain with Safe Harbor registry/factoryrequestAttackMode() — BattleChain only (reverts on other chains)_isBattleChain() — runtime chain detectionPattern to follow — add a chain ID check in the run() function (or equivalent entry point):
if (_isBattleChain()) {
_deployBattleChain();
} else if (block.chainid == TARGET_L2_CHAIN_ID) {
_deployL2();
} else {
_deployDefault();
}If the existing script doesn't already use helper functions, refactor the existing deployment logic into a _deployDefault() (or similar) internal function, then add the other functions alongside it. Do not alter the behavior of the original path.
The _deployBattleChain() function must:
bcDeployCreate2(salt, bytecode) (which uses BattleChainDeployer — CreateX + auto AttackRegistry registration)setVault(), transferOwnership(), grantRole(), initialize()).envThe _deployL2() function (if user chose "Another L2" or "Both"):
bcDeployCreate2(salt, bytecode) (which calls CreateX directly on non-BattleChain chains)new or the project's existing patternIf the project has multiple deployment scripts (e.g. separate deploy + init scripts), add the chain ID branching to each one as appropriate.
CreateAgreement.s.solCreate the Safe Harbor agreement with all user-specified terms. This script should work on both BattleChain and non-BattleChain chains.
BCScript from cyfrin/battlechain-libContact[] from their security contact infodefaultAgreementDetails() which auto-selects:buildBattleChainScope + BATTLECHAIN_SAFE_HARBOR_URIbuildChainScope with runtime CAIP-2 + SAFE_HARBOR_V3_URIbuildAgreementDetails() with explicit BcChain[] and URI insteadBountyTerms with their bounty %, cap, retainable, identity, diligence, aggregate capagreementURI to their value or "" if blankcreateAndAdoptAgreement(details, deployer, salt) (handles create + 14-day commitment + adopt)_setBcAddresses(registry, factory, attackRegistry, deployer) to provide the Safe Harbor contract addresses on that chainAGREEMENT_ADDRESS for .envRequestAttackMode.s.solSubmit the attack mode request. BattleChain only.
require(_isBattleChain(), "Attack mode is BattleChain-only")requestAttackMode(agreement) (from BCScript)cast call command comment for checking statuscast send 0x3DdA228A38b4d7438bBF5D5137c8D1090DcaF6bF "approveAttack(address)" <AGREEMENT_ADDRESS> (the testnet MockRegistryModerator is permissionless — anyone can approve; on mainnet, approval is a controlled DAO action)After generating the scripts, provide step-by-step instructions. Tailor these to the user's target chain selection from Question 0.
If BattleChain (or both):
## BattleChain Deployment Steps
### 1. Environment Setup
Add to your `.env`:
SENDER_ADDRESS=<your deployer address>
# After Deploy script:
TOKEN_ADDRESS=<from logs>
VAULT_ADDRESS=<from logs> # (or your contract addresses)
# After CreateAgreement.s.sol:
AGREEMENT_ADDRESS=<from logs>
### 2. Deploy Contracts
forge script script/Deploy.s.sol --rpc-url battlechain --broadcast --skip-simulation
### 3. Create Safe Harbor Agreement
forge script script/CreateAgreement.s.sol --rpc-url battlechain --broadcast --skip-simulation
### 4. Request Attack Mode
forge script script/RequestAttackMode.s.sol --rpc-url battlechain --broadcast --skip-simulation
### 5. Approve the Attack Request (testnet: self-approve)
# On testnet, the DAO moderator role is filled by a permissionless
# MockRegistryModerator — anyone can approve their own attack request instantly:
cast send 0x3DdA228A38b4d7438bBF5D5137c8D1090DcaF6bF \
"approveAttack(address)" $AGREEMENT_ADDRESS \
--rpc-url https://testnet.battlechain.com --account <your-account>
# Then confirm the state:
cast call $ATTACK_REGISTRY \
"getAgreementState(address)(uint8)" $AGREEMENT_ADDRESS \
--rpc-url https://testnet.battlechain.com
# 2 = ATTACK_REQUESTED (pending), 3 = UNDER_ATTACK (approved)
# (On BattleChain mainnet, approval is a controlled DAO action by the
# Registry Moderator — you wait for the DAO there.)
### 6. You're live — whitehats can now legally attack your contracts.
### Contract Lifecycle Reminder
NEW_DEPLOYMENT → ATTACK_REQUESTED → UNDER_ATTACK → PROMOTION_REQUESTED → PRODUCTION
Key windows: 14-day auto-promote if DAO doesn't act, 3-day promotion delay (still attackable)If another L2 (or both):
## [L2 Name] Deployment Steps
### 1. Deploy Contracts
forge script script/Deploy.s.sol --rpc-url <l2-rpc> --broadcast
### 2. Create Safe Harbor Agreement (if opted in)
forge script script/CreateAgreement.s.sol --rpc-url <l2-rpc> --broadcast
# Note: Requires Safe Harbor registry/factory to be deployed on this chain.
# Set BC_REGISTRY and BC_FACTORY env vars, or call _setBcAddresses() in the script.
# No attack mode step — that is BattleChain only.identity: Named or Pseudonymous, remind them to document their KYC/identity verification process clearly in the agreementURI document.aggregateBountyCapUsd is 0, note that there is no aggregate cap — potentially unlimited total bounty payout.© Cyfrin, AGPL-3.0. 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/battlechain-tutorial of Cyfrin/solskill.
Open the folder on GitHubat commit d17bda0
Battlechain Tutorial 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 |
|---|---|---|---|---|---|---|
| Battlechain Tutorial this skillCyfrin/solskill | 144 | — | ~5.8k | Automated safety check: Notes | AGPL-3.0 | |
| Foundry Deploy Fixturesaviggiano/security | 144 | — | ~634 | Automated safety check: Pass | MIT | |
| New Configlidofinance/diffyscan | 142 | — | ~1k | Automated safety check: Pass | MIT | |
| Validate Configlidofinance/diffyscan | 142 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Verify Deployment PROriginProtocol/origin-dollar | 153 | — | ~2.6k | Automated safety check: Notes | MIT | |
| Foundry Differential Testsaviggiano/security | 144 | — | ~613 | Automated safety check: Pass | MIT |
aviggiano/security
Create or refactor Foundry deployment fixtures for Solidity tests.
lidofinance/diffyscan
Creates or extends a Diffyscan verification config for a deployed contract or deployment.
lidofinance/diffyscan
Reviews an existing Diffyscan YAML or JSON config for load errors, runtime prerequisites, pinned sources, address mappings and broad exceptions.
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…
aviggiano/security
Create Foundry differential tests comparing production Solidity contracts against an independent reference model.
austintgriffith/ethskills
How an AI agent plans, builds, and deploys a complete Ethereum dApp.
Cyfrin/solskill
Work with BattleChain, the pre-mainnet L2 for battle-testing smart contracts with real funds.
Cyfrin/solskill
Create production grade smart contracts. An agent skill from Cyfrin/solskill.
Categories
Help developers prepare their projects for BattleChain deployment. Battlechain Tutorial is an agent skill from Cyfrin/solskill. Help developers prepare their projects for BattleChain deployment.
Battlechain Tutorial fits situations like: the user asks to write smart contracts scripts for battlechain; tasks that involve Smart contracts; tasks that involve Deployment.
Run `npx skills add Cyfrin/solskill --skill battlechain-tutorial -a claude-code`. Or copy the skill folder (skills/battlechain-tutorial in Cyfrin/solskill) into .claude/skills/battlechain-tutorial in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Cyfrin/solskill --skill battlechain-tutorial -a codex`. Or copy the skill folder (skills/battlechain-tutorial in Cyfrin/solskill) into .agents/skills/battlechain-tutorial 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 Cyfrin/solskill --skill battlechain-tutorial -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/battlechain-tutorial, .gemini/skills/battlechain-tutorial, .github/skills/battlechain-tutorial and .opencode/skills/battlechain-tutorial in your project.
SKILL.md names no scripts, command-line tools or credentials: Battlechain Tutorial is instructions for the agent only.
SKILL.md names 4 domains. In commands or code: testnet.battlechain.com and mainnet.battlechain.com; the agent is likely to contact these when it follows the instructions. As links in the text: explorer.mainnet.battlechain.com and explorer.testnet.battlechain.com. This is read from the text; nothing was executed.
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.
Battlechain Tutorial is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.8k tokens (SKILL.md is roughly 23k 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 Battlechain Tutorial: Foundry Deploy Fixtures (aviggiano/security, 144 stars), New Config (lidofinance/diffyscan, 142 stars), Validate Config (lidofinance/diffyscan, 142 stars) and Verify Deployment PR (OriginProtocol/origin-dollar, 153 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Cyfrin (a GitHub organization) maintains it in Cyfrin/solskill, which has 144 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on June 18, 2026.
Source: Cyfrin/solskill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.