battlechain-lib: Skill for Claude Code

.agents/skills/battlechain-tutorial/SKILL.md

battlechain-tutorial is a skill for Claude Code 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 Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: names the AskUserQuestion tool; 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-tutorial/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-tutorial

README.md
[![agentmods](https://agentmods.dev/badge/skills/cyfrin/battlechain-lib/battlechain-tutorial/github.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/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-tutorial

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00031 $0.05597
Opus 5.5 $0.00012 $0.02239
Sonnet 5.5 $0.00006 $0.01119
Haiku 4.5 $0.00003 $0.00560

Measured 1mo ago against content hash 470e426621de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 1mo ago), licensed Apache-2.0. It adds 31 tokens to every session and 5,597 once invoked, about $0.0001 per session on Opus 5.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.