Built on affaan-m/ECC by @affaan-m (239,635 stars, MIT). All credit for the original idea to them. This fork improves and repackages it; upstream license preserved in UPSTREAM_LICENSE.
A Claude Code skill for safe x402 agent payments with clear budgets, spend limits, and non-custial wallets.
For developers who want an AI agent to pay for APIs or services without letting it control its own money rules.
Paid agent tools need hard limits.
This skill helps you set a task budget, session budget, approved payees, and payment rate limit.
It covers Base with agentwallet-sdk and X Layer with OKX Payments. It also makes one rule clear: no wallet check or payment without human approval.
mkdir -p ~/.claude/skills/agent-payment-x402 && curl -fsSL https://raw.githubusercontent.com/your-org/agent-payments-plus/main/SKILL.md -o ~/.claude/skills/agent-payment-x402/SKILL.mdRestart Claude Code after installing.
Ask Claude Code to use the skill before you add payment tools:
Use the agent-payment-x402 skill. I need a paid data API with a $0.50 task budget, a $5 session budget, api.example.com as the only approved recipient, and no more than 20 payments per hour.
Expected result:
Payment policy set:
- Task budget: $0.50
- Session budget: $5.00
- Approved recipient: api.example.com
- Rate limit: 20 payments per hour
Paid actions stay blocked until you give clear approval.
Before every paid call, check the price, budget, recipient, and tool result. Stop on missing, bad, or unclear payment data. Never put private keys in prompts, logs, code, or chat.
- A human sets every spending limit.
- The agent must never set or raise a limit.
- Use a non-custodial wallet.
- Test on Base Sepolia before mainnet.
- Check installed tool names and docs before production use.
- Do not use payment tools without human approval.
- Translated and simplified the skill from Japanese into clearer English.
- Added community/open-source attribution and a requirement to preserve it.
- Strengthened explicit payment, wallet, private-key, recipient, and error-handling safeguards.
- Reorganized the x402 and spending-policy guidance into shorter step-by-step sections.
- Added a clear “do not use without human approval” rule and caveats to verify installed tool details.
MIT. The upstream license is preserved in UPSTREAM_LICENSE.
