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/singularityjason/lightning-memory/openclaw-skillnpx skills add singularityjason/lightning-memory --skill openclaw-skillgit clone --depth 1 https://github.com/singularityjason/lightning-memoryWhat 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.00019 | $0.00527 |
| Opus 5 | $0.00010 | $0.00264 |
| Sonnet 5 | $0.00004 | $0.00105 |
| Haiku 4.5 | $0.00002 | $0.00053 |
Grade A, and why
lightning-memory 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.
What it actually says
Lightning Memory
Decentralized agent memory for the Lightning economy. Store, query, and recall memories with cryptographic identity (Nostr) and micropayments (Lightning/L402).
Installation
pip3 install lightning-memory
No API keys required. Runs fully local by default. Optional Nostr relay sync and Lightning L402 gateway for decentralized/paid access.
What It Does
AI agents can transact via Lightning (L402) but can't remember what they paid for, which vendors are reliable, or their spending patterns. Lightning Memory fixes this:
- Cryptographic identity via Nostr keypairs — memories are signed and verifiable
- Semantic search with local ONNX embeddings (no API calls)
- Nostr relay sync — memories replicate across relays using NIP-78 events
- L402 payment gateway — sell memory access via Lightning micropayments with macaroon auth
- MCP server — works with Claude Code, Cursor, Windsurf, and any MCP client
MCP Tools (7 tools)
| Tool | Purpose |
|---|---|
store_memory |
Store a memory with content, tags, and metadata |
query_memories |
Semantic search across stored memories |
get_memory |
Retrieve a specific memory by ID |
list_memories |
List recent memories with optional filters |
delete_memory |
Remove a memory by ID |
get_identity |
Get the current Nostr identity (npub) |
sync_status |
Check Nostr relay sync status |
Quick Start
from lightning_memory import MemoryStore
store = MemoryStore()
store.add("Vendor X charges 50 sats for image gen, quality 8/10")
results = store.query("reliable image generation vendors")
MCP Server
python -m lightning_memory.server
Or add to your MCP client config:
{
"lightning-memory": {
"command": "python3",
"args": ["-m", "lightning_memory.server"]
}
}
Links
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.
- 2d ago First seen · 73 lines · 19 tokens per session scan A 909f209da617
lightning-memory is a skill published in the GitHub repository singularityjason/lightning-memory (9 stars, last pushed 5mo ago), licensed MIT. It adds 19 tokens to every session and 527 once invoked, about $0.0001 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
saturnzap
Non-custodial Lightning wallet for AI agents via sz CLI: send/receive sats, pay invoices, auto-pay HTTP 402 (L402), manage channels and liquidity. Use when: (1) paying for API access with Lightning, (2) creating or paying BOLT11 invoices, (3) checking wallet balance or channel health, (4) managing peers and channels.…
new-mcp-tool
Scaffold a new MCP tool with models, service method, and DI registration.
sparkbtcbot
Give an AI agent a self-custodial Bitcoin wallet on the Spark L2. Covers wallet init from a BIP39 mnemonic, zero-fee Spark and BTKN/LRC20 token transfers, Lightning invoices (create and pay), Spark native invoices, L402 paywall payment, L1 deposits and cooperative withdrawals, and message signing. Make sure to use…
mcp-publish-prep
Prepare MCP package for publishing (version bump, changelog, validation).
strike-banking
Work with Strike banking tools (ACH, wire, payouts, deposits).
satrank-l402
Discover and score L402 endpoints on Bitcoin Lightning before paying. Use when an agent needs to call a paid API and wants a Bayesian trust posterior + offline-verifiable Nostr assertion. Bitcoin-pure, no x402/EVM.