# Send Cashu to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "cashu",
    "name": "Cashu",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/a1denvalu3/cashu",
    "canonicalUrl": "https://clawhub.ai/a1denvalu3/cashu",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/cashu",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cashu",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "package.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "cashu",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T09:04:04.641Z",
      "expiresAt": "2026-05-08T09:04:04.641Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cashu",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cashu",
        "contentDisposition": "attachment; filename=\"cashu-0.19.6.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "cashu"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/cashu"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/cashu",
    "downloadUrl": "https://openagent3.xyz/downloads/cashu",
    "agentUrl": "https://openagent3.xyz/skills/cashu/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cashu/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cashu/agent.md"
  }
}
```
## Documentation

### Nutshell (Cashu CLI)

Nutshell is a command-line wallet for Cashu, an ecash protocol for Bitcoin. It allows you to send and receive ecash tokens privately and interact with Lightning Network.

### Installation

This skill requires the cashu CLI. Install it via pipx (recommended) or pip:

# Recommended (isolated environment)
pipx install cashu

# Alternative (system/user wide)
pip install cashu

Ensure the binary path is in your PATH.

### Environment Configuration (Required)

The CLI requires two environment variables to function correctly:

CASHU_DIR: Directory for wallet data (typically ~/.cashu).
MINT_URL (or MINT_HOST): The URL of the Cashu mint you want to use.

Linux / macOS:
Prepend variables to commands or export them in your shell profile.

# Per-command
CASHU_DIR=~/.cashu MINT_URL=https://mint.example.com cashu balance

# Persistent (add to ~/.bashrc or ~/.zshrc)
export CASHU_DIR=~/.cashu
export MINT_URL=https://mint.example.com

Windows (PowerShell):

$env:CASHU_DIR = "$HOME\\.cashu"
$env:MINT_URL = "https://mint.example.com"
cashu balance

### CLI Usage

All examples below assume CASHU_DIR and MINT_URL are set. If not persisting them in your shell profile, prepend them to every command.

Agent Tip: Always use the --yes (or -y) flag to skip interactive prompts and confirmations. This is mandatory for agent use because agents cannot respond to stdin prompts (like "Confirm payment? [y/N]"); omitting it will cause the command to hang and time out.

### Balance & Info

# Check wallet balance
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes balance

# Check pending tokens
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pending

# Get wallet info
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes info

# List wallets
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes wallets

### Sending & Receiving

Send Cashu tokens (ecash):

# Send amount (generates a token string to share)
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes send <amount>
# Example: CASHU_DIR=~/.cashu MINT_URL=https://8333.space:3338 cashu --yes send 100

Receive Cashu tokens:

# Receive a token string
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes receive <token_string>

### Lightning Network

Pay a Lightning Invoice (melt):

# Pay an invoice
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pay <bolt11_invoice>

Pay a Lightning Address (LNURL):

# Pay an LNURL/Lightning Address (automatically resolves the invoice)
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pay <user@domain.com> <amount_sats>
# Example: CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pay user@npubx.cash 100

Create a Lightning Invoice (mint):

# Create an invoice to receive funds into the wallet
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes invoice <amount>

### Lightning Address (LNURL)

Manage your Nostr Lightning Address (e.g., user@npubx.cash) to receive payments.

# Create (or display) your static Lightning Address
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes lnurl create

# Check for pending payments sent to your address
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes lnurl check

# Mint (claim) the pending payments
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes lnurl mint

### Paying Cashu 402s (Agentic Pattern)

Cashu-enabled APIs may return a 402 Payment Required error with a payment request in the X-Cashu header. This is common for metered APIs or paid endpoints.

The flow:

Make your HTTP request
If you get a 402 with X-Cashu: creqA... header, extract the payment request
(Optional) Decode it to check accepted mints: cashu decode <payment_request>
Pay it: cashu --yes pay <payment_request>
Get the token from the response
Retry the original request, including the token in the X-Cashu header

Mint compatibility: Payment requests may encode specific mints from which ecash is accepted. If you try to pay with a wallet backed by a mint not in the allowed list, it will error. Use cashu decode <creq> to see which mints are accepted before attempting payment.

Example:

# 1. Initial request (returns 402)
curl -s -i https://api.example.com/data

# Response includes:
# HTTP/1.1 402 Payment Required
# X-Cashu: creqA1...

# 2. Pay the payment request
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pay "creqA1..."

# Returns a token like: cashuA...

# 3. Retry with token
curl -s -H "X-Cashu: cashuA..." https://api.example.com/data

This pattern is agentic-friendly: handle 402 automatically, pay, retry — just like handling rate limits or auth redirects.

### Advanced

# Burn spent tokens
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes burn

# View all invoices
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes invoices

### Configuration

Nutshell uses a .env file inside CASHU_DIR for additional configuration.
If MINT_URL is not provided, it may default to a public test mint or fail. Always specify your trusted mint.

### Notes

Tokens are large strings starting with cashuA... (V3) or cashuB... (V4).
Ensure you back up your mnemonic if using significant funds (see cashu info).

### Contributing

Open issues or contribute at https://github.com/cashubtc/nutshell
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: a1denvalu3
- Version: 0.19.6
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-01T09:04:04.641Z
- Expires at: 2026-05-08T09:04:04.641Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/cashu)
- [Send to Agent page](https://openagent3.xyz/skills/cashu/agent)
- [JSON manifest](https://openagent3.xyz/skills/cashu/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/cashu/agent.md)
- [Download page](https://openagent3.xyz/downloads/cashu)