Skip to content
Back to skills

Agent Payment X402

ASecurity

Use when adding x402 payment execution to agents with budgets and non-custodial wallets. Triggers on \"agent-payment-x402\", \"agent payment x402\", \"x402\".

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 19, 2026
ai-agentsapi

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add majinmagros/magros.ai-skills --skill agent-payment-x402 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Payment X402?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Payment X402
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majinmagros-agent-payment-x402/badge)](https://www.skillsdirectory.com/skills/majinmagros-agent-payment-x402)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-payment-x402
description: "Use when adding x402 payment execution to agents with budgets and non-custodial wallets. Triggers on \"agent-payment-x402\", \"agent payment x402\", \"x402\"."
metadata:
  origin: ECC
---

# Agent Payment Execution (x402)

Policy-gated agent payments over x402 with spending controls, no custodial risk. Detalhes em `references/`.

## When to Activate

- Agent must pay for a 402-gated API call or service
- Settling payments with another agent (Base or X Layer)
- Enforcing per-task or per-session spending limits
- Managing a non-custodial agent wallet (ERC-4337)
- Exposing a seller API that charges agents via x402

## Core Principles

1. **Route by chain** — Base/multi-chain via agentwallet-sdk; X Layer via OKX protocol
2. **Policy before delegation** — orchestrator sets budgets; agent never self-escalates
3. **Pin versions** — key-handling subprocesses never float on unpinned `npx`
4. **Fail closed** — unreachable payment tool blocks the paid action
5. **Audit everything** — `list_transactions` in post-task hooks; testnets first

## Example

```json
{ "mcpServers": { "agentpay":
  { "command": "npx", "args": ["agentwallet-sdk@6.0.0"] } } }
```

## References

- `references/protocol-controls.md` — decision tree, networks, x402 flow, SpendingPolicy, wallets
- `references/mcp-setup.md` — pinned MCP config, agent tools, OKX buyer/seller paths
- `references/orchestrator-example.md` — set_policy + fail-closed preToolCheck (5 paths)
- `references/practices-production.md` — budgets, pinning, audit, testnets, production links

## Checklist

- [ ] Correct path: agentwallet-sdk (Base) vs OKX protocol (X Layer)
- [ ] Package version pinned; wallet key via env, validated pre-start
- [ ] `set_policy` verified successful before any delegation
- [ ] preToolCheck fail-closed on invalid input, transport, shape, budget
- [ ] Spend audited; dev on Base Sepolia before mainnet

Files in this skill

  • SKILL.md1.9 KB
  • references/mcp-setup.md1.9 KB
  • references/orchestrator-example.md3.1 KB
  • references/practices-production.md1.3 KB
  • references/protocol-controls.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…