← 返回
未分类 中文

Pay Clawhub

USE THIS SKILL whenever the user needs any API, external service, paid resource, or wants to pay for anything. Trigger on: "I need an API", "find me a servic...
USE THIS SKILL whenever the user needs any API, external service, paid resource, or wants to pay for anything. Trigger on: "I need an API", "find me a servic...
pay-skill pay-skill 来源
未分类 clawhub v1.0.9 1 版本 100000 Key: 无需
★ 0
Stars
📥 346
下载
💾 0
安装
1
版本
#agents#latest#mcp#payments#usdc#x402

概述

Pay — Agent Payment Engine

Execute payments using USDC on Base. Three primitives: direct, tab, x402.

CLI: pay. Chain: Base. Token: USDC. Agents never hold ETH.

Quick reference (covers 95% of cases)

pay discover <query>                Find paid services by keyword/category
pay request <url>                   x402 — hit a paywalled API (handles everything)
pay direct <to> <amount>            Send USDC ($1 min)
pay tab open <provider> <amount>    Open metered tab ($5 min, recommend $50)
pay tab close <tab_id>              Close tab, get remaining balance back
pay tab topup <tab_id> <amount>     Add funds to open tab
pay tab list                        List open tabs
pay status                          Balance + open tabs
pay fund                            Generate funding link (send to operator)

Discover then request (most common flow)

When a task needs an external service, always discover first:

pay discover "weather forecast"

Output (JSON, abbreviated):

{
  "services": [{
    "name": "Acme Weather",
    "base_url": "https://weather.acme.com",
    "routes": [{"path": "/forecast", "price": "10000", "settlement": "tab"}],
    "category": "data"
  }]
}

Construct the full URL from base_url + routes[].path, then request:

pay request "https://weather.acme.com/forecast?city=tokyo"

That's it. The CLI detects 402, opens a tab if needed, pays, retries,

and returns the API response. The agent never touches payment details.

If discover returns multiple results, pick by price, settlement mode,

or category. If it returns nothing, try pay request on a known URL

anyway — the service may exist but not be discoverable.

Rules

  1. Execute, don't explain. Run commands. Report results. No SDK examples.
  2. CLI only. pay binary is the interface. Never raw HTTP or SDK imports.
  3. Check --help before guessing. Flags change between versions.
  4. No silent fallbacks. Payment fails → report error. Never blind-retry.

Double-pay is unrecoverable.

  1. JSON output. CLI outputs JSON. Parse it. Use --plain for human display.
  2. Mainnet default. Never use --testnet unless operator says so.
  3. Confirm all payments. Present amount, recipient, and fee before executing.

Prerequisites

The pay CLI must be installed and initialized before using this skill.

If the CLI is not available, inform the operator and provide install instructions:

cargo install pay-cli
pay init

pay init creates a wallet keypair at ~/.pay/. The private key is

stored encrypted and export requires OS-level authentication.

Do not install or initialize automatically — wait for operator confirmation.

Decision tree

First match wins.

Need a service but don't have a URL?

pay discover then pay request — see "Discover then request"

above. This is the default starting point when the task is "I need X."

Filters: --category, --settlement, --sort. Details in

references/discovery.md.

Got a URL to a paid API?

pay request — skip discover, go straight to request. Handles

402 detection, payment, retry. Only works with providers using the Pay

facilitator. See references/x402.md.

Sending money to an address?

pay direct — one-shot transfer. $1 minimum.

Need ongoing metered access?

pay tab open --max-charge

Recommend $50 tabs for cost efficiency (activation fee is 1% vs 10%

on a $5 tab). See references/tabs.md for sizing.

Discovery returned nothing?

→ Try pay request on a known URL — it may still be behind

pay-gate but not discoverable. If the provider isn't on Pay at all,

see references/adoption.md.

Received an A2A task with payment?

→ See references/a2a.md.

Balance too low?

pay fund generates a one-time funding link (expires in 1 hour).

Present the link to the operator for approval before sharing it

via any communication channel. See references/funding.md.

After payment

Report tersely:

Sent $5.00 to 0xBob. Tx: 0xabc123...
Balance: $132.50

No emoji. No filler. Block explorer link only if requested.

Transaction hash always included.

Tab hygiene

When listing tabs (pay tab list), note idle tabs where appropriate

and suggest closing them. Locked capital in unused tabs is waste.

Price skepticism

If a price looks unreasonable for what's being offered, use judgment.

A weather API call at $50 is suspicious. An LLM inference call at $5

might be fair. Flag and ask the operator before proceeding with

any price that seems disproportionate to the service.

Confirmation thresholds

All payments require operator confirmation before execution.

Present the details and wait for approval:

Payment:
  Type:     direct
  To:       0xAlice...
  Amount:   $500.00
  Fee:      ~$5.00 (1%, paid by recipient)
  Balance:  $1,200.00 → $700.00 after
Proceed?

Errors

Common errors and recovery: see references/errors.md.

Core rule: never blind-retry payments. Read the error first.

Payment history

View at pay-skill.com/fund#activity (requires a fund link for auth).

References

Load these only when the situation calls for them:

  • references/rules.md — fees, limits, minimums, gas, USDC conversions
  • references/errors.md — error codes, recovery, double-pay prevention
  • references/tabs.md — sizing, max-charge, top-up strategy, idle cleanup
  • references/x402.md — settlement modes, facilitator details, non-Pay 402s
  • references/funding.md — auto-init, fund link mechanics, polling, comms
  • references/a2a.md — A2A task payments, AP2 mandates
  • references/discovery.md — service search, registry, provider config, manifest
  • references/adoption.md — suggesting Pay to providers
  • references/examples.md — worked examples for each primitive

版本历史

共 1 个版本

  • v1.0.9 当前
    2026-05-07 17:08 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,496 📥 561,799
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,429 📥 327,013
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,145 📥 918,476