ln-agent-poc-v2: Command for Claude Code

.claude/commands/cashu-purchase.md

cashu-purchase is a command for Claude Code from cachet-jp/ln-agent-poc-v2. It costs 0 tokens per session (1,115 once invoked), scanned A, original, MIT.

A purchase flow that uses Cashu, a form of digital Bitcoin cash, as an intermediary for Lightning payments. It buys Japanese gift cards with Bitcoin and reports the code, amount, balance change, and order ID.

In plain words
What is it for?
Use it to buy V-Preca, Kyash, QUO Card Pay, au PAY, DMM, or Bitcash gift cards with Cashu ecash.
Why use it?
It handles checking or adding Cashu funds before payment and can make the Lightning payment process more reliable. It removes several manual wallet and purchase steps.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is cachet-jp/ln-agent-poc-v2's own configuration. It tells Claude Code how to work on ln-agent-poc-v2 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ln-agent-poc-v2 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cachet-jp/ln-agent-poc-v2. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cachet-jp/ln-agent-poc-v2/main/.claude/commands/cashu-purchase.md
Clone the repo
git clone --depth 1 https://github.com/cachet-jp/ln-agent-poc-v2

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 cashu-purchase

README.md
[![agentmods](https://agentmods.dev/badge/commands/cachet-jp/ln-agent-poc-v2/cashu-purchase/github.svg)](https://agentmods.dev/commands/cachet-jp/ln-agent-poc-v2/cashu-purchase)
Your own site
<a href="https://agentmods.dev/commands/cachet-jp/ln-agent-poc-v2/cashu-purchase"><img src="https://agentmods.dev/badge/commands/cachet-jp/ln-agent-poc-v2/cashu-purchase/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cashu-purchase

Your own site · 80×15
<a href="https://agentmods.dev/commands/cachet-jp/ln-agent-poc-v2/cashu-purchase"><img src="https://agentmods.dev/badge/commands/cachet-jp/ln-agent-poc-v2/cashu-purchase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,115 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.01115
Opus 5 $0.00000 $0.00558
Sonnet 5 $0.00000 $0.00223
Haiku 4.5 $0.00000 $0.00112

Measured 11d ago against content hash 918ec4671594, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cashu-purchase 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 11d 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/commands/cashu-purchase.md · 66 lines

How it starts

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

/cashu-purchase - Cashu 経由でギフトカードを購入

Cashu ecash を中継して Lightning 支払いの成功率を高めた購入フローです。 Bitcoin (Cashu ecash) で日本のギフトカードを即座に購入できます。

Instructions

Step 1: ユーザーに説明

以下を簡潔に説明してください:

  • Cashu は「ビットコインの電子マネー」です
  • Cashu Mint が Lightning 支払いを代行するため、支払い成功率が高くなります
  • 購入したいギフトカードの種類と金額を確認してください

利用可能な商品一覧を表示するには usebitcoin_list_products を呼び出してください。

Step 2: 残高確認

  1. cashu_get_balance で Cashu ecash 残高を確認
  2. 残高が不足している場合:
    • Cashu トークンを受け取る(cashu_receive_tokens — ユーザーにトークン文字列を貼ってもらう)
    • または cashu_create_invoice で Lightning invoice を発行し、外部 LN ウォレット (Phoenix, Wallet of Satoshi 等) で支払い → cashu_claim_invoice で ecash を受領

Step 3: Cashu チャージ(必要な場合)

Cashu 残高が不足している場合:

  1. 必要額を計算(購入金額の BTC 換算 + 手数料余裕 20%)
  2. cashu_create_invoice で Lightning invoice を発行し、外部 LN ウォレットで支払う、または cashu_receive_tokens でトークンを受け取る
  3. cashu_get_balance でチャージ完了を確認

Step 4: 購入実行

usebitcoin_buy_gift_card を呼び出します:

  • product: 商品タイプ("vpreca", "kyash", "quocard", "aupay", "dmm", "bitcash")
  • amount: 金額(JPY)

※ 内部で Cashu 経由の Lightning 支払いが自動的に使用されます

Step 5: 結果表示

購入結果を分かりやすく表示:

  • 取得したギフトコード
  • 支払った金額(sats)
  • Cashu 残高の変化
  • 注文 ID

V-Preca を購入した場合、購入したギフトコードと下4桁を表示したうえで、/vpreca-inquiry の動線に従って使い道(1: アプリにチャージ / 2: アカウントレスでカード番号を発行)を案内してください。アカウントレス発行は、ユーザー本人が照会ページで規約を確認・同意してコード入力するのが既定です。エージェントが規約同意を代行してカード情報を取得する vpreca_inquiry は、ユーザーが明示的に希望した場合のみ使用します。

商品カタログ

商品 product 利用可能額 (JPY) 用途
V-Preca ギフト vpreca 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 50000, 100000 Visa プリペイド(ネット決済)
Kyash ギフトコード kyash 500, 1000, 5000, 10000, 50000 Visa プリペイド(Kyash アプリ)
QUO カード Pay quocard 500, 1000, 3000, 5000, 10000 コンビニ・書店等
au PAY ギフト aupay 1000, 3000, 5000, 10000, 50000 au PAY 加盟店
DMM ポイント dmm 2000, 5000, 10000, 50000, 100000 DMM.com(8%割引あり)
ビットキャッシュ bitcash 1500, 3000, 5000, 10000, 50000 オンラインゲーム・電子書籍

エラー時の対応

  • Cashu 残高不足: トークン受取 or cashu_create_invoice での invoice 発行を提案
  • Mint 到達不可: 別の Cashu mint を試すか、サービス復旧を待つよう案内
  • 支払い上限超過: MAX_SPEND_JPY の値を確認するよう案内
  • コード抽出失敗: スクリーンショットを確認し手動対応を案内

Read the full file on GitHub · 66 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. 11d ago First seen · 66 lines · 0 tokens per session scan A 918ec4671594

Subscribe to this mod's changes

cashu-purchase is a command published in the GitHub repository cachet-jp/ln-agent-poc-v2 (4 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,115 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.