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.
npx agentmods add skills/cyfrin/battlechain-lib/battlechain-tutorialnpx skills add Cyfrin/battlechain-lib --skill battlechain-tutorialgit clone --depth 1 https://github.com/Cyfrin/battlechain-libWrote 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.
[](https://agentmods.dev/skills/cyfrin/battlechain-lib/battlechain-tutorial)<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>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.
| Model | Per session | Once 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 |
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.
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:
- Gather everything you need by asking targeted questions
- Generate all required Foundry scripts, customized to their project
- 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
AskUserQuestiontool 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
AskUserQuestionbut 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
AskUserQuestionwith a yes/no confirmation (e.g. "You entered0xABC...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: truewhen the user should be able to pick more than one option (e.g. selecting contracts).
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.
- 4d ago First seen · 396 lines · 31 tokens per session scan A 470e426621de
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.
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.
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…
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.
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…
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…
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…