agent-payment-x402
Skill by affaan-m
Adds x402 payment execution to AI agents, with per-task budgets, spending controls and non-custodial wallets. It is for agents that must pay for APIs, services or other agents themselves.
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/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/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
Agent Payment Execution (x402) is a skill that lets AI agents make policy-gated payments over the x402 HTTP payment protocol. When a server returns HTTP 402, the agent's payment tool checks the price against its budget, signs the transaction and retries only within the boundary set by the orchestrator. The skill covers three paths: agentwallet-sdk for Base and other supported chains, OKX Agent Payments Protocol for X Layer, and the upstream x402 packages for Solana and EVM networks. Spending policy, including per-task and per-session budgets, allowlisted recipients and rate limits, is set by the orchestrator, not the agent. It is aimed at developers building agents that need to pay for services without holding pooled or custodial funds.
Written from the project's SKILL.md and checked against it.
What it can do
- get_balanceChecks the agent wallet balance.
- send_paymentSends a payment to an address or ENS name.
- check_spendingQueries the remaining budget for the agent.
- list_transactionsReturns an audit trail of all payments made.
- Per-task budgetCaps the maximum spend for a single agent action.
- Per-session budgetSets a cumulative spending limit across an entire session.
- Allowlisted recipientsRestricts which addresses or services the agent can pay.
- Rate limitsLimits transactions per minute or per hour.
What you need
- agentwallet-sdk pinned to a specific version for the MCP server path
- OKX onchainos-skills repository for X Layer payment flows
- EVM and Solana signer keys supplied through the orchestrator environment
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 all payments the agent made today for an audit.
Good to know
- Spending policy must be set by the orchestrator, not by the agent.
- The default x402.org facilitator is testnet-only and not intended for mainnet routes.
- OKX payment packages and facilitator behavior can change quickly, so current docs should be fetched before production use.
- The source notes a Python seller guide for OKX Payments may not be available.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: 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.md36 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 its own keys?
The source says agents hold their own keys through ERC-4337 smart accounts, with no pooled funds and no custodial risk. The orchestrator sets the policy before delegation.
Which networks does it support?
It supports Base through agentwallet-sdk, X Layer through OKX Payments, and Solana plus multiple EVM networks through the upstream x402 packages. The source says to confirm current coverage before production.
Why should the package version be pinned?
The source warns that this tool manages private keys, so unpinned npx installs introduce supply-chain risk. It gives agentwallet-sdk@6.0.0 as an example of a pinned version.
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.
