bitcoin-api CLAUDE.md

A set of project instructions for Bortlesboat’s Bitcoin fee API, including its satoshi API, customer messaging, work boundaries, architecture, and testing requirements. Satoshis are the smallest unit of bitcoin.

In plain words
What is it for?
Use it when working on the Bitcoin API, its endpoints, documentation, architecture, tests, or marketing text. It guides outcome-focused messaging about transaction fees, limits endpoint-count claims, and records changes in SCOPE_OF_WORK.md.
Why use it?
It keeps code changes and customer-facing claims aligned with the project’s rules. It also requires the canonical scope document to be updated whenever the project changes.

Instructions file

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/bortlesboat/bitcoin-api/claude-md
Clone the repo
git clone --depth 1 https://github.com/Bortlesboat/bitcoin-api
Per session 3,483 This file is loaded in full into every session.
When invoked 3,483 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 $0.03483 $0.03483
Opus 5 $0.01741 $0.01741
Sonnet 5 $0.00697 $0.00697
Haiku 4.5 $0.00348 $0.00348

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

Security

Grade A, and why

bitcoin-api 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 · 184 lines

How it starts

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

Satoshi API -- Project Instructions

Messaging (MANDATORY — Any-Limit Filter)

Every customer-facing claim must answer: "Does it make money, save money, or save time?"

  • NEVER lead with endpoint counts ("78 endpoints") in headlines, taglines, or selling points
  • NEVER use "analyzed data" or "production-grade" as a primary value proposition
  • ALWAYS lead with outcomes: "save money on fees", "know when to send", "stop watching block explorers"
  • Product positioning: "Bitcoin fee intelligence that saves you money on every transaction"
  • Endpoint counts are fine in technical reference sections (sprint tables, API surface docs)
  • scripts/marketing_sync.py enforces this — it flags endpoint-count selling points and "analyzed data" usage

Source: Reddit u/Any-Limit-7282 feedback, adopted as company strategy Mar 8, 2026.

Scope of Work (MANDATORY)

docs/SCOPE_OF_WORK.md is the canonical project document. It MUST be updated with every change.

After any code change, documentation update, or architectural decision:

  1. Update the relevant section(s) in docs/SCOPE_OF_WORK.md
  2. If adding/removing endpoints: update Section 3 (API Surface)
  3. If adding/removing files: update Section 6 (Deliverables)
  4. If fixing bugs or addressing review findings: update Section 5.2 (Critical Issues Fixed)
  5. If changing security controls: update Section 4 (Security Model)
  6. If test count changes: update Section 6.1 (sprint table totals)
  7. If adding known limitations: update Section 5.3
  8. If deployment steps change: update Section 7

The SOW is the single source of truth for what this project is, what it does, and what state it's in. Treat it like a living design doc, not a one-time artifact.

Architecture

  • Stack: FastAPI + bitcoinlib-rpc + SQLite (WAL mode)
  • Entry point: src/bitcoin_api/main.py
  • Config: Pydantic Settings from env vars (config.py), RPC password is SecretStr
  • Auth: API key via X-API-Key header, tier-based (anonymous/free/pro/enterprise). Anonymous: lightweight GET only. Free+: expensive GET (mining/stats/whale-stream). Block caps: anon/free=144, pro=1008, enterprise=2016. Helpers: require_api_key(), cap_blocks_param() in auth.py.
  • Rate limiting: Sliding window (in-memory or Upstash Redis) + daily (DB-backed)
  • Caching: Per-cache locks, reorg-safe depth awareness, bounded LRU for hash mappings
  • External services (all optional, default disabled): Upstash Redis (rate limit persistence), Resend (transactional email), PostHog (landing page analytics). API functions fully without any of them.

Read the full file on GitHub · 184 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 First seen · 184 lines · 3,483 tokens per session scan A 30e518eadb02

Subscribe to this mod's changes

bitcoin-api CLAUDE.md is an instructions file published in the GitHub repository Bortlesboat/bitcoin-api (5 stars, last pushed 25d ago), licensed Apache-2.0. It adds 3,483 tokens to every session, about $0.0174 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.