x402
できること
このスキルは、標準のHTTP 402の支払い応答を使い、ウェブサービスがリクエストごとに課金する仕組みであるx402を扱います。エージェントは支払い要求を解読し、署名する支払いを準備し、ファシリテーターのサービスを使って支払いを検証または決済できます。
使う場面
- ✓オンラインサービスが支払い要求を返し、エージェントがそれに支払う必要があるとき。
- ✓自分のAPIのリクエストごとに、他のエージェントに課金したいとき。
- ✓承認する前に、支払い要求を確認する必要があるとき。
スキルのリンク
https://github.com/internet-court/internet-court-skill/blob/main/vendored/chaingpt/x402/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“APIが支払いを求めてきたので、支払う前に、何をいくら払うよう求めているのかを説明してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは支払い要求を読み、金額、コイン、受取人を分かりやすく説明します。署名されていない支払いを準備し、あなたのウォレットが署名し、エージェントがそれを要求とともに送り返します。ファシリテーターは、あなたが署名した金額や受取人を変えることはできません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
x402 Payments skill
x402 turns HTTP 402 Payment Required into a real payment rail for agents: a
server replies 402 with what it wants paid; the client signs an off-chain
authorization and retries with an X-PAYMENT header; a facilitator broadcasts
it. Settlement uses EIP-3009 transferWithAuthorization (e.g. USDC on Base) —
the facilitator can only broadcast the signed authorization, never alter the
amount or destination.
Custody-free: the plugin builds the EIP-712 the payer signs and assembles the header; it never holds a key.
Tools
| Tool | Purpose |
|---|---|
chaingpt_x402_decode |
Decode a 402 body or X-PAYMENT header into human terms (amount/token/recipient/expiry) before paying. |
chaingpt_x402_build_payment |
Build the UNSIGNED EIP-3009 typed data; pass a signature back to get the final X-PAYMENT header. |
chaingpt_x402_facilitator |
Call a facilitator: supported / verify / settle. |
chaingpt_x402_create_requirements |
Server side: generate the PaymentRequirements + 402 body to monetize your endpoint. |
chaingpt_x402_fetch |
The whole client loop in one tool: fetch a URL; on 402 it decodes the challenge and (given from) emits the unsigned typed data; re-call with xPaymentHeader to complete the paid request. |
Pay an endpoint (client flow)
Fast path — one tool drives the loop:
chaingpt_x402_fetch url=<resource> from=<payer>→ on 402 you get the decoded price/payee AND the unsigned EIP-3009 typed data.- Sign the typed data in the payer's wallet.
chaingpt_x402_build_payment from=<payer> requirements=<from step 1> signature=0x…→ theX-PAYMENTheader.chaingpt_x402_fetch url=<resource> xPaymentHeader=<header>→ the paid response.
Manual path (same primitives, finer control): _decode → _build_payment → sign → _build_payment +signature → retry yourself.
Monetize your endpoint (server flow)
chaingpt_x402_create_requirements network=base amount=0.01 payTo=<you> → serve
the returned JSON with HTTP 402. Verify/settle incoming payments via a
facilitator (chaingpt_x402_facilitator).
Known EIP-3009 tokens: USDC on base and base-sepolia. For other tokens pass
full PaymentRequirements (with asset + extra.name/extra.version).
0 ChainGPT credits.
よくある質問
エージェントは私のウォレットの鍵を持ちますか?
いいえ。このスキルは、エージェントが鍵を一切持たず、署名はあなたのウォレットが行うとしています。
ファシリテーターとは何ですか?
署名された支払いを検証し、ブロックチェーンに送るサービスです。
どのコインを使いますか?
スキルの例では、BaseネットワークのUSDCを使います。
詳細
作者による元の説明
x402 agentic payments (Coinbase's HTTP 402 protocol). Custody-free tools to pay x402-protected endpoints (build the EIP-3009 transferWithAuthorization the payer signs, assemble the X-PAYMENT header), call a facilitator (verify/settle/supported), and monetize your own API by generating PaymentRequirements. USDC on Base. Triggers: x402, HTTP 402, pay per request, agentic payment, machine payment, X-PAYMENT, transferWithAuthorization, EIP-3009, facilitator, monetize API, pay for API, agent pays.
人気
- GitHubのスター
- 7.0k
- ランキング
- #13623
- ライセンス
- —
- 更新日
- 2026/10/26
コメント
- …
このリポジトリの他のスキル
internet-court
7.0kエージェントが、他のAIエージェントや有料サービスと安全に支払い、雇用、取引できるよう支援し、適切な専門ガイドを案内します。
genlayer-erc7710-connector
7.0kエージェントが、AIによるレビューの結果を権限の仕組みにつなぎ、悪いレビューがエージェントの権限を制限または取り消せるよう支援します。
genlayer-intelligent-contracts
7.0kエージェントが、別のエージェントが委任された範囲を守ったかを判定するAIの審査役について、ルール、証拠、出力を定義できるよう支援します。
x402-erc7710
7.0kエージェントが、リクエストごとにウェブサービスの支払いを行い、許可された予算の範囲内で継続的な支出を設定できるよう支援します。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。