Skip to content
Back to skills

Lnbits

ASecurity

Manage LNbits Lightning Wallet (Balance, Pay, Invoice)

  • 21 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 7, 2026
securitypythonbashapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill lnbits --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lnbits?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lnbits
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-lnbits/badge)](https://www.skillsdirectory.com/skills/modbender-lnbits)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: lnbits
description: Manage LNbits Lightning Wallet (Balance, Pay, Invoice)
homepage: https://lnbits.com
metadata: {"clawdbot":{"emoji":"⚡","requires":{"bins":["python3"],"env":["LNBITS_API_KEY", "LNBITS_BASE_URL"]},"primaryEnv":"LNBITS_API_KEY"}}
---

# LNbits Wallet Manager

Enable the assistant to safely and effectively manage an LNbits Lightning Network wallet.

## 🛑 CRITICAL SECURITY PROTOCOLS 🛑

1.  **NEVER Expose Secrets**: Do NOT display Admin Keys, User IDs, or Wallet IDs.
2.  **Explicit Confirmation**: You MUST ask for "Yes/No" confirmation before paying.
    *   *Format*: "I am about to send **[Amount] sats** to **[Memo/Dest]**. Proceed? (y/n)"
3.  **Check Balance First**: Always call `balance` before `pay` to prevent errors.

## Usage

### 0. Setup / Create Wallet
If the user does not have an LNbits wallet, you can create one for them on the demo server.

```bash
python3 {baseDir}/scripts/lnbits_cli.py create --name "My Wallet"
```

**Action**:
1.  Run the command.
2.  Capture the `adminkey` (Admin Key) and `base_url` (defaults to https://demo.lnbits.com).
3.  **IMPORTANT**: Instruct the user to save these credentials securely:
    > "I've created a new wallet! Please add these to your Moltbot configuration or `.env` file:
    > `export LNBITS_BASE_URL=https://demo.lnbits.com`
    > `export LNBITS_API_KEY=<adminkey>`"

### 1. Check Balance
Get the current wallet balance in Satoshis.

```bash
python3 {baseDir}/scripts/lnbits_cli.py balance
```

### 2. Create Invoice (Receive)
Generate a Bolt11 invoice to receive funds.
*   **amount**: Amount in Satoshis (Integer).
*   **memo**: Optional description.

```bash
python3 {baseDir}/scripts/lnbits_cli.py invoice --amount 1000 --memo "Pizza"
```

### 3. Pay Invoice (Send)
**⚠️ REQUIRES CONFIRMATION**: Decode first, verify balance, ask user, then execute.

```bash
# Step 1: Decode to verify amount/memo
python3 {baseDir}/scripts/lnbits_cli.py decode <bolt11_string>

# Step 2: Pay (Only after user CONFIRMS)
python3 {baseDir}/scripts/lnbits_cli.py pay <bolt11_string>
```

## Error Handling
If the CLI returns a JSON error (e.g., `{"error": "Insufficient funds"}`), summarize it clearly for the user. Do not show raw stack traces.

Files in this skill

  • SKILL.md2.2 KB
  • scripts/lnbits_cli.py4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.