battlechain-lib: Skill for Claude Code

.agents/skills/battlechain/SKILL.md

battlechain is a skill for Claude Code from Cyfrin/battlechain-lib. It costs 69 tokens per session (2,784 once invoked), scanned A, original, Apache-2.0.

A skill for developing and deploying smart contracts—programs that run on a blockchain—on BattleChain, a pre-mainnet network for testing contracts with real funds.

In plain words
What is it for?
Deploying contracts to BattleChain or its testnet, using its RPC and explorer services, creating Safe Harbor agreements, and carrying out authorized security attacks.
Why use it?
It provides network details and development standards for BattleChain’s stage between testnet and mainnet, including its whitehat testing process.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is Cyfrin/battlechain-lib's own configuration. It tells Claude Code how to work on battlechain-lib itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything battlechain-lib configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Cyfrin/battlechain-lib. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Cyfrin/battlechain-lib/main/.agents/skills/battlechain/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Cyfrin/battlechain-lib

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for battlechain

README.md
[![agentmods](https://agentmods.dev/badge/skills/cyfrin/battlechain-lib/battlechain/github.svg)](https://agentmods.dev/skills/cyfrin/battlechain-lib/battlechain)
Your own site
<a href="https://agentmods.dev/skills/cyfrin/battlechain-lib/battlechain"><img src="https://agentmods.dev/badge/skills/cyfrin/battlechain-lib/battlechain/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for battlechain

Your own site · 80×15
<a href="https://agentmods.dev/skills/cyfrin/battlechain-lib/battlechain"><img src="https://agentmods.dev/badge/skills/cyfrin/battlechain-lib/battlechain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,784 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.02784
Opus 5 $0.00034 $0.01392
Sonnet 5 $0.00014 $0.00557
Haiku 4.5 $0.00007 $0.00278

Measured 8d ago against content hash c32faa8c2507, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

battlechain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/battlechain/SKILL.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BattleChain Development Standards

Instructions for working with BattleChain, from the Cyfrin security team.

What is BattleChain

BattleChain is a ZKSync-based L2 blockchain that inserts a battle-testing phase between testnet and mainnet: Dev -> Testnet -> BattleChain -> Mainnet. Protocols deploy audited contracts with real funds, whitehats legally attack them for bounties under Safe Harbor agreements, and surviving contracts promote to production.

Networks

Network Chain ID RPC Explorer CAIP-2 Status
BattleChain 626 https://mainnet.battlechain.com https://explorer.mainnet.battlechain.com/ eip155:626 Live — production network
BattleChain Testnet 627 https://testnet.battlechain.com https://explorer.testnet.battlechain.com/ eip155:627 Live — tooling default

Both networks have a block explorer with an API and contract verification (mainnet API: https://block-explorer-api.mainnet.battlechain.com/api, testnet API: https://block-explorer-api.testnet.battlechain.com/api). The mock dependency contracts (tokens, Chainlink, Uniswap, etc.) are testnet-only. battlechain-lib tooling defaults to testnet; set NETWORK=mainnet to target mainnet.

Mainnet core contracts (chain 626)

Contract Address
Safe Harbor Registry (proxy) 0xd229f4EE1bAE432010b72a9d1bD682570F4C6eBe
Registry Implementation 0xBFF0ec94740c287932B50E64c2e8b380129B99a1
Agreement Factory (proxy) 0xCdB7F5C0F708baBaabE82afE1DbA8362023AcFdd
AgreementFactory Implementation 0x8d4fEDF4462E3876Ae7C70CC0C5cebA482003Ad5
Attack Registry (proxy) 0x24876e481eC7198CAC95af739Df2a852CE65A415
AttackRegistry Implementation 0x03A3228A4ce38362289E715bbc26Cac8b98e421B
BattleChainDeployer 0xD12765D21dDba418B8Fc0583c4716763e03Aa078
Registry Moderator 0x445d5685c4Ae71550Da0716b82B434AEA140E0c7
CreateX 0xa397f06F07251A3AEd53f6d3019A2a6cbd83E53e

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 217 lines · 69 tokens per session scan A c32faa8c2507

Subscribe to this mod's changes

battlechain is a skill published in the GitHub repository Cyfrin/battlechain-lib (5 stars, last pushed 8d ago), licensed Apache-2.0. It adds 69 tokens to every session and 2,784 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

web3-fullstack-packaged-build

Systematic full-stack Web3 build with mandatory packaging and delivery phase.

HKUDS/OpenSpace · 21 tokens

web3-fullstack-systematic-build

Systematic approach to building full-stack Web3 applications layer by layer.

HKUDS/OpenSpace · 21 tokens

solana-dev

Use when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my Solana program", "deploy to devnet", "send a v1 transaction", "support larger transactions", "fix maxSupportedTransactionVersion", or "explain…

solana-foundation/solana-dev-skill · 250 tokens

devtools-event-client

Create typed EventClient for a library. Define event maps with typed payloads, pluginId auto-prepend namespacing, emit()/on()/onAll()/onAllPluginEvents() API. Connection lifecycle (5 retries, 300ms), event queuing, enabled/disabled state, SSR fallbacks, singleton pattern. Unique pluginId requirement to avoid event…

TanStack/devtools · 79 tokens

walkeros-create-destination

Use when creating a new walkerOS destination to send events to a vendor or API (GA4/gtag, Meta/Facebook Pixel, Mixpanel, Amplitude, a custom HTTP API, Measurement Protocol), web or server-side. Example-driven workflow: research the vendor SDK and define step examples before implementing the destination interface, env…

elbwalker/walkerOS · 77 tokens

walkeros-create-source

Use when creating a new walkerOS source to capture events (browser source, dataLayer interception, server/HTTP source, webhook receiver, event capture), web or server-side. Example-driven workflow: research the input format and define step examples before implementing the push interface, createTrigger, and env pattern.

elbwalker/walkerOS · 65 tokens