安装与下载
1 ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install xh-agents-x402
2 手动安装
将技能文件夹复制到以下位置之一
~/.openclaw/skills/
{'/skills/'}
优先级:工作区 › 全局 › 内置
3 提示词安装
将此提示词复制到 Openclaw 即可自动安装。
请帮我使用 Clawhub 安装 skill-xh-agents-x402。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
更倾向于下载?
获取包含原生技能文件的ZIP压缩包。
基本信息
xh-agents-x402
安装指南
- ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install xh-agents-x402 - 手动安装
将技能文件夹复制到以下位置之一
全局模式
~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置 - 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 xh-agents-x402。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
更倾向于下载?
获取包含原生技能文件的ZIP压缩包。
下载技能 (.zip)
什么是
XH Agents x402 为 AI 智能体提供 Base 上 34 种按次付费数据资源,无需 API key、账户或订阅,即可使用 USDC 付款。它的核心价值在于帮助智能体在付款或兑换代币前做出更明智的决策:智能体可以评估 x402 端点的可信度,并筛查 Base 代币的安全性;评分会列出具体因素,解释失分原因。
通过命令行客户端或 MCP 服务器,智能体还可以请求钱包和市场情报、Base Gas 信息、文档提取等服务。Openclaw Skills 用户可以发现路由并在付款前查看当前价格;每次付费请求都使用由用户控制且已注资的 Base 钱包。
应用场景
在授权付款前评估陌生的 x402 端点,包括其付款挑战、发现文档、payTo 声誉和价格合理性。
使用 0–100 安全评分筛查 Base 代币,评分会考虑流动性、持有者集中度、合约权限、可升级性和创建者历史等因素。
按次获取钱包档案、巨鲸动向、Gas 数据、投资组合信息、交易对手、资金池流向或资金追踪信息。
使用按可信度排序的排行榜而非交易次数来比较 x402 卖家。
使用 OCR 从 PDF 或扫描件中提取文本,并获取源字节的 SHA-256 哈希值。
向知识库或市场提问,或访问用于构建付费 x402 API 的操作指南。
工作原理
使用 python3 scripts/xh_pay.py catalogue 发现可用路由和摘要,或查看已发布的 OpenAPI、x402 发现信息和 LLM 文档。
付款前为路由请求实时报价。查看当前价格,并确认 payTo 地址与预期卖家一致。
付费调用时,提供请求正文和最高价格。客户端读取 HTTP 402 挑战;如果价格超过该上限,就会停止。
如果价格未超限,客户端会签署 EIP-3009 授权,并使用 Base(eip155:8453)上的官方 x402 Python 客户端,添加付款标头后重试。Gas 由中介服务赞助。
查看返回的产品数据以及解码后的 PAYMENT-RESPONSE 结算证明。将证明与结果一并保存,作为付款收据。
配置指南
要求:Python 3.10 或更高版本、x402 和 eth_account Python 包,以及一个已注资、含有 USDC 的 Base 钱包,以用于付费路由。Gas 由中介服务赞助,因此钱包不需要 ETH。目录和报价命令免费,且无需钱包。
安装依赖项并配置纯十六进制私钥文件。使用严格的文件权限保护密钥,绝不要在日志或共享环境中暴露密钥。
pip install x402 eth_account
chmod 600 ~/.xh-payer.key
export XH_PAYER_KEY_FILE=~/.xh-payer.key
探索路由并在付款前查看当前价格
python3 scripts/xh_pay.py catalogue
python3 scripts/xh_pay.py quote https://xhagents.xyz/api/x402-trust
检查已配置的钱包及其 USDC 余额
python3 scripts/xh_pay.py whoami
设置支出上限的付费请求示例
python3 scripts/xh_pay.py pay https://xhagents.xyz/api/x402-trust
--body '{"url":"https://the-endpoint-you-are-checking.com/api/thing"}'
--max 0.10
始终应使用 quote 获取路由的准确当前价格;不要依赖缓存价格或文档中记录的价格。--max 选项默认值为 $0.10,不应向报价超过所设上限的卖家付款。
数据架构
此技能提供基于路由的 HTTP 资源;目录会列出当前路由及其摘要,报价会报告实时付款详情。请求和输出取决于所选路由。
数据或产物 组织方式和详情
路由目录 付费 API 路由及摘要,可通过 xh_pay.py catalogue 获取;应使用 quote 检查实时路由价格。
请求输入 POST 调用所需的路由专属 JSON 正文;例如,信任评分路由接受待评估的 URL。
路由结果 所选服务返回的产品数据,例如评分、情报、提取的文本或答案。具体字段因路由而异。
付款收据 pay 打印的解码后 PAYMENT-RESPONSE 结算证明;应与对应结果一并保存。
发现元数据 OpenAPI:https://xhagents.xyz/openapi.json;x402 发现信息:https://xhagents.xyz/.well-known/x402;面向智能体的文档:https://xhagents.xyz/llms.txt。
此技能未指定本地数据库,也未要求使用特定文件格式存储结果。付款方密钥通过 XH_PAYER_KEY_FILE 单独提供;请妥善保护该文件并安全存储结算证明。
高级特性
端点信任评分提供 0–100 的评估,并列出与门控行为、挑战符合性、发现文档、payTo 声誉和价格合理性相关的具体扣分项。
Base 代币筛查提供 0–100 的安全评分,并列出导致分数降低的组成因素。
付款客户端会在签署前,将调用方设定的支出上限与实时 402 挑战进行比较;挑战而非缓存价格表具有权威性。
在 Base(
eip155:8453
)上使用官方 x402 Python 客户端
x402ClientSync
ExactEvmClientScheme
、EIP-3009 授权以及由中介服务赞助的 Gas。
MCP 服务器提供
xh_catalogue
、
xh_quote
、
xh_trust_score
、
xh_token_safety
xh_call
,供基于工具的智能体工作流使用。
信任排行榜按可信度为 x402 卖家排名;该服务还会在其信任页面公布自身已结算调用次数、收到的 USDC 和金库数据。
name: xh-agents-x402 description: Pay-per-call data for agents over x402 — endpoint trust scoring, token safety, wallet and market intel on Base. Use when an agent must judge another x402 endpoint before paying it, screen a Base token, or needs paid on-chain data without an API key.
XH Agents — paid x402 data, one call at a time
34 x402 resources on Base, USDC per call, no API key, no signup. Everything below is paid with a wallet you already control; nothing here needs an account with us.
Why this skill is worth installing: the two most useful calls are the ones you should make before you spend money with a stranger — score the endpoint you are about to pay, and screen the token you are about to buy.
Use it when
You are about to pay an x402 endpoint you have never used and want an outside opinion first.
You need a 0-100 safety score for a Base token (liquidity, holder concentration, contract powers, upgradeability, creator history) before swapping.
You want wallet intel (portfolio, counterparties, fund trace), gas, whale movement, market sentiment, or document-to-text — priced per call instead of a subscription.
You want the raw list of sellers ranked by trust, not by transaction count.
Discover before you buy (free, no key)
python3 scripts/xh_pay.py catalogue # every paid route + summary
python3 scripts/xh_pay.py quote https://xhagents.xyz/api/x402-trust # price before paying
Discovery documents: https://xhagents.xyz/openapi.json, https://xhagents.xyz/.well-known/x402, https://xhagents.xyz/llms.txt. Human-readable catalogue: https://xhagents.xyz/. Our own published numbers (settled calls, USDC received, treasury balance) are on https://xhagents.xyz/trust/ — we disclose our traffic rather than inflate it.
Pay
export XH_PAYER_KEY_FILE=~/.xh-payer.key # mode 600, plain hex key of a funded Base wallet
python3 scripts/xh_pay.py whoami # address + USDC balance, so nothing is paid blind
python3 scripts/xh_pay.py pay https://xhagents.xyz/api/x402-trust \
--body '{"url":"https://the-endpoint-you-are-checking.com/api/thing"}' --max 0.10
pay reads the 402 challenge, checks the price against --max (default $0.10), signs an EIP-3009 authorization, retries with the payment header, and prints the product plus the decoded PAYMENT-RESPONSE settlement proof. Under the hood it is the official x402 Python client (x402ClientSync + ExactEvmClientScheme on eip155:8453); no gas is needed because the facilitator pays it.
If you prefer tools over shell: the same engine is exposed as an MCP server (mcp_server.py: xh_catalogue, xh_quote, xh_trust_score, xh_token_safety, xh_call).
The calls agents actually use
Route Price What you get
POST /api/x402-trust $0.05 0-100 trust score for any x402 endpoint: gate behaviour, challenge conformance, discovery docs, payTo reputation, price sanity, with the penalties named
POST /api/token-safety $0.05 0-100 Base token safety score with the components that lost points
POST /api/wallet-profile, /api/whale-watch, /api/gas-tracker $0.10 wallet profile, whale moves, Base gas
POST /api/arkham-intel/* $0.10 portfolio, counterparties, pool flow, fund trace (6 routes)
POST /api/trust-leaderboard $0.05 x402 sellers ranked by trust (free method page: /api/trust-leaderboard/method)
POST /api/document-extract $0.05 PDF/scan to text with OCR, sha256 of the bytes
POST /api/domain-audit $0.05 domain + email deliverability audit
POST /api/kb/ask, POST /api/chat $0.30 knowledge-base answer / market question
GET,POST /api/compute/xh-bundle $0.91 13 production playbooks on shipping a paid x402 API (GET returns the free index)
Full list with live prices: python3 scripts/xh_pay.py catalogue (do not trust a price table in a document, including this one — quote the route).
Rules that keep an agent out of trouble
Quote before paying. Never sign from a cached price; the challenge is authoritative.
Keep a ceiling. --max defaults to $0.10; pass a lower one for cheap routes. A seller that asks for more than your ceiling is a reason to stop, not to round up.
Check payTo matches the seller you meant. quote prints it — for us it is 0x6cb53f00a586f7704e1f7121c2e397b579eb3ed0 (Base USDC).
Keep the settlement proof. pay prints the decoded PAYMENT-RESPONSE; store it with the result, it is your receipt.
A 402 is not an error — it is the price tag. Only a paid retry should return 200.
Requirements
Python 3.10+, pip install x402 eth_account. A funded Base wallet for paid calls (USDC only; no ETH needed — the facilitator sponsors gas). Free calls (catalogue, quote) need nothing.
Xiaotian Ecommerce Assistant
XTPH 电商助手(开发版)