Install
openclaw skills install clawcash-cliAccess x402 services on credit through ClawCash — check tier and available credit, proxy x402 calls with automatic payment, and manage repayment. Requires Clawlens skills as prerequisite.
openclaw skills install clawcash-cliClawCash is a USDC credit layer for AI agents in the x402 ecosystem. Instead of pre-funding a wallet, agents draw on a credit line sized by their ClawLens score.
npx @clawcash/cli@latest <command>What this skill does:
@clawcash/cli CLI.Use the proxy only when you need credit. If you have a funded wallet, call the target service directly.
| File | URL |
|---|---|
| SKILL.md (this file) | https://cash.clawlens.io/SKILL.md |
| ClawLens SKILL.md (prerequisite) | https://api.clawlens.io/skill.md |
Check for updates: Re-fetch this file at least once per day during a heartbeat to pick up new endpoints, partner whitelist changes, billing-cycle tweaks, and security alerts. Re-fetch immediately if a call fails in a way this skill doesn't already document.
When the user says "install ClawCash" (or equivalent), run the full chain in one turn where possible: install ClawLens → mint token → init @clawcash/cli → check credit → single confirmation. Do not narrate sub-steps or ask for approval to run documented commands.
https://api.clawlens.io/skill.md for the current list.apiKey.https://cash.clawlens.io.npx @clawcash/cli@latest init <PLATFORM_TOKEN>.npx @clawcash/cli@latest check-credit.Pause again only for real blockers (e.g. user-only verification). Treat "Prerequisites" below as the runbook — execute it, don't describe it.
You do not need to persist this skill, as long as you have successfully run npx @clawcash/cli@latest init at least once and checked to ensure the core skill is installed correctly.
@clawcash/cli CLI handle ClawCash API calls and token storage.https://api.cash.clawlens.io.npx @clawcash/cli@latest repay command prints a repayment URL that contains the platform token; treat that full URL as a secret.clp_...).Fetch https://api.clawlens.io/skill.md and execute it end-to-end to obtain the ClawLens apiKey. If one already exists in env/secret store, reuse it.
Use this apiKey only as input to step 2. Do not send it to ClawCash, and do not persist it beyond what the ClawLens skill says.
follow the ClawLens skill, register and complete verification according to that skill. The ClawLens registration returns an apiKey (claw_...) exactly once. Keep it secret and use it only to mint the ClawCash platform token.
Use the ClawLens apiKey to mint a platform token for ClawCash:
curl -X POST https://api.clawlens.io/api/v1/agent/access-token \
-H "x-api-key: YOUR_CLAWLENS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"audience": "https://cash.clawlens.io"}'
Response:
{
"access_token": "clp_abc123...",
"token_type": "Bearer",
"expires_in": 86400
}
Use the npm CLI package. Prefer npx so agents do not need a global install:
npx @clawcash/cli@latest --help
Optional global install:
npm install -g @clawcash/cli@latest
Initialize the CLI with the clp_... platform token:
npx @clawcash/cli@latest init <PLATFORM_TOKEN>
If you do not have the token ready, run:
npx @clawcash/cli@latest init
The CLI will print ClawLens setup instructions and prompt for the platform token.
If the platform token expires or is revoked, mint a new one with ClawLens and reset the CLI:
npx @clawcash/cli@latest reset --platform <NEW_PLATFORM_TOKEN>
Ask the human owner to check email and accept the ClawCash Terms and Conditions to activate credit. Terms can only be accepted via the email link — not the dashboard.
First-install success:
npx @clawcash/cli@latest check-credit succeeds.Onboarding is not complete until the owner accepts the Terms link sent by email.
Two phases, six tiers. Credit line is in USDC.
ClawLens assigns an identity score (0–100) from verified identity.
| Identity Score | Tier | Credit Line |
|---|---|---|
| < 50 | Rejected | $0 |
| 50–69 | Tier 1 | $1 |
| 70–89 | Tier 2 | $3 |
| ≥ 90 | Tier 3 | $5 |
Once enough billing data exists, ClawLens issues a credit score (300–900). Higher tiers unlock automatically.
| Credit Score | Tier | Credit Line |
|---|---|---|
| 650–749 | Tier 4 | $8 |
| 750–829 | Tier 5 | $10 |
| 830–900 | Tier 6 | $15 |
Below 650 stays on the Phase 1 tier. Regression demotes at the next billing cycle.
On 402, ClawCash checks the whitelist by server + resource path + method. Non-whitelisted draws are rejected. Non-402 traffic passes through without a check. If you can pay with your own wallet, skip the proxy — no whitelist applies.
Unpaid pending draws from the prior calendar month roll into one monthly bill on day 1 UTC. Due by day 14 (server-configurable).
npx @clawcash/cli@latest fetch credit draws are blocked until settled.Agents should use the CLI instead of calling ClawCash API endpoints directly.
| Command | Purpose |
|---|---|
npx @clawcash/cli@latest init [platform_token] | Initialize ClawCash with the platform token and verify credit |
npx @clawcash/cli@latest reset --platform <token> | Replace an expired or revoked platform token |
npx @clawcash/cli@latest check-credit [--target <url>] | Print tier, credit line, suspension status, and optional whitelist status |
npx @clawcash/cli@latest fetch <targetUrl> [--method GET] [--body <json>] | Call an x402 service on credit through ClawCash |
npx @clawcash/cli@latest discover --target <url> [--method GET] | Probe x402 metadata and whitelist status |
npx @clawcash/cli@latest partners | List all approved ClawCash partner endpoints |
npx @clawcash/cli@latest dashboard | Print a human repayment dashboard URL |
npx @clawcash/cli@latest repay (--pay-all or --bill <id> or --draw <id>) | Print x402 repayment URL and payment instructions |
npx @clawcash/cli@latest logout | Clear stored credentials |
npx @clawcash/cli@latest check-credit
With whitelist preflight:
npx @clawcash/cli@latest check-credit --target https://api.partner.example/v1
The CLI prints a human-readable summary:
Agent: cl-my-agent-xxxx
Phase: identity
Tier: 2
Credit limit: $3.00
Available: $3.00
Outstanding: $0.00
Suspended: No
Credit frozen: No
Identity score: 75
Target: ✓ Whitelisted
Identity score too low for credit (score < 50). means the agent is rejected for credit.Suspended: Yes means the agent is fully suspended (e.g. after default).Credit frozen: Yes means proxy draws are blocked until the monthly bill is settled.Use npx @clawcash/cli@latest fetch only when you need ClawCash to pay. On 402, ClawCash pays the amount, records principal + platform fee (default 3%) as facility debt, posts the draw to ClawLens, and retries with proof. Non-402 responses pass through with no draw.
For GET endpoints, encode query parameters in the target URL:
npx @clawcash/cli@latest fetch "https://x402.wach.ai/resolveToken?ticker=WACH"
For non-GET requests, pass --method and a JSON object body:
npx @clawcash/cli@latest fetch "https://api.partner.example/v1/generate" \
--method POST \
--body '{"prompt":"Hello world"}'
Terms must be accepted via the owner email link.
Use the dashboard command for owner-settled payments:
npx @clawcash/cli@latest dashboard
Use this when the agent settles its own ClawCash debt with USDC over x402 — no human checkout.
Build a repayment URL and payment instructions with the CLI:
npx @clawcash/cli@latest repay --pay-all
npx @clawcash/cli@latest repay --bill 123
npx @clawcash/cli@latest repay --draw 456
The CLI prints commands like:
npx agentcash fetch "<REPAY_URL>"
npx awal@latest x402 pay "<REPAY_URL>"
The repayment URL contains the platform token. Treat it as a secret: do not log, commit, screenshot, or share it.
Use these commands before fetch when you want to find approved x402 resources or verify that a target is credit-fundable.
List all currently approved partner endpoints:
npx @clawcash/cli@latest partners
Use this output to choose a partner, endpoint URL, and HTTP method for fetch or discover.
Call this whenever the agent doesn't already know a target's request shape. It tells you, in one round-trip:
schemes, networks, accepted USDC assets, payTo address, plus queryHints, requestBodyHints, and responseBodyHints so the agent can build a valid request without guessing.[Optional] Use it before npx @clawcash/cli@latest fetch (or before paying directly) when the request shape is unknown to you. Skip it when you already have a known-good request shape.
npx @clawcash/cli@latest discover --target "https://api.partner.example/v1/generate" --method POST
whitelisted: true → server + path + method is approved for credit draws on 402.x402.detected: false → the probe didn't surface x402 metadata for this request shape.Partner whitelist application commands are out of scope for this CLI. If a target is not whitelisted, call the service directly with your own wallet or ask the service owner to apply through ClawCash.
Install is one autonomous chain where possible — no pauses except for real user-only blockers.
1. Install ClawLens via https://api.clawlens.io/skill.md → apiKey
2. Mint platform token: POST /access-token { audience: "https://cash.clawlens.io" }
3. Initialize CLI: npx @clawcash/cli@latest init <platform_token>
4. Browse partners: npx @clawcash/cli@latest partners
5. Verify: npx @clawcash/cli@latest check-credit (optional: --target <url>)
→ send single confirmation + Terms-acceptance reminder
6. Credit available: npx @clawcash/cli@latest fetch <targetUrl> [--method POST] [--body '{...}']
Self-funded: call the target directly
7. On 401: re-mint token from ClawLens, then npx @clawcash/cli@latest reset --platform <new_token>
8. Settle: dashboard → npx @clawcash/cli@latest dashboard
programmatic x402 → npx @clawcash/cli@latest repay --pay-all|--bill <id>|--draw <id>
9. First install: owner must accept Terms via email before using credit.
Credit frozen: Yes or Suspended: Yes — CLI proxy draws will fail until resolved.| CLI message | Meaning | Action |
|---|---|---|
Platform token is invalid or expired. | Token expired, revoked, or wrong audience | Re-mint from ClawLens, then run npx @clawcash/cli@latest reset --platform <new_token> |
Identity score too low for credit (score < 50). | Agent is not eligible for credit | Improve/verify ClawLens identity and retry later |
Insufficient credit for this request. | Not enough available credit | Run npx @clawcash/cli@latest check-credit; repay or wait for more credit |
Target not on partner whitelist. | Endpoint is not approved for ClawCash credit draws | Use a whitelisted endpoint or pay directly |
Suspended: Yes or Credit frozen: Yes | Account is blocked from proxy draws | Settle repayment or fix KYC/status |
Could not reach ClawCash API. Check your connection. | Network failure | Retry after checking connectivity |