clawpowers 1.1.2 โ 1.1.4
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 +197 -313
- package/bin/clawpowers.js +29 -13
- package/docs/quickstart-first-transaction.md +204 -0
- package/package.json +7 -3
- package/runtime/demo/README.md +78 -0
- package/runtime/demo/x402-mock-server.js +1 -1
- package/runtime/init.sh +1 -1
- package/runtime/payments/pipeline.js +455 -0
- package/skill.json +26 -5
- package/skills/agent-bounties/SKILL.md +553 -0
- package/skills/prospecting/SKILL.md +141 -0
- package/skills/using-clawpowers/SKILL.md +6 -1
- package/skills/validator/SKILL.md +281 -0
package/README.md
CHANGED
|
@@ -1,403 +1,287 @@
|
|
|
1
1
|
# ๐ฆ ClawPowers
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
> **v1.1.3** ยท 26 skills ยท 372 tests ยท MIT ยท **Patent Pending**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Your agent needs to pay for APIs. ClawPowers makes that work.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
When your agent hits a premium API and gets back HTTP 402 Payment Required, it needs to pay and retry โ automatically, within limits you set, with your approval before anything moves. That's the core problem ClawPowers solves. The other 25 skills are a bonus.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## The Pay-to-Complete Flow
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
```
|
|
12
|
+
Agent calls API
|
|
13
|
+
โ
|
|
14
|
+
โผ
|
|
15
|
+
HTTP 402 โโโ "Payment required: $0.50 USDC"
|
|
16
|
+
โ
|
|
17
|
+
โผ
|
|
18
|
+
ClawPowers evaluates:
|
|
19
|
+
โข Is this within your spend cap? ($5/tx limit โ โ
)
|
|
20
|
+
โข Is this on the allowlist? (api.example.com โ โ
)
|
|
21
|
+
โข Human approval required? (under $1 threshold โ auto)
|
|
22
|
+
โ
|
|
23
|
+
โผ
|
|
24
|
+
Payment sent โ API retried โ Result returned
|
|
25
|
+
โ
|
|
26
|
+
โผ
|
|
27
|
+
Outcome logged (for RSI analysis)
|
|
28
|
+
```
|
|
12
29
|
|
|
13
|
-
##
|
|
30
|
+
## Quick Start
|
|
14
31
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
| Self-improvement (RSI) | โ
| โ |
|
|
21
|
-
| Outcome tracking & metrics | โ
| โ |
|
|
22
|
-
| Agent payments (x402) | โ
| โ |
|
|
23
|
-
| Security scanning | โ
| โ |
|
|
24
|
-
| Content pipeline | โ
| โ |
|
|
25
|
-
| Market intelligence | โ
| โ |
|
|
26
|
-
| Resumable workflows | โ
| โ |
|
|
27
|
-
| Windows native support | โ
| โ |
|
|
28
|
-
| Zero dependencies | โ
| โ
|
|
|
32
|
+
```bash
|
|
33
|
+
npx clawpowers init # Set up ~/.clawpowers/ runtime
|
|
34
|
+
npx clawpowers demo x402 # See the full 402 โ pay โ 200 flow (no real money)
|
|
35
|
+
npx clawpowers status # Check what's running
|
|
36
|
+
```
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
## Human-Approval Mode (the default)
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
ClawPowers defaults to supervised payments โ your agent proposes, you approve. No funds move until you say so.
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
```typescript
|
|
43
|
+
import { createX402Client } from 'agentwallet-sdk';
|
|
44
|
+
import { createWallet, setSpendPolicy } from 'agentwallet-sdk';
|
|
45
|
+
import { createWalletClient, http } from 'viem';
|
|
46
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
47
|
+
import { base } from 'viem/chains';
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);
|
|
50
|
+
const walletClient = createWalletClient({ account, chain: base, transport: http() });
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
const wallet = createWallet({
|
|
53
|
+
accountAddress: process.env.AGENT_WALLET_ADDRESS as `0x${string}`,
|
|
54
|
+
chain: 'base',
|
|
55
|
+
walletClient,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Spend policy โ enforced on-chain, not in application code
|
|
59
|
+
await setSpendPolicy(wallet, {
|
|
60
|
+
token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC on Base
|
|
61
|
+
perTxLimit: 1_000_000n, // $1 auto-approved per transaction
|
|
62
|
+
periodLimit: 10_000_000n, // $10/day hard cap
|
|
63
|
+
periodLength: 86400,
|
|
64
|
+
});
|
|
42
65
|
|
|
43
|
-
|
|
66
|
+
const x402 = createX402Client(wallet, {
|
|
67
|
+
supportedNetworks: ['base:8453'],
|
|
68
|
+
globalDailyLimit: 10_000_000n, // matches spend policy
|
|
69
|
+
globalPerRequestMax: 1_000_000n, // $1 per request
|
|
70
|
+
requireApproval: true, // human-in-the-loop mode (default)
|
|
71
|
+
});
|
|
44
72
|
|
|
45
|
-
|
|
46
|
-
|
|
73
|
+
// Agent hits a paid API
|
|
74
|
+
const response = await x402.fetch('https://api.example.com/premium-data');
|
|
75
|
+
// If cost < $1: auto-approved and paid
|
|
76
|
+
// If cost > $1: queued โ you get a notification to approve or reject
|
|
77
|
+
const data = await response.json();
|
|
47
78
|
```
|
|
48
79
|
|
|
49
|
-
|
|
80
|
+
## Simulation Mode
|
|
50
81
|
|
|
51
|
-
|
|
82
|
+
Test the full payment flow before enabling live payments.
|
|
52
83
|
|
|
53
84
|
```bash
|
|
54
|
-
|
|
85
|
+
# Run a local mock x402 merchant โ full 402 โ pay โ 200 cycle
|
|
86
|
+
npx clawpowers demo x402
|
|
55
87
|
```
|
|
56
88
|
|
|
57
|
-
|
|
89
|
+
In code:
|
|
58
90
|
|
|
59
|
-
```
|
|
60
|
-
|
|
91
|
+
```typescript
|
|
92
|
+
const x402 = createX402Client(wallet, {
|
|
93
|
+
supportedNetworks: ['base:8453'],
|
|
94
|
+
globalDailyLimit: 10_000_000n,
|
|
95
|
+
globalPerRequestMax: 1_000_000n,
|
|
96
|
+
dryRun: true, // logs exactly what would happen, no funds move
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const response = await x402.fetch('https://api.example.com/premium-data');
|
|
100
|
+
// Response includes: { simulated: true, wouldHavePaid: '0.50 USDC', withinLimits: true }
|
|
61
101
|
```
|
|
62
102
|
|
|
63
|
-
|
|
103
|
+
## Explicit Spend Caps
|
|
64
104
|
|
|
65
|
-
|
|
105
|
+
Caps are enforced by smart contract, not application code. Even a prompt injection or jailbreak can't bypass them.
|
|
66
106
|
|
|
67
|
-
```bash
|
|
68
|
-
/plugin install clawpowers@claude-plugins-official
|
|
69
107
|
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
/plugin marketplace add up2itnow0822/clawpowers-marketplace
|
|
75
|
-
/plugin install clawpowers@clawpowers-marketplace
|
|
108
|
+
Agent wants to spend $0.50 โ โ
Auto-approved (under $1/tx cap)
|
|
109
|
+
Agent wants to spend $5.00 โ โณ Queued for your approval
|
|
110
|
+
Agent spent $9.00 today โ ๐ Next tx blocked ($10/day cap hit)
|
|
76
111
|
```
|
|
77
112
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
113
|
+
```bash
|
|
114
|
+
# Check what your agent has spent
|
|
115
|
+
npx clawpowers store get agent-payments:daily-total
|
|
116
|
+
# โ "2.50 USDC spent today, $7.50 remaining"
|
|
81
117
|
|
|
82
|
-
|
|
83
|
-
|
|
118
|
+
# Review and approve queued payments
|
|
119
|
+
npx clawpowers payments queue
|
|
120
|
+
# โ [1] $5.00 USDC โ api.example.com/premium-report โ approve? (y/n)
|
|
84
121
|
```
|
|
85
122
|
|
|
86
|
-
|
|
123
|
+
## Why Supervised, Not Autonomous
|
|
87
124
|
|
|
88
|
-
|
|
125
|
+
Fully autonomous agent payments sound great until an agent in a loop runs up $500 in API calls overnight. ClawPowers is built around three constraints:
|
|
89
126
|
|
|
90
|
-
|
|
127
|
+
1. **Caps enforced on-chain** โ the agent *cannot* exceed them, full stop
|
|
128
|
+
2. **Human approval by default** โ auto-approve only below thresholds you set
|
|
129
|
+
3. **Full audit trail** โ every payment logged at `~/.clawpowers/metrics/`
|
|
91
130
|
|
|
92
|
-
|
|
93
|
-
Fetch and follow instructions from https://raw.githubusercontent.com/up2itnow0822/clawpowers/main/.codex/INSTALL.md
|
|
94
|
-
```
|
|
131
|
+
When you've verified the agent behaves correctly, raise the auto-approve threshold. Start low.
|
|
95
132
|
|
|
96
|
-
|
|
133
|
+
## Installation
|
|
97
134
|
|
|
98
|
-
|
|
135
|
+
### Universal (Windows, macOS, Linux)
|
|
99
136
|
|
|
100
|
-
```
|
|
101
|
-
|
|
137
|
+
```bash
|
|
138
|
+
npx clawpowers init
|
|
102
139
|
```
|
|
103
140
|
|
|
104
|
-
###
|
|
141
|
+
### OpenClaw
|
|
105
142
|
|
|
106
143
|
```bash
|
|
107
|
-
|
|
144
|
+
openclaw skills install clawpowers
|
|
145
|
+
# or from GitHub
|
|
146
|
+
openclaw skills install github:up2itnow0822/clawpowers
|
|
108
147
|
```
|
|
109
148
|
|
|
110
|
-
###
|
|
149
|
+
### Claude Code
|
|
111
150
|
|
|
112
151
|
```bash
|
|
113
|
-
|
|
114
|
-
cd clawpowers
|
|
115
|
-
node bin/clawpowers.js init # Windows, macOS, Linux
|
|
116
|
-
# or
|
|
117
|
-
bash bin/clawpowers.sh init # macOS, Linux only
|
|
152
|
+
/plugin install clawpowers@claude-plugins-official
|
|
118
153
|
```
|
|
119
154
|
|
|
120
|
-
###
|
|
121
|
-
|
|
122
|
-
Start a new session in your chosen platform and ask for something that triggers a skill โ for example, "help me plan this feature" or "let's debug this issue." The agent should automatically apply the relevant ClawPowers skill.
|
|
123
|
-
|
|
124
|
-
Check runtime status anytime:
|
|
155
|
+
### Cursor
|
|
125
156
|
|
|
126
|
-
```
|
|
127
|
-
|
|
157
|
+
```text
|
|
158
|
+
/add-plugin clawpowers
|
|
128
159
|
```
|
|
129
160
|
|
|
130
|
-
|
|
161
|
+
### Codex / OpenCode
|
|
131
162
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
163
|
+
```text
|
|
164
|
+
Fetch and follow instructions from https://raw.githubusercontent.com/up2itnow0822/clawpowers/main/.codex/INSTALL.md
|
|
165
|
+
```
|
|
135
166
|
|
|
136
|
-
|
|
137
|
-
- The **systematic-debugging** skill doesn't just list debugging steps โ it maintains a persistent hypothesis tree across sessions so you never re-investigate the same dead end
|
|
138
|
-
- The **verification-before-completion** skill doesn't just say "verify" โ it runs the actual verification suite and blocks completion until it passes
|
|
167
|
+
### Manual
|
|
139
168
|
|
|
140
|
-
|
|
169
|
+
```bash
|
|
170
|
+
git clone https://github.com/up2itnow0822/clawpowers.git
|
|
171
|
+
cd clawpowers
|
|
172
|
+
node bin/clawpowers.js init
|
|
173
|
+
```
|
|
141
174
|
|
|
142
|
-
|
|
175
|
+
## All 26 Skills
|
|
176
|
+
|
|
177
|
+
### Core Development (14)
|
|
178
|
+
|
|
179
|
+
| Skill | What It Does |
|
|
180
|
+
|-------|-------------|
|
|
181
|
+
| `subagent-driven-development` | Orchestrate parallel subagents โ persistent execution DB, resumable checkpoints |
|
|
182
|
+
| `test-driven-development` | RED-GREEN-REFACTOR with mutation analysis to verify tests actually catch bugs |
|
|
183
|
+
| `writing-plans` | Spec โ implementation plan with historical estimation and dependency validation |
|
|
184
|
+
| `executing-plans` | Execute plans with interruption recovery and milestone tracking |
|
|
185
|
+
| `brainstorming` | Structured ideation with cross-session idea persistence |
|
|
186
|
+
| `systematic-debugging` | Persistent hypothesis tree so you never re-investigate the same dead end |
|
|
187
|
+
| `verification-before-completion` | Pre-merge quality gates that actually run the verification suite |
|
|
188
|
+
| `finishing-a-development-branch` | Branch cleanup, changelog, merge prep |
|
|
189
|
+
| `requesting-code-review` | Reviewer match scoring, review history |
|
|
190
|
+
| `receiving-code-review` | Feedback pattern tracking, common issues database |
|
|
191
|
+
| `using-git-worktrees` | Isolated branch development with conflict prediction |
|
|
192
|
+
| `using-clawpowers` | Meta-skill: how to use ClawPowers |
|
|
193
|
+
| `writing-skills` | Create new skills via TDD with quality scoring |
|
|
194
|
+
| `dispatching-parallel-agents` | Fan-out with load balancing, failure isolation, result aggregation |
|
|
195
|
+
|
|
196
|
+
### Extended Capabilities (6)
|
|
197
|
+
|
|
198
|
+
| Skill | What It Does |
|
|
199
|
+
|-------|-------------|
|
|
200
|
+
| `agent-payments` | x402 payment protocol โ supervised, capped, human-in-the-loop by default |
|
|
201
|
+
| `security-audit` | Automated vulnerability scanning (Trivy, gitleaks, npm audit) |
|
|
202
|
+
| `content-pipeline` | Write โ humanize โ format โ publish with platform-specific formatting |
|
|
203
|
+
| `learn-how-to-learn` | Metacognitive protocols, anti-pattern detection, confidence calibration |
|
|
204
|
+
| `market-intelligence` | Competitive research, trend detection, opportunity scoring |
|
|
205
|
+
| `prospecting` | Lead generation, contact enrichment, CRM sync (Exa + Apollo) |
|
|
206
|
+
|
|
207
|
+
### RSI Intelligence Layer (4)
|
|
208
|
+
|
|
209
|
+
Skills that require runtime execution and persistent state โ not available in static frameworks.
|
|
210
|
+
|
|
211
|
+
| Skill | What It Does |
|
|
212
|
+
|-------|-------------|
|
|
213
|
+
| `meta-skill-evolution` | Every 50 tasks: analyzes outcomes, identifies weakest skill, rewrites its methodology |
|
|
214
|
+
| `self-healing-code` | On test failure: hypothesis tree โ 2+ patches โ applies best โ auto-commits |
|
|
215
|
+
| `cross-project-knowledge` | Pattern library across all repos โ bug fixes and solutions transfer between projects |
|
|
216
|
+
| `formal-verification-lite` | Property-based testing (fast-check/Hypothesis/QuickCheck) โ 1000+ examples per property |
|
|
217
|
+
|
|
218
|
+
## Cross-Session Memory
|
|
219
|
+
|
|
220
|
+
Skills persist state across sessions. Your agent's debugging hypotheses, payment outcomes, and learned patterns survive session restarts.
|
|
143
221
|
|
|
144
222
|
```
|
|
145
223
|
~/.clawpowers/
|
|
146
|
-
โโโ state/
|
|
147
|
-
โโโ metrics/
|
|
148
|
-
โโโ checkpoints/
|
|
149
|
-
โโโ feedback/
|
|
150
|
-
|
|
151
|
-
โโโ logs/ # Execution logs
|
|
224
|
+
โโโ state/ # Key-value store
|
|
225
|
+
โโโ metrics/ # Outcome tracking per skill (JSONL)
|
|
226
|
+
โโโ checkpoints/ # Resumable workflow state
|
|
227
|
+
โโโ feedback/ # RSI self-improvement data
|
|
228
|
+
โโโ logs/ # Execution logs
|
|
152
229
|
```
|
|
153
230
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
ClawPowers tracks what works and what doesn't. After every skill execution:
|
|
157
|
-
|
|
158
|
-
1. **Measure** โ Was the outcome successful? How long did it take? What went wrong?
|
|
159
|
-
2. **Analyze** โ Are there patterns in failures? Which task types need different approaches?
|
|
160
|
-
3. **Adapt** โ Adjust skill parameters, decomposition strategies, and review thresholds
|
|
231
|
+
## CLI Reference
|
|
161
232
|
|
|
162
233
|
```bash
|
|
163
|
-
#
|
|
164
|
-
npx clawpowers
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
npx clawpowers
|
|
234
|
+
npx clawpowers init # Set up runtime
|
|
235
|
+
npx clawpowers status # Health check
|
|
236
|
+
npx clawpowers demo x402 # Payment demo (no real money)
|
|
237
|
+
npx clawpowers metrics record --skill <name> --outcome success|failure
|
|
238
|
+
npx clawpowers metrics summary # Per-skill stats
|
|
239
|
+
npx clawpowers analyze # RSI performance analysis
|
|
240
|
+
npx clawpowers store get <key> # Read persistent state
|
|
241
|
+
npx clawpowers store set <key> <value> # Write persistent state
|
|
242
|
+
npx clawpowers payments queue # Review pending approvals
|
|
168
243
|
```
|
|
169
244
|
|
|
170
|
-
This isn't theoretical โ it's the same RSI framework running in production trading systems with 268+ measured outcomes.
|
|
171
|
-
|
|
172
|
-
### 4. Agent Payments (x402)
|
|
173
|
-
|
|
174
|
-
Your agent can pay for premium APIs, compute resources, and services autonomously โ within smart-contract-enforced spending limits. No wallet draining. No surprise bills. Built on the payment infrastructure [integrated into NVIDIA's official NeMo Agent Toolkit](https://github.com/NVIDIA/NeMo-Agent-Toolkit-Examples/pull/17).
|
|
175
|
-
|
|
176
|
-
### 5. Beyond Software Development
|
|
177
|
-
|
|
178
|
-
Static frameworks stop at coding methodology. ClawPowers includes skills for:
|
|
179
|
-
|
|
180
|
-
- **Security auditing** โ Automated vulnerability scanning with Trivy, dependency checks, secret detection
|
|
181
|
-
- **Content pipeline** โ Write, humanize, and publish technical content with platform-specific formatting
|
|
182
|
-
- **Market intelligence** โ Research competitors, track trends, analyze opportunities
|
|
183
|
-
- **Prospecting** โ Find leads matching your ICP, enrich contacts, output to CRM
|
|
184
|
-
|
|
185
|
-
## Skills Reference
|
|
186
|
-
|
|
187
|
-
### Core Development (14 skills)
|
|
188
|
-
|
|
189
|
-
| Skill | What It Does | Runtime Enhancement |
|
|
190
|
-
|-------|-------------|---------------------|
|
|
191
|
-
| `subagent-driven-development` | Orchestrate parallel subagents per task | Persistent execution DB, resumable checkpoints, outcome metrics |
|
|
192
|
-
| `test-driven-development` | RED-GREEN-REFACTOR enforcement | Mutation analysis, test portfolio management, effectiveness scoring |
|
|
193
|
-
| `writing-plans` | Spec โ implementation plan | Historical task estimation, dependency validation, plan quality scoring |
|
|
194
|
-
| `executing-plans` | Execute plans with verification | Progress persistence, interruption recovery, milestone tracking |
|
|
195
|
-
| `brainstorming` | Structured ideation | Cross-session idea persistence, convergence tracking |
|
|
196
|
-
| `systematic-debugging` | Hypothesis-driven debugging | Persistent hypothesis tree, pattern matching against known issues |
|
|
197
|
-
| `verification-before-completion` | Pre-merge quality gates | Automated verification suite, historical pass rate tracking |
|
|
198
|
-
| `finishing-a-development-branch` | Branch cleanup and merge prep | Automated changelog, squash strategy optimization |
|
|
199
|
-
| `requesting-code-review` | Prepare and request review | Reviewer match scoring, review history |
|
|
200
|
-
| `receiving-code-review` | Process and implement feedback | Feedback pattern tracking, common issues database |
|
|
201
|
-
| `using-git-worktrees` | Isolated branch development | Worktree lifecycle management, conflict prediction |
|
|
202
|
-
| `using-clawpowers` | Meta-skill: how to use ClawPowers | Adaptive onboarding based on user skill level |
|
|
203
|
-
| `writing-skills` | Create new skills via TDD | Skill quality scoring, anti-pattern detection |
|
|
204
|
-
| `dispatching-parallel-agents` | Fan-out parallel execution | Load balancing, failure isolation, result aggregation |
|
|
205
|
-
|
|
206
|
-
### Extended Capabilities (6 skills)
|
|
207
|
-
|
|
208
|
-
| Skill | What It Does | Why Static Frameworks Can't |
|
|
209
|
-
|-------|-------------|----------------------------|
|
|
210
|
-
| `agent-payments` | x402 payment protocol, spending limits, autonomous transactions | Requires runtime wallet interaction, smart contract calls |
|
|
211
|
-
| `security-audit` | Vulnerability scanning, secret detection, dependency audits | Requires tool execution (Trivy, gitleaks, npm audit) |
|
|
212
|
-
| `content-pipeline` | Write โ humanize โ format โ publish | Requires API calls, platform auth, content transformation |
|
|
213
|
-
| `learn-how-to-learn` | Metacognitive protocols, anti-pattern detection, confidence calibration | Requires persistent learning state, outcome correlation |
|
|
214
|
-
| `market-intelligence` | Competitive analysis, trend detection, opportunity scoring | Requires web access, data aggregation, persistent tracking |
|
|
215
|
-
| `prospecting` | Lead generation, contact enrichment, CRM sync | Requires API calls (Exa, Apollo), structured output |
|
|
216
|
-
|
|
217
|
-
### RSI Intelligence Layer (4 skills)
|
|
218
|
-
|
|
219
|
-
These skills don't exist in any other framework. They require runtime execution, persistent state, and self-modification capabilities that static prompt collections can never deliver.
|
|
220
|
-
|
|
221
|
-
| Skill | What It Does | Why This Changes Everything |
|
|
222
|
-
|-------|-------------|----------------------------|
|
|
223
|
-
| `meta-skill-evolution` | Every 50 tasks, analyzes outcome patterns, identifies the weakest skill, surgically rewrites its methodology, version bumps | Your agent's coding discipline improves autonomously over time. After 30 days it's measurably better than any static install |
|
|
224
|
-
| `self-healing-code` | On test failure: captures error โ builds hypothesis tree โ generates 2+ patches โ applies with coverage guard โ auto-commits winner | 3-cycle max with rollback. Turns red tests into green tests without human intervention |
|
|
225
|
-
| `cross-project-knowledge` | Persistent pattern library across ALL repos. Bug fixes, architecture decisions, and performance optimizations transfer between projects | Agent working on Project B benefits from everything learned on Projects A, C, D. Knowledge compounds |
|
|
226
|
-
| `formal-verification-lite` | Property-based testing with fast-check (JS), Hypothesis (Python), QuickCheck (Haskell). 5 property templates, 1000+ examples per property | Goes beyond "tests pass" to "tests actually prove correctness." Catches edge cases unit tests miss |
|
|
227
|
-
| `economic-code-optimization` | Autonomously spends micro-budgets on premium models, cloud GPUs, expert reviews when ROI justifies it. Tracks every cent and learns optimal spend ratios | Agents literally invest in their own performance. Spending efficiency improves over time via RSI feedback loop |
|
|
228
|
-
|
|
229
|
-
## Architecture
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
clawpowers/
|
|
233
|
-
โโโ skills/ # 25 skill directories, each with SKILL.md
|
|
234
|
-
โโโ runtime/
|
|
235
|
-
โ โโโ persistence/ # Cross-session state (store.js + store.sh)
|
|
236
|
-
โ โโโ metrics/ # Outcome tracking (collector.js + collector.sh)
|
|
237
|
-
โ โโโ feedback/ # RSI self-improvement (analyze.js + analyze.sh)
|
|
238
|
-
โ โโโ init.js # Cross-platform runtime setup
|
|
239
|
-
โ โโโ init.sh # Unix-native runtime setup
|
|
240
|
-
โโโ hooks/
|
|
241
|
-
โ โโโ session-start # Bash session hook (macOS/Linux)
|
|
242
|
-
โ โโโ session-start.js # Node.js session hook (all platforms)
|
|
243
|
-
โ โโโ session-start.cmd # Windows batch wrapper
|
|
244
|
-
โโโ bin/
|
|
245
|
-
โ โโโ clawpowers.js # Cross-platform CLI (Windows/macOS/Linux)
|
|
246
|
-
โ โโโ clawpowers.sh # Unix-native CLI (macOS/Linux)
|
|
247
|
-
โโโ plugins/ # Platform-specific plugin manifests
|
|
248
|
-
โ โโโ .claude-plugin/ # Claude Code
|
|
249
|
-
โ โโโ .cursor-plugin/ # Cursor
|
|
250
|
-
โ โโโ .codex/ # Codex
|
|
251
|
-
โ โโโ .opencode/ # OpenCode
|
|
252
|
-
โ โโโ gemini-extension.json # Gemini CLI
|
|
253
|
-
โโโ tests/ # 366 test assertions
|
|
254
|
-
โโโ docs/ # Documentation
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
**Dual runtime:** Every runtime script exists in both bash (`.sh`) and Node.js (`.js`). Unix users get native bash performance. Windows users get full functionality via Node.js. `npx clawpowers` auto-detects the best runtime for your platform.
|
|
258
|
-
|
|
259
245
|
## Platform Support
|
|
260
246
|
|
|
261
247
|
| Platform | Windows | macOS | Linux | WSL2 |
|
|
262
|
-
|
|
248
|
+
|----------|:-------:|:-----:|:-----:|:----:|
|
|
263
249
|
| Claude Code | โ
| โ
| โ
| โ
|
|
|
264
250
|
| Cursor | โ
| โ
| โ
| โ
|
|
|
265
251
|
| Codex | โ
| โ
| โ
| โ
|
|
|
266
252
|
| OpenCode | โ
| โ
| โ
| โ
|
|
|
267
253
|
| Gemini CLI | โ
| โ
| โ
| โ
|
|
|
268
254
|
|
|
269
|
-
##
|
|
255
|
+
## Requirements
|
|
270
256
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
npx clawpowers metrics record --skill <name> --outcome success|failure # Track outcome
|
|
275
|
-
npx clawpowers metrics show # View recent metrics
|
|
276
|
-
npx clawpowers metrics summary # Per-skill stats
|
|
277
|
-
npx clawpowers analyze # RSI performance analysis
|
|
278
|
-
npx clawpowers analyze --skill <name> # Analyze specific skill
|
|
279
|
-
npx clawpowers store set <key> <value> # Store persistent state
|
|
280
|
-
npx clawpowers store get <key> # Retrieve state
|
|
281
|
-
npx clawpowers store list [prefix] # List stored keys
|
|
282
|
-
```
|
|
257
|
+
- **Node.js >= 16** (for cross-platform runtime)
|
|
258
|
+
- **OR bash** (for Unix-native runtime)
|
|
259
|
+
- **Zero runtime dependencies** โ `package.json` has an empty `dependencies` object
|
|
283
260
|
|
|
284
261
|
## Security Model
|
|
285
262
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
- **State directory** (`~/.clawpowers/`) uses `700` permissions โ owner-only access
|
|
291
|
-
- **Path traversal blocked** โ keys containing `/` or `\` are rejected at the store level
|
|
292
|
-
- **No network access** โ runtime scripts (store, metrics, analyze) are fully offline
|
|
293
|
-
- **No eval** โ zero use of `eval()`, `Function()`, or dynamic code execution in any runtime script
|
|
294
|
-
|
|
295
|
-
### Agent Payment Guardrails
|
|
296
|
-
|
|
297
|
-
The `agent-payments` skill uses `agentwallet-sdk` with hard on-chain spending limits:
|
|
298
|
-
|
|
299
|
-
```
|
|
300
|
-
Agent wants to spend $15 โ โ
Auto-approved (under $25/tx limit)
|
|
301
|
-
Agent wants to spend $500 โ โณ Queued for owner approval
|
|
302
|
-
Agent spent $490 today โ ๐ Next tx blocked ($500/day limit hit)
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
- **Non-custodial** โ your private key, your wallet. No third-party custody.
|
|
306
|
-
- **ERC-6551 token-bound accounts** โ wallet is tied to an NFT. Portable, auditable, on-chain.
|
|
307
|
-
- **Smart-contract enforced** โ spending policies live on-chain. The agent literally *cannot* bypass them, even with a prompt injection.
|
|
308
|
-
- **Owner override** โ you can revoke, pause, or adjust limits at any time.
|
|
309
|
-
|
|
310
|
-
### What This Means in Practice
|
|
311
|
-
|
|
312
|
-
Even if an agent is compromised (prompt injection, jailbreak, malicious skill), it cannot:
|
|
313
|
-
1. Spend more than the per-transaction limit you set
|
|
314
|
-
2. Exceed the daily/weekly spending cap you configured
|
|
315
|
-
3. Access funds outside its ERC-6551 token-bound account
|
|
316
|
-
4. Modify its own spending policy (only the owner wallet can)
|
|
317
|
-
|
|
318
|
-
**Recommendation:** Start with low limits ($5/tx, $25/day) and increase as you build confidence. The SDK supports per-token policies โ set tighter limits on volatile assets, looser on stablecoins.
|
|
319
|
-
|
|
320
|
-
## Agent Payment Demo
|
|
321
|
-
|
|
322
|
-
Here's a complete example of an agent autonomously paying for a premium API:
|
|
323
|
-
|
|
324
|
-
### 1. Set Up the Wallet (One-Time)
|
|
325
|
-
|
|
326
|
-
```typescript
|
|
327
|
-
import { createWallet, setSpendPolicy, NATIVE_TOKEN } from 'agentwallet-sdk';
|
|
328
|
-
import { createWalletClient, http } from 'viem';
|
|
329
|
-
import { privateKeyToAccount } from 'viem/accounts';
|
|
330
|
-
import { base } from 'viem/chains';
|
|
331
|
-
|
|
332
|
-
// Create wallet on Base (cheapest gas for agent operations)
|
|
333
|
-
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);
|
|
334
|
-
const walletClient = createWalletClient({ account, chain: base, transport: http() });
|
|
335
|
-
|
|
336
|
-
const wallet = createWallet({
|
|
337
|
-
accountAddress: '0xYourAgentWallet',
|
|
338
|
-
chain: 'base',
|
|
339
|
-
walletClient,
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
// Set spending guardrails: $5 per request, $50/day max
|
|
343
|
-
await setSpendPolicy(wallet, {
|
|
344
|
-
token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC on Base
|
|
345
|
-
perTxLimit: 5_000_000n, // 5 USDC per transaction
|
|
346
|
-
periodLimit: 50_000_000n, // 50 USDC per day
|
|
347
|
-
periodLength: 86400, // 24 hours
|
|
348
|
-
});
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
### 2. Agent Pays for Premium Data (Autonomous)
|
|
352
|
-
|
|
353
|
-
```typescript
|
|
354
|
-
import { createX402Client } from 'agentwallet-sdk';
|
|
355
|
-
|
|
356
|
-
const x402 = createX402Client(wallet, {
|
|
357
|
-
supportedNetworks: ['base:8453'],
|
|
358
|
-
globalDailyLimit: 50_000_000n, // matches spend policy
|
|
359
|
-
globalPerRequestMax: 5_000_000n,
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
// Agent encounters a 402 Payment Required response โ pays automatically
|
|
363
|
-
const response = await x402.fetch('https://api.premium-data.com/market-analysis');
|
|
364
|
-
const data = await response.json();
|
|
365
|
-
// Cost: $0.50 USDC, auto-approved (under $5 limit)
|
|
366
|
-
// Owner sees: tx hash on Base, fully auditable
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### 3. Track Payment Outcomes (RSI Loop)
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
# ClawPowers tracks every payment outcome
|
|
373
|
-
npx clawpowers metrics record \
|
|
374
|
-
--skill agent-payments \
|
|
375
|
-
--outcome success \
|
|
376
|
-
--duration 3 \
|
|
377
|
-
--notes "Paid $0.50 for market analysis API โ data quality 9/10"
|
|
378
|
-
|
|
379
|
-
# After 10+ payments, analyze ROI
|
|
380
|
-
npx clawpowers analyze --skill agent-payments
|
|
381
|
-
# Output: success rate, avg cost, cost-per-successful-outcome
|
|
382
|
-
```
|
|
263
|
+
- State directory (`~/.clawpowers/`) uses `700` permissions โ owner-only
|
|
264
|
+
- No network access in runtime scripts โ store, metrics, and analyze are fully offline
|
|
265
|
+
- No `eval()`, `Function()`, or dynamic code execution anywhere in the runtime
|
|
266
|
+
- Payment guardrails enforced by smart contract โ application code cannot override them
|
|
383
267
|
|
|
384
268
|
## Credential
|
|
385
269
|
|
|
386
|
-
Built by [AI Agent Economy](https://github.com/up2itnow0822)
|
|
387
|
-
|
|
270
|
+
Built by [AI Agent Economy](https://github.com/up2itnow0822):
|
|
388
271
|
- Payment infrastructure in [NVIDIA's official NeMo Agent Toolkit](https://github.com/NVIDIA/NeMo-Agent-Toolkit-Examples/pull/17)
|
|
389
|
-
- [agentwallet-sdk](https://www.npmjs.com/package/agentwallet-sdk) โ
|
|
390
|
-
- [agentpay-mcp](https://github.com/up2itnow0822/agentpay-mcp) โ MCP payment server
|
|
391
|
-
- Production trading systems with RSI self-improvement (268+ measured outcomes)
|
|
392
|
-
|
|
393
|
-
## Contributing
|
|
394
|
-
|
|
395
|
-
We welcome contributions. Unlike some frameworks, we don't dismiss legitimate skill proposals with one-word responses. Open an issue or PR โ every submission gets a genuine technical review.
|
|
272
|
+
- [agentwallet-sdk](https://www.npmjs.com/package/agentwallet-sdk) โ 741+ downloads/week
|
|
273
|
+
- [agentpay-mcp](https://github.com/up2itnow0822/agentpay-mcp) โ MCP payment server
|
|
396
274
|
|
|
397
275
|
## Patent Notice
|
|
398
276
|
|
|
399
277
|
**Patent Pending** โ The underlying financial infrastructure (agentwallet-sdk, agentpay-mcp) is covered by USPTO provisional patent application filed March 2026: "Non-Custodial Multi-Chain Financial Infrastructure System for Autonomous AI Agents."
|
|
400
278
|
|
|
279
|
+
We support the open x402 standard. Our provisional filing is defensive โ intended to prevent hostile monopolization of open payment rails, not to restrict builders.
|
|
280
|
+
|
|
281
|
+
## Disclaimer
|
|
282
|
+
|
|
283
|
+
ClawPowers and agentwallet-sdk are non-custodial developer tooling. You control your own keys and set your own spending limits. You are responsible for compliance with applicable laws in your jurisdiction. This software is provided as-is under the MIT license. Nothing here constitutes financial advice, custody services, or money transmission.
|
|
284
|
+
|
|
401
285
|
## License
|
|
402
286
|
|
|
403
287
|
MIT
|