← Back to Skills Marketplace
egge21m

Cocod

by Egge · GitHub ↗ · v0.0.15 · MIT-0
cross-platform ✓ Security Clean
1999
Downloads
3
Stars
0
Active Installs
8
Versions
Install in OpenClaw
/install cocod
Description
A Cashu ecash wallet CLI for Bitcoin and Lightning payments. Use when managing Cashu tokens, sending/receiving payments via Lightning (bolt11) or ecash, hand...
README (SKILL.md)

Cocod - Cashu Wallet CLI

Cocod is a Cashu wallet for managing ecash tokens and making Bitcoin/Lightning payments. It uses the Cashu protocol for privacy-preserving ecash transactions.

If a web/API request returns HTTP 402 Payment Required with an X-Cashu header, use this skill to parse and settle the request with cocod.

Agent Safety Policy (Required)

When acting as an AGENT with this skill:

  • Always ask for explicit user permission before running any command/flow that can spend wallet funds, unless the user has already clearly instructed you to execute that spend action.
  • Prefer preview/inspection commands before execution whenever available. For example, run cocod x-cashu parse \x3Crequest> to inspect costs and requirements before cocod x-cashu handle \x3Crequest>.
  • Treat ~/.cocod as sensitive. Never log, print, or expose its contents (including config, mnemonic material, wallet state, sockets, and pid files) unless the user explicitly requests a specific safe subset.
  • Always surface issues and errors encountered while using the CLI or this skill. Do not hide failures behind partial success messaging.
  • Do not manually work around CLI issues, missing behavior, or unexpected command failures without explicit user permission.

What is Cashu?

Cashu is a Chaumian ecash protocol that lets you hold and transfer Bitcoin-backed tokens privately. It enables unlinkable transactions using blind signatures.

Installation

# Install cocod CLI
bun install -g cocod

Version Compatibility

This skill is version-pinned to an exact cocod CLI release.

  • metadata.skill_version must match the npm package version.
  • metadata.requires_cocod_version is pinned to that exact same version.

Check your installed CLI version:

cocod --version

If the version does not match the pinned values in this file, update cocod before using this skill.

Quick Start

# Initialize your wallet (generates mnemonic automatically)
cocod init

# Or with a custom mint
cocod init --mint-url https://mint.example.com

# Check balance
cocod balance

Commands

Core Wallet

# Check daemon and wallet status
cocod status

# Initialize wallet with optional mnemonic
cocod init [mnemonic] [--passphrase \x3Cpassphrase>] [--mint-url \x3Curl>]

# Unlock encrypted wallet (only required when initialised with passphrase)
cocod unlock \x3Cpassphrase>

# Get wallet balance
cocod balance

# Test daemon connection
cocod ping

Receiving Payments

# Receive Cashu token
cocod receive cashu \x3Ctoken>

# Create Lightning invoice to receive
cocod receive bolt11 \x3Camount> [--mint-url \x3Curl>]

Sending Payments

AGENT rule: commands in this section spend wallet funds. Ask for permission first unless the user already explicitly requested the spend action.

# Create Cashu token to send to someone
cocod send cashu \x3Camount> [--mint-url \x3Curl>]

# Pay a Lightning invoice
cocod send bolt11 \x3Cinvoice> [--mint-url \x3Curl>]

HTTP 402 Web Payments (NUT-24)

Use these commands when a server responds with HTTP 402 and an X-Cashu payment request.

AGENT rule: cocod x-cashu handle \x3Crequest> can spend funds. Prefer cocod x-cashu parse \x3Crequest> first to preview amount/requirements, then ask permission before handling unless already instructed.

# Parse an encoded X-Cashu request from a 402 response header
cocod x-cashu parse \x3Crequest>

# Settle the request and get an X-Cashu payment header value
cocod x-cashu handle \x3Crequest>

Typical flow:

  1. Read X-Cashu from the 402 response.
  2. Run cocod x-cashu parse \x3Crequest> to inspect amount and mint requirements.
  3. Run cocod x-cashu handle \x3Crequest> to generate payment token header value.
  4. Retry the original web request with returned X-Cashu: cashuB... header.

Mints

# Add a mint URL
cocod mints add \x3Curl>

# List configured mints
cocod mints list

# Get mint information
cocod mints info \x3Curl>

Lightning Address (NPC)

Lightning Addresses are email-style identifiers (like [email protected]) that let others pay you over Lightning. If you have not purchased a username, NPC provides a free address from your Nostr npub; purchasing a username gives you a human-readable handle. Buying a username is a two-step flow so you can review the required sats before confirming payment.

AGENT rule: cocod npc username \x3Cname> --confirm is a spend action. Ask permission before running --confirm unless already instructed.

# Get your NPC Lightning Address
cocod npc address

# Reserve/buy an NPC username (two-step)
cocod npc username \x3Cname>
cocod npc username \x3Cname> --confirm

History

# View wallet history
cocod history

# With pagination
cocod history --offset 0 --limit 20

# Watch for real-time updates
cocod history --watch

# Limit with watch
cocod history --limit 50 --watch

Daemon Control

# Start the background daemon (started automatically when not running when required)
cocod daemon

# Stop the daemon
cocod stop

Examples

Initialize with encryption:

cocod init --passphrase "my-secret"

Receive via Lightning:

cocod receive bolt11 5000
# Returns: lnbc50u1... (share this invoice to receive)

Pay a Lightning invoice:

