agent-payment-x402

agent-payment-x402 is a skill for Claude Code, Codex from mturac/everything-openai-codex. It costs 91 tokens per session (3,627 once invoked), scanned A, original, MIT.

A design for letting AI agents make controlled payments for APIs, services, or other agents through the x402 HTTP payment protocol and supported blockchain wallets.

In plain words
What is it for?
Use it to connect agent payments to Base or X Layer, or to add payment collection to TypeScript, Go, Rust, Java, or Python APIs.
Why use it?
It adds per-task spending limits and policy checks so an agent can pay for services without handing control of funds to a custodian.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to connect agent payments to Base or X Layer, or to add payment collection to TypeScript, Go, Rust, Java, or Python APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mturac/everything-openai-codex/agent-payment-x402
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 mturac/everything-openai-codex --skill agent-payment-x402
Clone the repo
git clone --depth 1 https://github.com/mturac/everything-openai-codex

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 agent-payment-x402

README.md
[![agentmods](https://agentmods.dev/badge/skills/mturac/everything-openai-codex/agent-payment-x402/github.svg)](https://agentmods.dev/skills/mturac/everything-openai-codex/agent-payment-x402)
Your own site
<a href="https://agentmods.dev/skills/mturac/everything-openai-codex/agent-payment-x402"><img src="https://agentmods.dev/badge/skills/mturac/everything-openai-codex/agent-payment-x402/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 agent-payment-x402

Your own site · 80×15
<a href="https://agentmods.dev/skills/mturac/everything-openai-codex/agent-payment-x402"><img src="https://agentmods.dev/badge/skills/mturac/everything-openai-codex/agent-payment-x402.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,627 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: 2 findings, 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 Agent Snooping · line 86
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 87
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
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.00091 $0.03627
Opus 5 $0.00046 $0.01813
Sonnet 5 $0.00018 $0.00725
Haiku 4.5 $0.00009 $0.00363

Measured 5d ago against content hash 9a6582cb09b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

agent-payment-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 5d 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.

docs/ja-JP/skills/agent-payment-x402/SKILL.md · 225 lines

How it starts

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

エージェント決済実行(x402)

ポリシーゲートによる決済と組み込みの支出コントロールで AI エージェントを有効化します。x402 HTTP 決済プロトコルと MCP ツールを使用して、カストディアルリスクなしに外部サービス、API、または他のエージェントへの支払いを行えます。

使用タイミング

使用する場合:エージェントが API 呼び出しへの支払い、サービスの購入、別のエージェントとの決済、タスクごとの支出制限の強制、またはノンカストディアルウォレットの管理を必要とする場合。cost-aware-llm-pipeline および security-review スキルと自然に組み合わせられます。

決定ツリー

エージェントが有料 API へのアクセスを購入するか、他者にアクセスを課金するかに基づいて統合パスを選択します:

ニーズ 推奨パス
エージェントが Base または他の agentwallet 対応チェーンの 402 ゲート API に支払う 厳格な支出ポリシーで agentwallet-sdk を MCP 決済サーバーとして使用
エージェントが X Layer の 402 ゲート API に支払う okx/onchainos-skills の OKX エージェント決済プロトコルを使用;okx-x402-payment は廃止されたレガシーエイリアス
TypeScript API がエージェントに課金する Express、Hono、Fastify、または Next.js 向け OKX Payments TypeScript セラー SDK ドキュメントを使用
Go API がエージェントに課金する Gin、Echo、または net/http 向け OKX Payments Go セラー SDK ドキュメントを使用
Rust API がエージェントに課金する Axum 向け OKX Payments Rust セラー SDK ドキュメントを使用
Java API がエージェントに課金する Spring Boot 2/3、Java EE、または Jakarta 向け OKX Payments Java セラー SDK ドキュメントを使用
Python API がエージェントに課金する 実装前に現在の OKX Payments リポジトリを確認;Python セラーガイドがない場合がある

対応ネットワーク

  • agentwallet-sdk: 本番使用前に現在のネットワークカバレッジをパッケージドキュメントで確認。Base Sepolia が最も安全な開発デフォルト;Base メインネットがオリジナルスキルで説明されている本番パス。
  • OKX Payments / X Layer: 現在のセラードキュメントは X Layer(eip155:196)と USDT0 決済を対象。決済パッケージとファシリテーターの動作が迅速に変わる可能性があるため、本番コードを生成する前に現在の SDK ドキュメントを取得すること。

仕組み

x402 プロトコル

x402 は HTTP 402(Payment Required)を機械が交渉可能なフローに拡張します。サーバーが 402 を返すと、エージェントの決済ツールが価格を交渉し、バジェットを確認し、トランザクションに署名し、オーケストレーターが設定したポリシーと確認境界内でのみリトライします。

支出コントロール

すべての決済ツール呼び出しは SpendingPolicy を強制します:

  • タスクごとのバジェット — 単一エージェントアクションの最大支出
  • セッションごとのバジェット — セッション全体の累積制限
  • 許可リストに登録された受取人 — エージェントが支払える アドレス/サービスを制限
  • レート制限 — 分/時間あたりの最大トランザクション数

ノンカストディアルウォレット

エージェントは ERC-4337 スマートアカウントを通じて独自のキーを保持します。オーケストレーターが委任前にポリシーを設定し、エージェントは境界内でのみ支出できます。プールされた資金なし、カストディアルリスクなし。

MCP 統合

決済層は OpenAI Codex またはエージェントハーネスのセットアップに組み込まれる標準 MCP ツールを公開します。

セキュリティ注意: 常にパッケージバージョンを固定してください。このツールは秘密鍵を管理します — 固定されていない npx インストールはサプライチェーンリスクをもたらします。

Read the full file on GitHub · 225 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. 5d ago First seen · 225 lines · 91 tokens per session scan A 9a6582cb09b0

Subscribe to this mod's changes

agent-payment-x402 is a skill published in the GitHub repository mturac/everything-openai-codex (89 stars, last pushed 15d ago), licensed MIT. It adds 91 tokens to every session and 3,627 once invoked, about $0.0005 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-09-03.