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 commands/calhooon/bsv-wallet-cli/learninggit clone --depth 1 https://github.com/Calhooon/bsv-wallet-cliWhat 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.00000 | $0.00838 |
| Opus 5 | $0.00000 | $0.00419 |
| Sonnet 5 | $0.00000 | $0.00168 |
| Haiku 4.5 | $0.00000 | $0.00084 |
Grade A, and why
LEARNING 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 yesterday.
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 — 20 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Learning — commands
Lessons Learned
- [2026-02-24]
daemonopens SQLite twice — once forMonitor(needsArc<Storage>) and once forWallet(takes ownedStorageSqlx). This is becauseWallet::newconsumes ownership. If you try to share a single connection, the borrow checker stops you. Same pattern applies toServices. - [2026-02-24]
servetakesWalletContextby value (not&WalletContextlike other commands) because it movesctx.walletinto the shared server state viamake_wallet_state. This meansserveconsumes the context — you can't use it after callingserve::run. - [2026-02-24]
initwrites.envto CWD, not~/.config/or any global path. Easy to lose the root key if youinitfrom a temp directory. The key is also printed to stdout, so capture it.
Debugging Insights
- [2026-02-24] If
balancereturns 0 butoutputsshows UTXOs, check the basket name.balancehardcodes"default"basket. Outputs in other baskets (e.g., from custominternalizeActioncalls) won't appear. - [2026-02-24]
fundfailures often trace back to derivation mismatches. Theanyone_key()counterparty + BRC-29 constants (SfKxPIJNgdI=,NaGLC6fMH50=) must match exactly whataddressused to generate the funding address. If the address derivation changes,fundsilently produces an output the wallet can't spend. - [2026-02-24]
daemon's UTXO check runs every 5 minutes and logs viatracing::warn. If you don't see warnings, checkRUST_LOGis set to at leastwarn. The threshold defaults to 3 (MIN_UTXOSenv var). - [2026-02-24]
splitwith a low balance will bail with "Balance too low" even if you have UTXOs, because it reserves 200 sats for fees. With 1 UTXO at 200 sats, the available balance is 0.
Pattern Notes
- [2026-02-24] Three files duplicate BRC-29 constants (
DEFAULT_DERIVATION_PREFIX,DEFAULT_DERIVATION_SUFFIX,BRC29_PROTOCOL):address.rs,split.rs,fund.rs. These must stay in sync. A shared constants module would prevent drift, but hasn't been extracted yet. - [2026-02-24] Every command follows the same JSON output pattern:
if ctx.json_output { serde_json::json!(...) } else { println!(...) }. The--jsonflag on the CLI propagates throughWalletContext. New commands should follow this convention. - [2026-02-24] Commands split into two initialization patterns: most take
&WalletContext, butinit,daemon, andservicestake&Clidirectly.inithas no wallet yet;daemonneeds separateArcownership;servicesonly needs chain info, not a full wallet. - [2026-02-24]
sendtags outputs as"relinquish"— this is how the wallet knows not to count sent coins in its own balance. Forgetting this tag causes sent funds to appear as spendable. - [2026-02-24]
outputsandactionsonly fetch page 1 (limit 100).balanceis the only command that paginates exhaustively. If a wallet has >100 UTXOs,outputswill show a partial view.
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.
- yesterday First seen · 20 lines · 0 tokens per session scan A 934fcc199351
LEARNING is a command published in the GitHub repository Calhooon/bsv-wallet-cli (10 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 838 tokens. 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 commands, from other repositories
agent-wallet
Use the bundled agent-wallet skill to operate a non-custodial wallet directly on-chain (EVM and Bitcoin).
/opsx-explore
Enter explore mode - think through ideas, investigate problems, clarify requirements.
/opsx-apply
Implement tasks from an OpenSpec change (Experimental).
/opsx-archive
Archive a completed change in the experimental workflow.
verify-e2e-flow
Verify that the E2E scripts for the specified chain follow the documented transaction flow.
recreate-pr
Create a copy of an existing PR with review comments summarized as fixes. This allows Gemini (or other reviewers) to re-review the changes.