Agent安装
- 作者仓库星标 56
- 许可证 AGPL-3.0
- 作者更新于 实时读取
- 作者仓库 cryptoskill
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @jiayaoqijia · AGPL-3.0
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: openclaw-x402-skill
description: Discover, browse, filter, and pay for x402-compatible API endpoints and MCP tools from the x402…
category: AI 智能
runtime: 无特殊运行时
---
# openclaw-x402-skill 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Prerequisites / Browse only (no keys needed) / To call paid endpoints”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Prerequisites / Browse only (no keys needed) / To call paid endpoints”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、读取环境变量、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/agent-wallet`、`/alpaca-trading` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令、读取环境变量。
先用一个小任务确认它会围绕“Prerequisites / Browse only (no keys needed) / To call paid endpoints”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: openclaw-x402-skill
description: Discover, browse, filter, and pay for x402-compatible API endpoints and MCP tools from the x402…
category: AI 智能
source: jiayaoqijia/cryptoskill
---
# openclaw-x402-skill
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Prerequisites / Browse only (no keys needed) / To call paid endpoints」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "openclaw-x402-skill" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Prerequisites / Browse only (no keys needed) / To call paid endpoints
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令、读取环境变量 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} x402 Bazaar Skill
The x402 Bazaar is the discovery layer for the x402 ecosystem — a machine-readable catalog helping AI agents find and integrate with x402-compatible API endpoints and MCP tools. Query, find, pay, and use with no pre-baked integrations.
Two modes:
- Browse only — no wallet needed, zero cost, discover all available services
- Browse + Pay — requires Base wallet with USDC to call discovered endpoints
Prerequisites
Browse only (no keys needed)
python3 agent.py "list services"
python3 agent.py "find weather APIs"
To call paid endpoints
- Get a Base wallet private key (MetaMask → export, or Coinbase Wallet)
- Fund with USDC on Base — get from coinbase.com or bridge.base.org
- Add to
.env:
EVM_PRIVATE_KEY="0xYourPrivateKeyHere"
MAX_SPEND_PER_CALL=0.10
Install dependencies (run once)
pip install -r ~/clawd/skills/x402-bazaar/requirements.txt
When to Activate This Skill
Activate when user says any of:
Discovery
- "What x402 services are available?"
- "Find me an API for [task] on x402"
- "Browse the x402 Bazaar"
- "What services cost less than $0.01?"
- "Find a weather API I can pay per call"
- "What MCP tools are on x402?"
- "Show me x402 services under [price]"
- "Search x402 for [keyword]"
Paying for services
- "Call this x402 endpoint: [url]"
- "Pay for and call [service name]"
- "Use x402 to get [data] — find and pay the cheapest service"
- "Make a paid x402 request to [url]"
Do NOT activate for:
- Checking agent's own wallet balance → use /agent-wallet skill
- Listing on the Bazaar as a seller → manual setup, see seller section below
- Alpaca or stock trading → use /alpaca-trading skill
Exact Commands
List all available services
cd ~/clawd/skills/x402-bazaar && python3 agent.py "list services"
Search by keyword
python3 agent.py "find weather"
python3 agent.py "search for AI inference"
python3 agent.py "find web scraping services"
Filter by max price
python3 agent.py "services under 0.01"
python3 agent.py "services under 0.001 USDC"
Filter by type
python3 agent.py "list http services"
python3 agent.py "list mcp tools"
Inspect a specific service
python3 agent.py "inspect https://api.example.com/x402/weather"
Call a discovered service (requires EVM_PRIVATE_KEY + USDC)
python3 agent.py "call https://api.example.com/x402/weather?location=NYC"
python3 agent.py "pay and call https://api.example.com/x402/sentiment"
Full autonomous flow: find + pay + use
python3 agent.py "find the cheapest weather API and get weather for London"
python3 agent.py "find a web scraping API and scrape https://example.com"
How x402 Payment Works
- Agent discovers a service from the Bazaar catalog
- Calls the endpoint — gets HTTP 402 Payment Required response
- Reads payment requirements from the 402 response headers
- Pays via facilitator using USDC on Base
- Retries the exact same request with payment proof header
- Service verifies proof and returns paid result
No accounts, no subscriptions, no API keys — just USDC per request.
MCP Integration
This skill can be integrated with Model Context Protocol (MCP) servers to enable Claude Desktop and other MCP clients to autonomously pay for and use x402 APIs.
See the full MCP integration guide: x402-MCP.md
Key capabilities:
- Expose x402 services as MCP tools in Claude Desktop
- Automatic payment handling when Claude calls an API
- Support for both EVM (Base) and Solana networks
- No manual payment steps — fully autonomous
Example: Claude can discover weather APIs via this skill, then call them via MCP with automatic USDC micropayments on Base.
Facilitators Queried
| Facilitator | Discovery URL | Notes |
|---|---|---|
| Coinbase CDP | api.cdp.coinbase.com/platform/v2/x402/discovery/resources |
Largest catalog, default |
| PayAI | facilitator.payai.network/discovery/resources |
Alternative catalog |
Both are queried and merged when you run "list services".
Output Format
Service list:
🛒 x402 Bazaar — 42 services found
1. 🌐 Weather API
URL: https://api.weather-x402.com/current
Type: http GET
Price: $0.001 USDC
Network: Base (eip155:8453)
Updated: 2h ago
2. 🤖 Llama 3.3 70B Inference
URL: https://api.x402network.com/llm/llama
Type: http POST
Price: $0.005 USDC
Network: Base (eip155:8453)
Updated: 4h ago
Paid call result:
💸 x402 Payment Executed
Endpoint: https://api.weather-x402.com/current
Paid: $0.001 USDC
Network: Base (eip155:8453)
TxHash: 0xabc123...
Status: 200 OK
📦 Response:
{"temperature": 72, "conditions": "sunny", "humidity": 45}
Spending Limits
Default max spend per call is $0.10 USDC. Set in .env:
MAX_SPEND_PER_CALL=0.10
The skill refuses any call where maxAmountRequired exceeds this limit and asks the user to confirm before proceeding.
Error Handling
| Error | Cause | Fix |
|---|---|---|
EVM_PRIVATE_KEY not set |
Missing .env key | Add key to .env (only needed for paid calls) |
Insufficient USDC balance |
Wallet underfunded | Bridge USDC to Base at bridge.base.org |
Spend limit exceeded |
Service costs more than MAX_SPEND_PER_CALL | Raise limit in .env or confirm manually |
402 verification failed |
Facilitator rejected payment | Retry or switch facilitator |
No services found |
Empty Bazaar result | Broaden search or try again later |
Network mismatch |
Service on unsupported chain | Filter by network eip155:8453 |
Supported Networks (v1.0)
- Base mainnet: eip155:8453 (real USDC)
- Base Sepolia: eip155:84532 (test USDC — use for testing)
Solana support planned for v1.1.
Listing Your Own API (Sellers)
To list your x402 API on the Bazaar (v2 spec-compliant):
- Add
bazaarResourceServerExtensionto your x402 resource server - Use
declareDiscoveryExtension()in your route configuration - Set
maxAmountRequiredin your accepts[] entries (replaces v1amountfield) - Listing is free — services set their own per-call price
The v2 discovery API returns:
{
"x402Version": 2,
"items": [...],
"pagination": {...}
}
Note: This skill handles both v1 (flat list) and v2 (wrapped response) for resilience.
MCP tool uniqueness: For MCP servers, uniqueness is determined by (resource_url, tool_name),
not just the URL, since one MCP server can host multiple tools.
Full seller guide: docs.cdp.coinbase.com/x402/bazaar
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核