sparkbtcbot CLAUDE.md

sparkbtcbot CLAUDE.md is an instructions file for Claude Code from echennells/sparkbtcbot. It costs 1,583 tokens per session, scanned A, original, MIT.

A Claude Code skill that gives an AI agent Bitcoin wallet operations through Spark, a Bitcoin layer-2 network for faster transfers. It covers balances, deposits, transfers, invoices, tokens, withdrawals, signing, purchases, and recovery backups.

In plain words
What is it for?
Use it to initialize or import a wallet, check balances, receive or send Bitcoin, work with Lightning or Spark invoices, transfer tokens, withdraw to the Bitcoin network, sign messages, make supported purchases, or maintain recovery data.
Why use it?
It provides instructions for carrying out wallet and payment tasks in one workflow, including moving funds between Spark and regular on-chain Bitcoin. It also documents safeguards for spending and recovery.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

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 instructions/echennells/sparkbtcbot/claude-md
Clone the repo
git clone --depth 1 https://github.com/echennells/sparkbtcbot

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 sparkbtcbot CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/echennells/sparkbtcbot/claude-md.svg)](https://agentmods.dev/instructions/echennells/sparkbtcbot/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/echennells/sparkbtcbot/claude-md"><img src="https://agentmods.dev/badge/instructions/echennells/sparkbtcbot/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,583 This file is loaded in full into every session.
When invoked 1,583 The same file — it is already loaded in full.
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.1 $0.01583 $0.01583
Opus 5 $0.00792 $0.00792
Sonnet 5 $0.00317 $0.00317
Haiku 4.5 $0.00158 $0.00158

Measured 2d ago against content hash 390efcb316d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

sparkbtcbot CLAUDE.md 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 2d 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.

CLAUDE.md · 96 lines

How it starts

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

sparkbtcbot

Claude Code skill for setting up Spark Bitcoin L2 wallet capabilities for AI agents.

Installation: the plugin marketplace, or clone anywhere (e.g. ~/sparkbtcbot) and symlink the nested skill: ln -s ~/sparkbtcbot/skills/sparkbtcbot ~/.claude/skills/sparkbtcbot. Never clone directly into ~/.claude/skills/ — the skill nests at skills/sparkbtcbot/, so a direct clone buries SKILL.md too deep to be discovered (README → Local clone).

What This Skill Does

Teaches Claude Code how to give AI agents Bitcoin capabilities using the Spark L2:

  1. Initialize Wallet — Create or import a BIP39 mnemonic-based wallet
  2. Check Balance — Query BTC and token balances
  3. Receive Deposits — Generate L1 Bitcoin deposit addresses
  4. Transfer BTC — Instant, zero-fee Spark-to-Spark transfers
  5. Lightning Invoices — Create and pay BOLT11 invoices (Lightning Network interop)
  6. Spark Invoices — Native Spark invoices payable in sats or tokens
  7. Token Operations — Transfer BTKN/LRC20 tokens natively
  8. Withdraw to L1 — Cooperative exit back to on-chain Bitcoin
  9. Message Signing — Sign and verify messages for identity proof
  10. Merchant Purchases — Buy real-world goods/services with sats (Bitrefill, nadanada) under a shared payment policy (references/merchant-spending.md): invoice-vs-quote guard, confirm-before-buy, PII consent, bearer-secret deliverables
  11. Unilateral-Exit Backup — Continuously-fresh spark.unilateral-exit-bundle.v1 recovery bundle (the "leaf-vault"), consumed by Blink's spark-unilateral-exit tool if the operators ever vanish

Structure

lib/
  atomic-file.js                      # the one atomic writer (temp+fsync+link/rename+dir-fsync)
  encrypted-seed.js                   # scrypt + AES-256-GCM seed file helper
  leaf-vault.js                       # SDK-free recovery-bundle persistence + shape validation
  fee-guards.js                       # fee/amount ceilings for sends, claims, withdrawals
  spend-ledger.js                     # rolling-window cumulative budget (bounds send LOOPS)
  transfer-ids.js                     # persisted per-invoice Lightning dedup transferId (safe retries)
  recipients-allowlist.js             # opt-in outbound allowlist guardrail
  index.js / index.d.ts               # npm entry (also exports ./leaf-vault subpaths)
skills/
  sparkbtcbot/
    SKILL.md                          # Always-loaded skill body (security, setup, navigator)
    references/                       # Detail loaded on demand (SDK API, agent class, L402, etc.)
      encrypted-seed.md               # Threat model, setup modes, recovery
      unilateral-exit.md              # The leaf-vault backup + Blink's exit tool
      recovery-scenarios.md           # Recovery properties (staleness, justice, economics)
    scripts/                          # Runnable example scripts
      cli.js                          # `sparkbtcbot <command>` — the single published bin (dispatcher)
      setup-encrypted-seed.js         # `npm run setup` — one-time bootstrap
      leaf-vault.js                   # snapshotLeafVault / verifyVault / enableLeafVault (library)
      leaf-vault-cli.js               # `npm run leaf-vault [-- verify]` — snapshot/verify CLI
      balance-and-deposits.js
      payment-flow.js
      token-operations.js
      spark-agent.js
      l402-paywalls.js
    evals/                            # Skill-quality evals (does the skill make Claude produce correct/safe code?)
      evals.json                      # Output evals: SDK-correctness + security-behavior, with checkable assertions
      trigger-eval.json               # Description-triggering queries (see NOTES: not measurable via claude -p here)
      NOTES.md                        # How to run (subagent output evals, with-skill vs baseline) + last results
tests/                                # vitest suite for the LIBRARY code (unit, integration, funded tiers)
.env.example                          # Environment variable template

Read the full file on GitHub · 96 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. 2d ago Changed · +86 tokens per session 390efcb316d8
  2. 6d ago First seen · 96 lines · 1,497 tokens per session scan A b47a0a2d5680

Subscribe to this mod's changes

sparkbtcbot CLAUDE.md is an instructions file published in the GitHub repository echennells/sparkbtcbot (4 stars, last pushed 3d ago), licensed MIT. It adds 1,583 tokens to every session, about $0.0079 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.