x402-service-buyer

x402-service-buyer is a skill for Claude Code, Codex from nirholas/three.ws. It costs 94 tokens per session (888 once invoked), scanned A, original, Apache-2.0.

A buyer for paid web APIs on the x402 network. x402 is a payment method where an API responds with HTTP 402 and the caller pays a stated amount, commonly in USDC, before retrying the request.

In plain words
What is it for?
Use it to search paid API services, compare their terms, inspect payment options, call an approved endpoint, and show the payment receipt.
Why use it?
It helps find a suitable service, inspect its price and payment terms, and avoid paying until the user confirms within a spending limit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to search paid API services, compare their terms, inspect payment options, call an approved endpoint, and show the payment receipt.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nirholas/three.ws/x402-service-buyer
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.

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

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for x402-service-buyer

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/three.ws/x402-service-buyer/github.svg)](https://agentmods.dev/skills/nirholas/three.ws/x402-service-buyer)
Your own site
<a href="https://agentmods.dev/skills/nirholas/three.ws/x402-service-buyer"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/x402-service-buyer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for x402-service-buyer

Your own site · 80×15
<a href="https://agentmods.dev/skills/nirholas/three.ws/x402-service-buyer"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/x402-service-buyer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 888 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00094 $0.00888
Opus 5.5 $0.00038 $0.00355
Sonnet 5.5 $0.00019 $0.00178
Haiku 4.5 $0.00009 $0.00089

Measured 2mo ago against content hash 369f4631b93b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

x402-service-buyer 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 2mo 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.

community-skills/skills/x402-service-buyer/SKILL.md · 50 lines

How it starts

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

x402 service buyer

x402 lets any HTTP endpoint charge per call: it answers 402 Payment Required with a price, the caller pays in USDC, and the retried request succeeds. You are the careful buyer: find the right service, read the terms, cap the spend, confirm, pay, and show the receipt.

1. Discover

  • find_services { query, max_price_usdc } on the three.ws agent MCP server (/api/mcp-agent) searches paid services with prices.
  • search_services { query }, browse_services, and get_service { resource_url } on the x402 Bazaar MCP server (/api/mcp-bazaar) cover the wider facilitator catalog.
  • Over HTTP: GET https://three.ws/api/bazaar/search?query=<words>&maxPrice=<usdc>&limit=10.
  • Locally: the @three-ws/x402-mcp stdio server (npx -y @three-ws/x402-mcp) has find_services and inspect_endpoint.

Shortlist two or three by fit, price and whether the listing describes its output concretely. A listing that is vague about what it returns is a reason to pass.

2. Inspect before paying

Call the endpoint once without payment (or use inspect_endpoint). The 402 body lists the accepted payment options: network, asset, amount and pay-to address. Check:

  • Price: the amount in USDC per call. Convert from atomic units if needed (USDC has 6 decimals: 10000 atomic = $0.01).
  • Network: prefer a Solana option when offered; it settles in seconds for a fraction of a cent.
  • Pay-to: the address that receives funds. Note it in the confirmation.
  • Input: the query or body the endpoint expects, so the paid call is not wasted on a bad request.

3. Confirm, then pay

Show, together: service, what one call returns, price in USDC, network, pay-to address, and how many calls you plan. Wait for a clear yes.

  • Custodial agent wallet: pay_and_call { resource_url, ... } on /api/mcp-agent pays from the account's agent wallet. It needs an account signed in with the wallet:write scope, the real-funds agreement signed, and spending enabled; wallet_status shows balance and limits first.
  • Self-custodial: pay_and_call on @three-ws/x402-mcp signs with the user's own key. Set max_usd on every call, and send an idempotency_key so a retry cannot pay twice.

Read the full file on GitHub · 50 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 50 lines · 94 tokens per session scan A 369f4631b93b

Subscribe to this mod's changes

x402-service-buyer is a skill published in the GitHub repository nirholas/three.ws (287 stars, last pushed yesterday), licensed Apache-2.0. It adds 94 tokens to every session and 888 once invoked, about $0.0004 per session on Opus 5.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-09-23.

Related

x402-service-buyer compared with skills from other repositories

x402-service-buyer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
x402-service-buyernirholas/three.wsSkill287yesterdayApache-2.0A94Claude Code, Codex
pay-x402-servicenirholas/x402-payments-mcpSkill919d agoApache-2.0A51Claude Code
x402-proxycascade-protocol/x402-proxySkill104d agoApache-2.0A98Claude Code, Codex
birdeyesendaifun/skillsSkill1284mo agoApache-2.0A64Claude Code, Codex
granite-pay-per-callnirholas/ibm-x402-mcpSkill919d agoApache-2.0A49Claude Code
gblin-agent-treasurygblinproject/gblin-treasury-risk-regimeSkill111d agoMITA133Claude Code
phantom-wallet-mcpsendaifun/skillsSkill1284mo agoApache-2.0A41Claude Code, Codex