x402-agent-payments-guide

x402-agent-payments-guide is a skill for Claude Code, Codex from nirholas/three.ws. It costs 61 tokens per session (1,247 once invoked), scanned A, original, Apache-2.0.

A guide to x402, a protocol that lets AI agents pay for web services directly through HTTP requests using stablecoins such as USDC. A server returns a payment request, the agent signs it, and the server verifies payment before responding.

In plain words
What is it for?
Building or explaining agents that make paid HTTP requests and settle small blockchain payments.
Why use it?
It removes the need for API keys or subscriptions when an agent needs to pay for individual API calls, data, or online services.

Skill for Claude CodeCodex

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

Good fit Building or explaining agents that make paid HTTP requests and settle small blockchain payments.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/three.ws/x402-agent-payments-guide/github.svg)](https://agentmods.dev/skills/nirholas/three.ws/x402-agent-payments-guide)
Your own site
<a href="https://agentmods.dev/skills/nirholas/three.ws/x402-agent-payments-guide"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/x402-agent-payments-guide/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-agent-payments-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/nirholas/three.ws/x402-agent-payments-guide"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/x402-agent-payments-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,247 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 79
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.00061 $0.01247
Opus 5.5 $0.00024 $0.00499
Sonnet 5.5 $0.00012 $0.00249
Haiku 4.5 $0.00006 $0.00125

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

Security

Grade A, and why

x402-agent-payments-guide 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.

data/skills/protocol/x402-agent-payments-guide/SKILL.md · 176 lines

How it starts

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

x402 Agent Payments Guide

x402 is the HTTP-native micropayment protocol for AI agents. It enables agents to pay for API calls, data, and services using stablecoins — no API keys, no subscriptions, just a signed payment header.

How x402 Works

Agent → HTTP Request + x402 Payment Header → Server
                                                │
                                            Verify Payment
                                                │
                                            ✅ Valid → Serve Content
                                            ❌ Invalid → 402 Payment Required

The Flow

  1. Agent makes HTTP request to a paid endpoint
  2. Server returns 402 Payment Required with pricing info
  3. Agent signs an EIP-712 payment authorization
  4. Agent retries with X-402-Payment header
  5. Server verifies signature and serves content
  6. Payment settles on-chain (batched for efficiency)

Payment Header

X-402-Payment: {
  "version": "1",
  "sender": "0xAgentAddress",
  "amount": "0.001",
  "token": "USDs",
  "chain": "arbitrum",
  "signature": "0x...",
  "nonce": 42,
  "expiry": 1735689600
}

Supported Tokens

Token Chains Best For
USDs Arbitrum Sperax ecosystem payments
USDC Ethereum, Arbitrum, Base Standard payments
USDT Ethereum, Arbitrum Alternative stablecoin

For Agents (Paying)

Setup

import { X402Client } from '@x402/client';

const client = new X402Client({
  privateKey: process.env.AGENT_PRIVATE_KEY,
  defaultToken: 'USDs',
  defaultChain: 'arbitrum',
  maxPaymentPerRequest: '0.01',  // Safety limit
  maxPaymentPerHour: '1.00'       // Hourly limit
});

Making Paid Requests

// Automatic payment handling
const response = await client.fetch('https://api.example.com/data', {
  method: 'GET'
});
// If 402 → signs payment → retries → returns data

Budget Controls

const client = new X402Client({
  budget: {
    perRequest: '0.01',    // Max per single request
    perHour: '1.00',       // Max per hour
    perDay: '10.00',       // Max per day
    perMonth: '100.00',    // Max per month
    whitelist: ['api.chat.sperax.io', 'api.coingecko.com']  // Trusted domains
  }
});

Read the full file on GitHub · 176 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. 2mo ago First seen · 176 lines · 61 tokens per session scan A e0424ebb464c

Subscribe to this mod's changes

x402-agent-payments-guide is a skill published in the GitHub repository nirholas/three.ws (287 stars, last pushed yesterday), licensed Apache-2.0. It adds 61 tokens to every session and 1,247 once invoked, about $0.0002 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-03.

Related

x402-agent-payments-guide compared with skills from other repositories

x402-agent-payments-guide next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
x402-agent-payments-guidenirholas/three.wsSkill287yesterdayApache-2.0A61Claude Code, Codex
pay-x402-servicenirholas/x402-payments-mcpSkill919d agoApache-2.0A51Claude Code
granite-pay-per-callnirholas/ibm-x402-mcpSkill919d agoApache-2.0A49Claude Code
pumpfun-token-researchnirholas/pumpfun-claims-botSkill2511d agononeA59Claude Code
jupiter-vrfdinternet-court/internet-court-skillSkill7.2k6d agononeA45Claude Code
vybe-token-market-intelvybenetwork/solana-mcp-vybeSkill3.2k4d agononeA60Claude Code, Codex
solana-security-reviewYD811/potbot-v2Skill223d agoMITA75Claude Code, Codex