agent-payment-x402
Skill by affaan-m
Adds x402 payment execution to AI agents, with per-task and per-session budgets, spending controls and non-custodial wallets. It covers agentwallet-sdk for Base, OKX Payments for X Layer, and upstream x402 packages for Solana and EVM. Aimed at developers building agents that pay for APIs or services.
Install agent-payment-x402
Built from the published package, never by AI.
git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.claude/skills && cp -r /tmp/ECC/docs/ja-JP/skills/agent-payment-x402 ~/.claude/skills/agent-payment-x402Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/ECC/docs/ja-JP/skills/agent-payment-x402 ~/.gemini/antigravity-cli/skills/agent-payment-x402Antigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill lets an AI agent pay for external APIs, services, or other agents using the x402 HTTP payment protocol. Every payment call is checked against a SpendingPolicy with a per-task budget, a per-session cap, a recipient allowlist, and rate limits. The source describes non-custodial wallets in which the agent holds its own keys through ERC-4337 smart accounts, and the orchestrator sets the policy before delegating work.
The skill covers several integration paths. It uses agentwallet-sdk for Base and other supported chains, OKX Payments for X Layer, and upstream x402 packages for Solana and multi-network EVM. It includes a decision table for choosing a path, a pinned MCP configuration example, and a TypeScript client example that filters server payment requirements before signing. It is aimed at developers building agents that make or accept x402 payments.
Written from the project's SKILL.md and checked against it.
What it can do
- get_balanceChecks the balance of the agent wallet through the agentwallet-sdk MCP server.
- send_paymentSends a payment to an address or ENS name through the agentwallet-sdk MCP server.
- check_spendingQueries the remaining budget for the agent.
- list_transactionsReturns an audit trail of all payments made by the agent.
- Per-task budgetCaps the maximum spend for a single agent action.
- Per-session budgetEnforces a cumulative spending limit across a whole session.
- Recipient allowlistRestricts which addresses or services the agent is allowed to pay.
- Rate limitingLimits the number of transactions per minute or per hour.
What you need
- Node.js with npx for the agentwallet-sdk MCP server
- Signer keys for EVM and Solana, supplied through the orchestrator environment
- OKX Payments access for the X Layer path
Try asking
- Check my agent wallet balance and remaining budget for this session.
- Pay the 402-gated API endpoint, staying within the per-task limit.
- List every payment the agent made today for an audit.
Good to know
- The upstream x402.org facilitator defaults to testnets and is not for mainnet routes.
- Check network coverage in the agentwallet-sdk documentation before production use; Base Sepolia is the default for development.
- Pin package versions, since the tool manages private keys and unpinned npx installs carry supply chain risk.
- The okx-x402-payment skill is a deprecated alias; use okx-agent-payments-protocol instead.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: docs/ja-JP/skills/agent-payment-x402/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md43 KB
Alternatives to agent-payment-x402
All alternatives →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
Compare with meme-rush, okx-market or saas-metrics-coach
agent-payment-x402: common questions
Does the agent hold custody of funds?
The source describes non-custodial wallets where the agent holds its own keys through ERC-4337 smart accounts, with no pooled funds.
Who sets the spending limits?
The orchestrator sets the SpendingPolicy before delegation, and the source says the agent should not be able to set or escalate its own policy.
Which networks are supported?
The source covers Base through agentwallet-sdk, X Layer through OKX Payments, and Solana and multi-network EVM through the upstream x402 packages.
How do I install agent-payment-x402?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is agent-payment-x402 free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is agent-payment-x402 safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to agent-payment-x402?
Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.
