x402 Bazaar Skill for Openclaw

An autonomous discovery and payment layer for AI agents to find, filter, and pay for API services using USDC on the Base network.

coinvest518
v0.1.0
Mar 4, 2026
0
938
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openclaw-x402-skill

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openclaw-x402-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is x402 Bazaar Skill?

The x402 Bazaar Skill serves as the machine-readable discovery layer for the x402 ecosystem, allowing agents to find and integrate with compatible API endpoints and MCP tools without pre-baked integrations. It enables a frictionless economy for AI agents where services can be consumed on a pay-per-call basis, eliminating the need for traditional API keys, subscriptions, or manual account creation. By leveraging Openclaw Skills, developers can empower their agents to autonomously navigate a global catalog of services ranging from web scraping to advanced AI inference.

This skill operates in two primary modes: a browse-only mode that requires no configuration for service discovery, and a full-transaction mode that utilizes a Base wallet to execute USDC micropayments. It acts as a bridge between agentic logic and the decentralized payment infrastructure, ensuring that agents can access the tools they need exactly when they need them while maintaining strict control over spending limits.

x402 Bazaar Skill Use Cases

  • Discovering x402-compatible services for specific technical tasks like AI inference or weather data.
  • Searching for the most cost-effective API by filtering the Bazaar for services under a specific USDC price threshold.
  • Automating the lifecycle of finding, paying for, and consuming specialized data from third-party endpoints.
  • Integrating Model Context Protocol (MCP) tools into Claude Desktop with autonomous payment capabilities.
  • Inspecting the payment requirements and metadata of a specific x402 service before execution.

How x402 Bazaar Skill Works

  1. The agent queries the x402 Bazaar facilitators (like Coinbase CDP or PayAI) to locate relevant services based on keywords or categories.
  2. The skill filters results based on user-defined parameters such as maximum price, network compatibility (Base), or service type.
  3. When a service is selected for use, the agent makes an initial request to the endpoint which triggers an HTTP 402 Payment Required response.
  4. The skill extracts the payment requirements from the response headers and initiates a USDC transaction on the Base network using the provided private key.
  5. Once the transaction is confirmed, the skill retries the original request including the payment proof in the headers.
  6. The service provider verifies the proof and returns the final data payload to the agent.

x402 Bazaar Skill Setup

To begin using this skill within the ecosystem of Openclaw Skills, follow these steps:

  1. Install the required Python dependencies:
pip install -r ~/clawd/skills/openclaw-x402-skill/requirements.txt
  1. For discovery only, no further steps are required. To enable payments, configure your .env file with a Base wallet private key and a safety spending limit:
EVM_PRIVATE_KEY="0xYourPrivateKey"
MAX_SPEND_PER_CALL=0.10
  1. Ensure your wallet is funded with USDC on the Base network via bridge.base.org or a centralized exchange.

x402 Bazaar Skill Data Schema & Taxonomy

The skill processes and returns structured data regarding services and transactions:

Attribute Description
Service Name Human-readable title of the discovered API or tool.
Endpoint URL The target URL for the x402 service call.
Price The cost per request denominated in USDC.
Network The blockchain network (e.g., eip155:8453 for Base).
TxHash The transaction hash provided as proof of payment for paid calls.
Type The protocol identifier, such as http GET/POST or mcp tool.

x402 Bazaar Skill Advanced Features

  • Support for multi-facilitator discovery, merging results from Coinbase CDP and PayAI for a comprehensive catalog.
  • Full Model Context Protocol (MCP) integration, allowing x402 services to appear as native tools in Claude Desktop.
  • Resilient handling of both x402 v1 and v2 discovery specifications for maximum compatibility.
  • Automated spend limit enforcement that halts transactions exceeding the configured MAX_SPEND_PER_CALL.
  • Support for both Base Mainnet (real value) and Base Sepolia (testing) environments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*