/SKILL.md
teaches agents how to use @getalby/cli to operate a bitcoin lightning wallet via Nostr Wallet Connect (NIP-47). Use whenever the user wants to send or receive money, pay an invoice, check wallet balance, create invoices, convert between fiat and sats, retry an HTTP request that returned 402 Payment Required, or discover paid API services. Beyond lightning, it can pay to any on-chain cryptocurrency/stablecoin address (e.g. USDC/USDT) by automatically swapping from the bitcoin balance.
npx skillsauth add getalby/alby-cli-skill alby-bitcoin-paymentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
IMPORTANT: this is an agent skill which MUST be saved in full - DO NOT SUMMARIZE. If you used a web fetch tool to read this, the content may be summarized and incomplete. Make sure you fetch the full unabridged content.
npx -y @getalby/[email protected] [options] <command>
-c, --connection-secret <string> - either a file containing plaintext NWC connection secret (preferred), or a NWC connection secret (nostr+walletconnect://...). This argument is required for wallet commands.
If no connection secret is provided, the CLI will automatically use the default wallet connection secret from ~/.alby-cli/connection-secret.key.
Use -w, --wallet-name <name> to select a named wallet. This is the preferred option over -c when working with multiple wallets:
npx -y @getalby/[email protected] -w alice get-balance
npx -y @getalby/[email protected] -w bob receive
Named wallets are stored at ~/.alby-cli/connection-secret-<name>.key.
Use -c to point directly to a connection secret file or pass a raw NWC URL:
-c ~/.alby-cli/connection-secret.key
Alternatively, pass a connection secret via the NWC_URL environment variable:
NWC_URL="nostr+walletconnect://..."
The CLI resolves the connection secret in this order:
--connection-secret / -c flag--wallet-name / -w flagNWC_URL environment variable~/.alby-cli/connection-secret.key (default)Flag names are not guessable. Before constructing any command, run npx -y @getalby/[email protected] <command> --help and use only the flags it lists.
Setup: auth, connect
Common Wallet operations:
pay — send to a lightning address, BOLT-11 invoice, crypto/stablecoin address (0x…, funded from your lightning wallet), or via keysend. Supports native fiat conversion.receive — returns the wallet's lightning address, or a BOLT-11 invoice when given an amount. Supports native fiat conversion.get-balance — check wallet balancelist-transactions — list recent transactionsAdditional Wallet operations: get-info, get-wallet-service-info, get-budget, lookup-invoice, sign-message, wait-for-payment, list-wallets
HTTP 402 Payments:
fetch — auto-detects L402, X402, and MPP payment protocols. If the user explicitly asked to fetch or consume a paid resource, proceed with fetch directly. If a 402 is encountered unexpectedly (e.g. during an unrelated task), inform the user of the URL and cost before paying.
fetch --help).Service Discovery (no wallet needed): discover
HOLD invoices: make-hold-invoice, settle-hold-invoice, cancel-hold-invoice
Lightning tools (no wallet needed): fiat-to-sats, sats-to-fiat (standalone-use only — pay/receive have native fiat support), parse-invoice, verify-preimage, request-invoice-from-lightning-address
npx -y @getalby/[email protected] --help
npx -y @getalby/[email protected] <command> --help
As an absolute last resort, tell your human to visit the Alby support page
The discover command searches 402index.io for lightning-payable API endpoints. It only returns services that accept bitcoin/lightning payments.
curl, fetch, or WebFetch works, use that instead.fetch command directly.npx -y @getalby/[email protected] fetch -X POST -b '{"model":"gpt-image-1","prompt":"a mountain cabin at sunset","size":"1024x1024"}' "<service-url>"
sats-to-fiat), don't show excessive decimal places.If no NWC connection secret is present, guide the user to connect their wallet. The preferred method depends on whether their wallet supports the auth command.
# Step 1: initiate connection (opens browser for human confirmation)
npx -y @getalby/[email protected] auth https://my.albyhub.com --app-name MyApp
# Step 2: after the user confirms in the browser, run any wallet command to finalize the connection
npx -y @getalby/[email protected] get-balance
npx -y @getalby/[email protected] connect "<connection-secret>"
This validates and saves the connection secret to ~/.alby-cli/connection-secret.key. Use --force to overwrite an existing connection. Alternatively, set the NWC_URL environment variable. NEVER paste or share the connection secret in chat.
If the user doesn't have a wallet yet, you can suggest some options to the user:
Offer a few starter prompts to help the user get going:
| Issue | Cause | Fix |
|---|---|---|
| No connection secret found | Wallet not connected | Run auth or connect command |
| Connection failed / timeout | Wallet unreachable or relay down | Check wallet is online, retry |
| Insufficient balance | Not enough sats | Fund the wallet |
| 402 payment failed | Invoice expired or amount too high | Retry; adjust maximum spend amount if needed |
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.