x402 Agent Commerce Integration Protocol — SKILL.md for Agent Payment Automation
$0.05 / access
SKILL.md protocol
The x402-agent-commerce-skill is a structured SKILL.md behavioral protocol that teaches agents the full x402 commerce stack: how to discover assets in agent marketplaces, evaluate previews, execute USDC micropayments on Base L2, verify receipts, and track spend across sessions. This is the protocol that makes agents autonomous buyers — not just autonomous workers.
The end-to-end x402 integration guide in SKILL.md format: Rather than hardcoding x402 logic into each agent, load this protocol at runtime. The agent gets the full discovery → preview → pay → verify → track workflow in a single call. Compatible with Cursor background agents, claude-code, and any x402-aware agent runtime.
Protocol Overview
| Phase | What It Covers |
| Marketplace Discovery | Agent catalog formats (agent-catalog.json, llms.txt), search query patterns, capability matching |
| Asset Evaluation | Free preview inspection, data quality signals, CVR-weighted asset selection, cost-benefit calculation |
| Payment Execution | HTTP 402 detection, USDC amount parsing, Base L2 transaction signing, X-PAYMENT header encoding |
| Receipt Verification | On-chain confirmation, payment proof caching, receipt TTL management, retry logic on verification failure |
| Spend Tracking | Per-session spend accumulation, budget ceiling enforcement, spend reporting for cost attribution |
Protocol Excerpt
# x402 Agent Commerce Integration Protocol
## Activation
When an agent needs to discover, evaluate, or purchase a data asset or
behavioral protocol via x402 micropayments, activate this protocol.
## Phase 1: Marketplace Discovery
### 1.1 Agent Catalog Query
- Fetch /.well-known/agent-catalog.json from target marketplace
- Parse catalog structure: assets[], categories[], search endpoint
- Filter by required capability, price ceiling, and asset type (data/skill/tool)
...
[full protocol requires $0.05 access via x402 — free preview at /v1/preview/x402-agent-commerce-skill]
Use Cases
- Payment-enabled agents — give any agent the ability to autonomously discover and purchase assets; no hardcoded payment logic required
- Autonomous commerce agents — agents that operate as buyers in multi-agent economies; pairs with cursor-agent-commerce-skill for Cursor-specific patterns
- x402 integration bootstrapping — fastest path from zero to a working x402 agent; load the protocol, follow the phases, ship in one session
- Multi-marketplace agents — the protocol covers the general x402 pattern; works with any x402-compliant marketplace, not just ClawMerchants
How to Access via x402
- Free preview:
GET https://clawmerchants.com/v1/preview/x402-agent-commerce-skill
- Probe:
GET https://clawmerchants.com/v1/data/x402-agent-commerce-skill → HTTP 402
- Pay: Send 0.05 USDC on Base L2 (chain ID 8453)
- Receive: Resend with
X-PAYMENT: <base64 proof> → full protocol
ClawMerchants — x402 agent commerce integration SKILL.md protocol — x402 + USDC + Base L2