battlechain-tutorial

battlechain-tutorial is a skill for Claude Code, Codex from Cyfrin/battlechain-lib. It costs 31 tokens per session (5,597 once invoked), scanned A, original, Apache-2.0.

A deployment guide for BattleChain, a ZKSync-based blockchain network used to test and security-check smart contracts before mainnet release.

In plain words
What is it for?
Use it to create Foundry deployment scripts and follow the steps for deploying contracts to BattleChain Testnet.
Why use it?
It provides a defined process for collecting project details and preparing the files needed for deployment.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cyfrin/battlechain-lib/battlechain-tutorial
Any agent
npx skills add Cyfrin/battlechain-lib --skill battlechain-tutorial
Clone the repo
git clone --depth 1 https://github.com/Cyfrin/battlechain-lib

Made for: Claude Code, Codex.

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-tutorial

README.md
[![agentmods](https://agentmods.dev/badge/skills/cyfrin/battlechain-lib/battlechain-tutorial.svg)](https://agentmods.dev/skills/cyfrin/battlechain-lib/battlechain-tutorial)
Your own site
<a href="https://agentmods.dev/skills/cyfrin/battlechain-lib/battlechain-tutorial"><img src="https://agentmods.dev/badge/skills/cyfrin/battlechain-lib/battlechain-tutorial.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,597 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00031 $0.05597
Opus 5 $0.00015 $0.02799
Sonnet 5 $0.00006 $0.01119
Haiku 4.5 $0.00003 $0.00560

Measured 4d ago against content hash 470e426621de, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

battlechain-tutorial 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 4d 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-tutorial/SKILL.md · 396 lines

How it starts

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

System Prompt

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:

  1. Gather everything you need by asking targeted questions
  2. Generate all required Foundry scripts, customized to their project
  3. Guide them step-by-step through the deployment lifecycle

Phase 1 — Gather Information

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:

  • Use the AskUserQuestion tool for ALL questions. This gives the user clickable selection options instead of requiring typed answers.
  • The tool automatically adds an "Other" option for free-text input, so you don't need to include "Custom (specify)" options.
  • The tool supports 2–4 options per question. Pick the most common/useful choices.
  • For questions that are inherently free-form (addresses, names, numbers), still use AskUserQuestion but provide 2-4 sensible example/default options so the user can pick one or type their own via "Other".
  • Custom answers: When the user selects "Other" and writes a free-text answer, immediately confirm what you understood back to them using 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.
  • Use multiSelect: true when the user should be able to pick more than one option (e.g. selecting contracts).

Read the full file on GitHub · 396 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. 4d ago First seen · 396 lines · 31 tokens per session scan A 470e426621de

Subscribe to this mod's changes

battlechain-tutorial is a skill published in the GitHub repository Cyfrin/battlechain-lib (5 stars, last pushed 4d ago), licensed Apache-2.0. It adds 31 tokens to every session and 5,597 once invoked, about $0.0002 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

offensive-osint-methodology

Structured OSINT methodology framework: target definition, source selection, collection workflows, data correlation, timeline reconstruction, and reporting. Use to guide systematic OSINT campaigns or teach OSINT methodology.

SnailSploit/Claude-Red · 0 tokens

learn

Use this skill when the user wants intellectual understanding — learning how or why something works, not getting a task done or soliciting Claude's judgment. Trigger for: Explicit learning requests: teach, explain, ELI5, walk me through, quiz me, flashcards, "I'm rusty on"; definitions ("what is X") Terse concept…

UnicomAI/wanwu · 219 tokens

smart-contract-reading-guide

How to read and understand smart contracts — navigating Etherscan, reading Solidity code, understanding ABIs, decoding transactions, and spotting common patterns. Use when helping users verify contracts, understand DeFi protocol mechanics, or decode on-chain activity.

nirholas/three.ws · 53 tokens

skmtc-operation

The operation-generator shape for Skmtc: one definition per (path, method), for any output family — client hooks, SDK methods, forms, route stubs, docs. Output varies wildly; the DECOMPOSITION of the operation and the peer-consumption rules do not. Core teaching: every schema that appears in your output is a reference…

skmtc/skmtc · 156 tokens

okx-guide

Onchain OS onboarding & guide hub — the single entry for first-time, 'what is this / how do I use it', OKX.AI, and customer-support intents; classifies the intent and routes to the right sub-flow via its Intent Routing table. Covers: (1) Onchain OS onboarding + welcome banner — 'what is onchainos', 'what is onchain…

internet-court/internet-court-skill · 403 tokens

study

Guide structured learning for a topic by diagnosing current level, defining stage goals, building a learning path, generating practice, and running review loops. Use when the user wants to learn something step by step, start from zero, build a study plan, prepare for an exam or skill, get guided practice, or continue…

flc1125/skills · 76 tokens