@bankofbots/skill 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/SKILL.md +330 -0
- package/index.js +11 -0
- package/install.js +17 -0
- package/package.json +27 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @bankofbots/skill
|
|
2
|
+
|
|
3
|
+
Bank of Bots skill file for AI agents. Provides `SKILL.md` — the full command reference for wallets, payments, transfers, credit scoring, and more via the BOB API.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @bankofbots/skill
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Postinstall prints the path to `SKILL.md` and copy instructions for your platform.
|
|
12
|
+
|
|
13
|
+
## Activate
|
|
14
|
+
|
|
15
|
+
Copy `SKILL.md` to your agent's skill directory:
|
|
16
|
+
|
|
17
|
+
**Claude Code**
|
|
18
|
+
```bash
|
|
19
|
+
mkdir -p .claude/skills/bankofbots
|
|
20
|
+
cp node_modules/@bankofbots/skill/SKILL.md .claude/skills/bankofbots/SKILL.md
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**OpenClaw**
|
|
24
|
+
```bash
|
|
25
|
+
mkdir -p ~/.openclaw/skills/bankofbots
|
|
26
|
+
cp node_modules/@bankofbots/skill/SKILL.md ~/.openclaw/skills/bankofbots/SKILL.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Programmatic use
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
const { skillPath, content } = require('@bankofbots/skill');
|
|
33
|
+
// skillPath — absolute path to SKILL.md
|
|
34
|
+
// content — SKILL.md contents as a string
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Links
|
|
38
|
+
|
|
39
|
+
- [Bank of Bots](https://bankofbots.ai)
|
|
40
|
+
- [Dashboard](https://app.bankofbots.ai)
|
|
41
|
+
- [API Docs](https://app.bankofbots.ai/api/skill/bankofbots)
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bankofbots
|
|
3
|
+
description: Autonomous agent banking — wallets, payments, transfers, and spend policies via the Bank of Bots CLI
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You have access to `bob`, the Bank of Bots CLI for managing agent wallets, payments, and transactions. Requires `BOB_API_KEY` environment variable to be set. Optionally set `BOB_API_URL` to point to a custom backend.
|
|
7
|
+
|
|
8
|
+
All commands output structured JSON with an `ok` field and `next_actions` that suggest follow-up commands.
|
|
9
|
+
|
|
10
|
+
**Supported rails: `lightning` and `onchain` (BTC only).** USD and USDC rails are not available.
|
|
11
|
+
|
|
12
|
+
## Core concepts
|
|
13
|
+
|
|
14
|
+
- **Agent**: An AI agent with its own identity, wallets, and spending policies
|
|
15
|
+
- **Wallet**: Holds a BTC balance on a specific rail (lightning or onchain)
|
|
16
|
+
- **Policy**: Spend limits, rate limits, and kill switches that constrain agent behavior
|
|
17
|
+
- **Transaction**: A record of money moving in or out of a wallet
|
|
18
|
+
- **Service Gate**: A priced action that callers unlock by presenting a completed payment intent
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
### Check your identity
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bob auth me
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Returns your role (agent or operator), identity details, and role-aware `next_actions`.
|
|
29
|
+
|
|
30
|
+
### Agent details and wallet balances
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
bob agent get <agent-id>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Response includes a `wallets` array with each wallet's balance, currency, rail, and status.
|
|
37
|
+
|
|
38
|
+
### Wallet management
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# List wallets for an agent
|
|
42
|
+
bob wallet list <agent-id>
|
|
43
|
+
|
|
44
|
+
# Get/set wallet budget (sats)
|
|
45
|
+
bob wallet budget get <agent-id> --wallet-id <id>
|
|
46
|
+
bob wallet budget set <agent-id> --wallet-id <id> --amount <sats>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`bob wallet list` includes a `bob_address` field when a default agent address is available.
|
|
50
|
+
|
|
51
|
+
### One-shot send (auto-quote + execute)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
bob send <agent-id> <destination> --amount <sats> [--currency BTC]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Destination is auto-detected:
|
|
58
|
+
- `jade@bankofbots.ai` → routes as `bob_address` (BTC)
|
|
59
|
+
- `lnbc...` → Lightning invoice
|
|
60
|
+
- `bc1.../tb1...` → on-chain BTC address
|
|
61
|
+
|
|
62
|
+
| Flag | Description |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `--amount` | Required. Satoshis |
|
|
65
|
+
| `--priority` | cheapest, fastest, or balanced (default: balanced) |
|
|
66
|
+
| `--description` | Optional payment note |
|
|
67
|
+
| `--max-fee` | Maximum acceptable fee in sats |
|
|
68
|
+
| `--rail` | Pin to lightning or onchain |
|
|
69
|
+
| `--destination-type` | Override auto-detection: `raw` or `bob_address` |
|
|
70
|
+
|
|
71
|
+
Quotes then executes in one step. Returns `intent_id`, `payment_id`, and `quote_summary`. On failure, `next_actions` includes exact recovery commands.
|
|
72
|
+
|
|
73
|
+
### CLI config introspection
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Show active api_url, platform, config file path and source (env/config/default)
|
|
77
|
+
bob config show
|
|
78
|
+
|
|
79
|
+
# Update a single config value without re-init
|
|
80
|
+
bob config set api-url <url>
|
|
81
|
+
bob config set platform <generic|openclaw|claude>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Record a transaction (spend from your wallet)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bob tx record <agent-id> --amount <sats> --currency BTC
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
| Flag | Description |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `--amount` | Required. Satoshis |
|
|
93
|
+
| `--currency` | BTC (only supported currency) |
|
|
94
|
+
| `--rail` | lightning or onchain (default: auto) |
|
|
95
|
+
| `--endpoint` | Target endpoint or merchant identifier |
|
|
96
|
+
| `--wallet-id` | Specific wallet to debit (auto-selected if omitted) |
|
|
97
|
+
|
|
98
|
+
### Transfer BTC to another agent
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
bob tx transfer <from-agent-id> --to-agent-id <to-agent-id> --amount <sats> --currency BTC
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
| Flag | Description |
|
|
105
|
+
|---|---|
|
|
106
|
+
| `--to-agent-id` | Required. Destination agent ID |
|
|
107
|
+
| `--amount` | Required. Satoshis |
|
|
108
|
+
| `--description` | Optional note |
|
|
109
|
+
|
|
110
|
+
### Quote and execute payments (intent workflow)
|
|
111
|
+
|
|
112
|
+
The intent workflow quotes routes before executing, giving you visibility into fees, ETAs, and available rails.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Quote routes for a payment
|
|
116
|
+
bob intent quote <agent-id> --amount <sats> --destination-type raw --destination-ref <lnbc...|bc1...>
|
|
117
|
+
|
|
118
|
+
# Execute a quoted intent (uses best quote by default)
|
|
119
|
+
bob intent execute <agent-id> <intent-id> [--quote-id <id>]
|
|
120
|
+
|
|
121
|
+
# Check intent status and route details
|
|
122
|
+
bob intent get <agent-id> <intent-id>
|
|
123
|
+
|
|
124
|
+
# List recent intents
|
|
125
|
+
bob intent list <agent-id>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
| Flag | Description |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `--amount` | Required. Satoshis |
|
|
131
|
+
| `--destination-type` | `raw` or `bob_address` |
|
|
132
|
+
| `--destination-ref` | Lightning invoice, on-chain address, or `alias@bankofbots.ai` |
|
|
133
|
+
| `--priority` | `cheapest`, `fastest`, or `balanced` (default: balanced) |
|
|
134
|
+
| `--execution-mode` | `auto` or `pinned` (default: auto) |
|
|
135
|
+
| `--rail` | Pin to `lightning` or `onchain` |
|
|
136
|
+
| `--wallet-id` | Pin to a specific wallet |
|
|
137
|
+
| `--max-fee` | Maximum acceptable fee in sats |
|
|
138
|
+
|
|
139
|
+
### Non-custodial proof submission
|
|
140
|
+
|
|
141
|
+
Submit proof of BTC payment to verify settlement and build your BOB Score:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# On-chain transaction proof
|
|
145
|
+
bob intent submit-proof <agent-id> <intent-id> --txid <txid>
|
|
146
|
+
|
|
147
|
+
# Lightning payment hash proof
|
|
148
|
+
bob intent submit-proof <agent-id> <intent-id> --payment-hash <hash>
|
|
149
|
+
|
|
150
|
+
# Lightning preimage proof (strongest verification)
|
|
151
|
+
bob intent submit-proof <agent-id> <intent-id> --preimage <hex> --proof-ref <payment-hash>
|
|
152
|
+
|
|
153
|
+
# With optional BOLT11 invoice for amount verification
|
|
154
|
+
bob intent submit-proof <agent-id> <intent-id> --preimage <hex> --proof-ref <payment-hash> --invoice <lnbc...>
|
|
155
|
+
|
|
156
|
+
# Historical proof import for credit building
|
|
157
|
+
bob agent credit-import <agent-id> --preimage <hex> --proof-ref <payment-hash> --amount <sats> --direction inbound --invoice <lnbc...>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
| Proof Type | Description |
|
|
161
|
+
|---|---|
|
|
162
|
+
| `btc_onchain_tx` | On-chain transaction ID |
|
|
163
|
+
| `btc_lightning_payment_hash` | Lightning payment hash |
|
|
164
|
+
| `btc_lightning_preimage` | Lightning preimage (SHA256 verified against payment hash, strongest proof) |
|
|
165
|
+
|
|
166
|
+
### Query history
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Transactions
|
|
170
|
+
bob tx list <agent-id> --status complete --direction outbound --limit 10
|
|
171
|
+
|
|
172
|
+
# Transfers
|
|
173
|
+
bob tx transfers <agent-id>
|
|
174
|
+
|
|
175
|
+
# Spend summary
|
|
176
|
+
bob spend list <agent-id>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### View policies
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
bob policy list <agent-id>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Agent credit score and history
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# View credit score, tier, and effective policy limits
|
|
189
|
+
bob agent credit <agent-id>
|
|
190
|
+
|
|
191
|
+
# View credit event timeline
|
|
192
|
+
bob agent credit-events <agent-id> [--limit 50] [--offset 0]
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The BOB Score runs from 0–1000. New operators start at **350**. Tiers: **Legendary** (925+), **Elite** (800+), **Trusted** (650+, 1.5x limits), **Established** (500+, 1.2x limits), **Verified** (400+, 1.0x limits), **New** (300+, 1.0x limits), **Unverified** (150+, 0.6x limits), **Blacklisted** (0+, 0.6x limits). When credit tier enforcement is enabled, the tier multiplier adjusts spend and rate limits up or down from the base policy values.
|
|
196
|
+
|
|
197
|
+
### Agent routing profile (autonomous rail preference)
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Inspect current weighting and preferred rail order
|
|
201
|
+
bob agent routing-profile <agent-id>
|
|
202
|
+
|
|
203
|
+
# Update balanced-scoring weights + preferred rails
|
|
204
|
+
bob agent routing-profile set <agent-id> \
|
|
205
|
+
--cost-weight 0.6 \
|
|
206
|
+
--eta-weight 0.4 \
|
|
207
|
+
--reliability-weight 0.2 \
|
|
208
|
+
--liquidity-weight 0.1 \
|
|
209
|
+
--preferred-btc lightning,onchain
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Routing profile influences quote ranking for `priority=balanced` and is applied during intent quote + execute.
|
|
213
|
+
|
|
214
|
+
### Agent webhooks and event stream
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Create/list/get/update/delete webhooks scoped to one agent
|
|
218
|
+
bob agent webhooks create <agent-id> --url https://example.com/hook --events payment_intent.complete,payment.failed
|
|
219
|
+
bob agent webhooks list <agent-id>
|
|
220
|
+
bob agent webhooks get <agent-id> <webhook-id>
|
|
221
|
+
bob agent webhooks update <agent-id> <webhook-id> --active true
|
|
222
|
+
bob agent webhooks delete <agent-id> <webhook-id>
|
|
223
|
+
|
|
224
|
+
# Pull recent agent events (paginated)
|
|
225
|
+
bob agent events <agent-id> --limit 30 --offset 0
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Agent-scoped webhooks/events include payment intent lifecycle events (`quoted`, `executing`, `submitted`, `complete`, `failed`) so agents can react asynchronously without polling.
|
|
229
|
+
|
|
230
|
+
### Operator credit controls
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# View current operator credit posture
|
|
234
|
+
bob operator credit summary
|
|
235
|
+
|
|
236
|
+
# Force snapshot recompute
|
|
237
|
+
bob operator credit refresh
|
|
238
|
+
|
|
239
|
+
# Toggle runtime enforcement of credit tier multipliers
|
|
240
|
+
bob operator credit enforcement set --enabled=true
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Operator payment addresses
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# Create and inspect address aliases
|
|
247
|
+
bob address create --handle ops
|
|
248
|
+
bob address list
|
|
249
|
+
|
|
250
|
+
# Bind destination endpoints
|
|
251
|
+
bob address add-endpoint <address-id> --currency BTC --rail lightning --destination-type raw --destination-ref <lnbc...>
|
|
252
|
+
|
|
253
|
+
# Enable/disable a bound endpoint
|
|
254
|
+
bob address set-endpoint-status <address-id> <endpoint-id> --status disabled
|
|
255
|
+
|
|
256
|
+
# Resolve live routing capabilities
|
|
257
|
+
bob address resolve --address ops@bankofbots.ai --currency BTC
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Service gates (pay-to-access)
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Create a priced gate (agent must have a payment address)
|
|
264
|
+
bob gate create <agent-id> --name "premium-api" --price 1000 --currency BTC
|
|
265
|
+
|
|
266
|
+
# List active gates
|
|
267
|
+
bob gate list <agent-id>
|
|
268
|
+
|
|
269
|
+
# Get gate details
|
|
270
|
+
bob gate get <agent-id> <gate-id>
|
|
271
|
+
|
|
272
|
+
# Disable/re-enable a gate
|
|
273
|
+
bob gate update <agent-id> <gate-id> --status disabled
|
|
274
|
+
|
|
275
|
+
# Unlock a gate (caller presents a completed payment intent targeting the gate owner)
|
|
276
|
+
bob gate unlock <owner-agent-id> <gate-id> --intent-id <payment-intent-id>
|
|
277
|
+
|
|
278
|
+
# View unlock history
|
|
279
|
+
bob gate unlocks <agent-id> <gate-id>
|
|
280
|
+
|
|
281
|
+
# List gates this agent has unlocked as a caller
|
|
282
|
+
bob gate my-unlocks <agent-id>
|
|
283
|
+
|
|
284
|
+
# Discover another agent's active gates
|
|
285
|
+
bob gate discover <agent-id>
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
| Flag | Description |
|
|
289
|
+
|---|---|
|
|
290
|
+
| `--name` | Required. Human-readable gate name |
|
|
291
|
+
| `--price` | Required. Minimum payment amount in sats |
|
|
292
|
+
| `--currency` | BTC |
|
|
293
|
+
| `--intent-id` | Required for unlock. Completed payment intent ID |
|
|
294
|
+
| `--status` | For update: active or disabled |
|
|
295
|
+
|
|
296
|
+
## Output format
|
|
297
|
+
|
|
298
|
+
Every command returns JSON with this structure:
|
|
299
|
+
|
|
300
|
+
```json
|
|
301
|
+
{
|
|
302
|
+
"ok": true,
|
|
303
|
+
"command": "bob tx record",
|
|
304
|
+
"data": { ... },
|
|
305
|
+
"next_actions": [
|
|
306
|
+
{
|
|
307
|
+
"command": "bob tx list <agent-id>",
|
|
308
|
+
"description": "View transaction history"
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Always check `ok` before using `data`. When `ok` is false, `data.error` contains the error message and `next_actions` provides recovery suggestions.
|
|
315
|
+
|
|
316
|
+
## Error recovery
|
|
317
|
+
|
|
318
|
+
When `ok` is false, `next_actions` provides context-aware recovery suggestions. Key patterns:
|
|
319
|
+
|
|
320
|
+
1. **Kill switch active**: STOP all transactions immediately. Run `bob policy list <agent-id>` to confirm.
|
|
321
|
+
2. **Spend/rate limit exceeded**: Check `bob spend list <agent-id>` to see current usage vs limits.
|
|
322
|
+
3. **Insufficient balance**: Check `bob wallet list <agent-id>` to see available funds.
|
|
323
|
+
4. **403 Forbidden**: Check `bob auth me` to verify your identity and role.
|
|
324
|
+
|
|
325
|
+
## Important rules
|
|
326
|
+
|
|
327
|
+
1. **Amounts** are always in satoshis (BTC).
|
|
328
|
+
2. **Policies** set by your operator constrain your spending. If a transaction is denied, `data.error` explains why. Do not retry denied transactions without changing the parameters.
|
|
329
|
+
3. **Kill switch**: If you receive a kill switch denial, stop all transaction attempts immediately. The operator has frozen your spending.
|
|
330
|
+
4. **next_actions**: Every response includes suggested follow-up commands. Use them to discover what to do next.
|
package/index.js
ADDED
package/install.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Postinstall: print copy instructions for supported agent platforms.
|
|
3
|
+
// Does not auto-write files — agents/operators choose where to place the skill.
|
|
4
|
+
|
|
5
|
+
if (process.env.npm_config_loglevel === "silent") process.exit(0);
|
|
6
|
+
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const skillPath = path.join(__dirname, "SKILL.md");
|
|
9
|
+
|
|
10
|
+
console.log("\n@bankofbots/skill installed.");
|
|
11
|
+
console.log("Skill file: " + skillPath);
|
|
12
|
+
console.log("\nTo activate for your platform, copy SKILL.md to:");
|
|
13
|
+
console.log(" Claude Code : .claude/skills/bankofbots/SKILL.md");
|
|
14
|
+
console.log(" OpenClaw : ~/.openclaw/skills/bankofbots/SKILL.md");
|
|
15
|
+
console.log("\nOr read it programmatically:");
|
|
16
|
+
console.log(' require("@bankofbots/skill") // returns { skillPath, content }');
|
|
17
|
+
console.log("");
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bankofbots/skill",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Bank of Bots skill file for AI agents (Claude Code, OpenClaw, and compatible platforms)",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"SKILL.md",
|
|
8
|
+
"README.md",
|
|
9
|
+
"index.js",
|
|
10
|
+
"install.js"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"postinstall": "node install.js"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"bankofbots",
|
|
17
|
+
"claude-code",
|
|
18
|
+
"openclaw",
|
|
19
|
+
"agent",
|
|
20
|
+
"skill",
|
|
21
|
+
"payments"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18.0.0"
|
|
26
|
+
}
|
|
27
|
+
}
|