openclaw-x402-skill
- Repo stars 56
- License AGPL-3.0
- Author updated Live
- Author repo cryptoskill
- Domain
- AI
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 94 / 100 · audit passed
- Author / version / license
- @jiayaoqijia · AGPL-3.0
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Env read
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 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: no special runtime
---
# openclaw-x402-skill output preview
## PART A: Task fit
- Use case: Discover, browse, filter, and pay for x402-compatible API endpoints and MCP tools from the x402 Bazaar — the autonomous discovery layer for agentic payments. Browse all available services, filter by price or type, inspect payment requirements, and call any discovered endpoint using USDC micropayments on Base with no API keys or account setup. Use when the agent needs to find a payable API service, check what x402 services exist for a given task (web scraping, AI inference, weather data, market data), pay for a single API call via x402, or list services under a given price threshold. Requires EVM_PRIVATE_KEY in .env (Base wallet with USDC) for paid calls. Discovery browsing requires no keys at all..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Prerequisites / Browse only (no keys needed) / To call paid endpoints” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Discover, browse, filter, and pay for x402-compatible API endpoints and MCP tools from the x402 Bazaar — the autonomous discovery layer for agentic payments. Browse all available services, filter by price or type, inspect payment requirements, and call any discovered endpoint using USDC micropayments on Base with no API keys or account setup. Use when the agent needs to find a payable API service, check what x402 services exist for a given task (web scraping, AI inference, weather data, market data), pay for a single API call via x402, or list services under a given price threshold. Requires EVM_PRIVATE_KEY in .env (Base wallet with USDC) for paid calls. Discovery browsing requires no keys at all.”.
- **02** When the source has headings, the agent prioritizes “Prerequisites / Browse only (no keys needed) / To call paid endpoints” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands, read environment variables; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands, read environment variables; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source mentions slash commands such as `/agent-wallet`, `/alpaca-trading`; use them first when your agent supports command triggers.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands, read environment variables.
Start with a small task and check whether the result follows “Prerequisites / Browse only (no keys needed) / To call paid endpoints”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
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
## When to use
- Discover, browse, filter, and pay for x402-compatible API endpoints and MCP tools from the x402 Bazaar — the autonomou…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Prerequisites / Browse only (no keys needed) / To call paid endpoints” and keep inference separate from source facts.
- read files, write/modify files, run shell commands, read environment variables; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "openclaw-x402-skill" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Prerequisites / Browse only (no keys needed) / To call paid endpoints
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, run shell commands, read environment variables | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 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
Decide Fit First
Design Intent
How To Use It
Boundaries And Review