x402

A guide for finding paid web services and calling their APIs through x402, a payment protocol that lets a request pay in USDC, a dollar-linked cryptocurrency, on Base.

In plain words
What is it for?
Use it to search the service bazaar, check an endpoint's payment requirements, and call paid APIs using the x402 workflow.
Why use it?
It explains how to discover a suitable service, inspect its price and required inputs, and make the payment-backed request with the correct payment method.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nirholas/three.ws/x402
Any agent
npx skills add nirholas/three.ws --skill x402
Clone the repo
git clone --depth 1 https://github.com/nirholas/three.ws

Made for: Claude Code, Codex.

Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00140 $0.01866
Opus 5 $0.00070 $0.00933
Sonnet 5 $0.00028 $0.00373
Haiku 4.5 $0.00014 $0.00187

Measured 2d ago against content hash 564d8fa89aff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

x402 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/x402/SKILL.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

x402 Payment Protocol

Use the npx [email protected] x402 commands to discover, inspect, and call paid API endpoints using the X402 payment protocol. Payments are made in USDC on Base.

Which payment stack (arbitration)

three.ws runs two x402/payment stacks. Pick one deterministically — never settle a payment through a signing path the user didn't ask for:

  • This stack (awal / three.ws-native) — the default. Use it to browse the bazaar and settle a plain x402 402 with a one-shot USDC-on-Base payment.
  • OKX onchainos stack (okx-agent-payments-protocol) — use only when the user names OKX/OnchainOS, or the 402 is one OKX handles specifically: a payment channel / voucher / session, permit2, upto/metered billing, MPP charge, or an a2a-pay paymentId. Hand off there and do not pay from here.

Workflow

The typical x402 workflow is:

  1. Find a service - Search the bazaar or get details for a known endpoint
  2. Check requirements - Inspect price, method, and input schema
  3. Make the request - Call the endpoint with automatic USDC payment

Commands

Search the Bazaar

Find paid services by keyword using CDP's vector search:

npx [email protected] x402 bazaar search <query> [-k <n>] [--network <network>] [--scheme <scheme>] [--max-price <price>] [--json]
Option Description
-k, --top <n> Number of results, 1–20 (default: 20)
--network <name> Filter by chain (base, base-sepolia, polygon, solana, solana-devnet)
--scheme <scheme> Filter by payment scheme: exact or upto
--max-price <price> Maximum price in USD (e.g. 0.01)
--asset <address> Filter by payment asset address
--pay-to <address> Filter by recipient wallet address
--extensions <type> Filter by extension type (e.g. outputSchema, bazaar)
--json Output as JSON

Read the full file on GitHub · 161 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 161 lines · 140 tokens per session scan A 564d8fa89aff

Subscribe to this mod's changes

x402 is a skill published in the GitHub repository nirholas/three.ws (107 stars, last pushed 3d ago), licensed Apache-2.0. It adds 140 tokens to every session and 1,866 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

rtc-balance

Check RustChain wallet balance, epoch info, and network status via the public RPC.

Scottcjn/Rustchain · 20 tokens

hive-defi-research

Use this skill when the user asks about DeFi protocol metrics — TVL, fees, revenue, yields, APY, stablecoin supply, bridge volume, or chain-level DeFi totals — or wants protocols compared ("Aave vs Compound", "top protocols by TVL", "best stablecoin yields"). Use it whenever the answer needs current protocol-level…

hive-intel/hive-sdk · 106 tokens

hive-market-research

Use this skill for any live crypto market question — prices, 24h moves, liquidity, exchange/venue data, OHLC candles, order books, tickers, funding rates, derivatives, trading context — even casual asks like "what's BTC at" or "is ETH pumping". Use it whenever the answer needs current market numbers instead of memory.…

hive-intel/hive-sdk · 109 tokens

hive-prediction-markets

Use this skill when the user asks about prediction markets — Polymarket or Kalshi events, markets, outcomes, odds, prices, liquidity, stats, traders, holders, or trades — including "what are the odds of X", "find markets about Y", or comparing venues. Use it whenever live prediction-market evidence is needed. Never…

hive-intel/hive-sdk · 83 tokens

hive-query

Default entry point for any live crypto question when Hive MCP is connected — prices, wallets, tokens, DeFi, NFTs, Solana, security, markets, DEX, networks, prediction markets. Use it whenever the answer depends on live or on-chain data instead of answering from memory, even if the user never mentions Hive. Routes…

hive-intel/hive-sdk · 119 tokens

hive-token-diligence

Use this skill whenever the user asks whether a specific token is real, legit, liquid, well-held, enriched, investable, or worth researching — "is this token a scam", "run diligence on 0x…", "who holds this", "does it have real liquidity" — even if they never say "diligence". Investigates metadata, market context…

hive-intel/hive-sdk · 147 tokens