cocod send bolt11 lnbc100u1p3w7j3...

Send Cashu to a friend:

cocod send cashu 1000
# Returns: cashuAeyJ0b2tlbiI6...
# Friend receives with: cocod receive cashu cashuAeyJ0b2tlbiI6...

Check status and balance:

cocod status
cocod balance

View recent history:

cocod history --limit 10

Concepts

  • Cashu: Privacy-preserving ecash protocol using blind signatures
  • Mint: Server that issues and redeems Cashu tokens
  • Token: Transferable Cashu string representing satoshi value
  • Bolt11: Lightning Network invoice format
  • NPC: Lightning Address service for receiving payments
  • Mnemonic: Seed phrase for wallet recovery
Usage Guidance
This skill is a set of instructions for using the cocod CLI — it itself doesn't include code or request credentials. Before installing/using: (1) ensure you install cocod from a trusted package source and the version matches the skill's pinned version; (2) understand that the agent will run local cocod commands which can spend funds — only allow spend actions with explicit user confirmation; (3) keep your ~/.cocod wallet files and mnemonic safe and verify the CLI binary (checksum/signature) if possible; (4) if you prefer, run the CLI in an isolated environment (container or dedicated machine) to limit blast radius.
Capability Analysis
Type: OpenClaw Skill Name: cocod Version: 0.0.15 The cocod skill bundle provides a wrapper for a Cashu ecash wallet CLI. The SKILL.md file contains explicit safety instructions for the AI agent, such as requiring user permission before executing financial transactions and protecting the sensitive ~/.cocod directory. No indicators of data exfiltration, malicious execution, or harmful prompt injection were found.
Capability Assessment
Purpose & Capability
Skill name/description match the instructions: all runtime actions are cocod CLI operations for managing Cashu ecash and Lightning payments. Nothing unrelated (e.g., cloud creds or unrelated system access) is requested.
Instruction Scope
SKILL.md confines the agent to running cocod commands and handling X-Cashu 402 flows. It explicitly marks wallet data (~/.cocod) as sensitive and requires explicit user permission before spending — no instructions ask the agent to read unrelated files or exfiltrate data.
Install Mechanism
The skill is instruction-only (no install spec). SKILL.md recommends installing the CLI via `bun install -g cocod`. That is reasonable but the registry metadata does not declare required binaries; the agent will need cocod (and bun/npm) available — verify you install cocod from a trusted source and that bun is appropriate for your environment.
Credentials
No env vars or credentials are declared, which matches the skill being a thin CLI wrapper. However, the skill operates on wallet data (~/.cocod) and can spend funds if commands are executed; access to that local wallet file is inherently sensitive and the SKILL.md appropriately warns about it.
Persistence & Privilege
The skill does not request permanent presence (always=false) and does not modify other skills or global agent settings. It relies on invoking the local cocod CLI when needed.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cocod
  3. After installation, invoke the skill by name or use /cocod
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.0.15
- Updated skill version and required cocod CLI version to 0.0.15 for compatibility. - Added new agent safety rules: always surface CLI errors and do not work around failures without user permission. - Clarified version pinning by referencing the `metadata` section instead of toplevel fields. - No functional or interface changes to commands or usage instructions.
v0.0.13
- Added a new Agent Safety Policy section with explicit rules for agents on spending actions and sensitive data handling. - Updated CLI command documentation to highlight when agent permission is required before spend actions. - Incremented version requirements: `skill_version` and `requires_cocod_version` are now `0.0.13`.
v0.0.12
- Added explicit version pinning with new fields: `skill_version` and `requires_cocod_version` (both set to 0.0.12). - Clarified that the skill requires an exact matching version of the cocod CLI. - Provided instructions for verifying and updating the cocod CLI version. - No changes to command usage or wallet functionality.
v0.0.11
Version 0.0.11 of cocod - No file changes detected in this release. - No updates or modifications to features, documentation, or functionality.
v0.0.10
Support for NUT-24 HTTP 402 X-Cashu payment flows and documentation improvements. - Added section describing how to handle HTTP 402 Payment Required responses with X-Cashu headers. - Documented new commands: cocod x-cashu parse and cocod x-cashu handle. - Updated compatibility description to note support for NUT-24 and HTTP 402 X-Cashu flows. - Improved usage instructions and clarified when to use new web payment functionality.
v0.0.9
Release v0.0.9
v0.0.8
Release v0.0.8
v0.0.6
- Added detailed documentation describing cocod as a Cashu wallet CLI for Bitcoin and Lightning payments. - Provided command usage examples for wallet initialization, Lightning payments, Cashu token transfers, mint management, and wallet history. - Explained key concepts such as Cashu, mints, tokens, Bolt11, NPC, and wallet mnemonics. - Listed compatibility requirements: cocod CLI installation, Cashu protocol, and Lightning Network support.
Metadata
Slug cocod
Version 0.0.15
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 8
Frequently Asked Questions

What is Cocod?

A Cashu ecash wallet CLI for Bitcoin and Lightning payments. Use when managing Cashu tokens, sending/receiving payments via Lightning (bolt11) or ecash, hand... It is an AI Agent Skill for Claude Code / OpenClaw, with 1999 downloads so far.

How do I install Cocod?

Run "/install cocod" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cocod free?

Yes, Cocod is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cocod support?

Cocod is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cocod?

It is built and maintained by Egge (@egge21m); the current version is v0.0.15.

💬 Comments