agent-payment-x402

agent-payment-x402 is a skill for Claude Code, Codex from gongyijie85/dsh-ecc. It costs 76 tokens per session (2,542 once invoked), scanned A, a copy of agent-payment-x402, MIT.

A way for AI agents to make payments for online services using the x402 HTTP payment protocol, with task budgets, spending rules, and non-custodial wallets. It covers Base and X Layer payment routes.

In plain words
What is it for?
Use it to pay for 402-protected APIs, buy services, settle payments between agents, enforce per-task limits, or connect payment support to TypeScript and Go APIs.
Why use it?
It lets an agent pay for an API, service, or another agent while limiting how much it can spend and avoiding a wallet that someone else controls.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code.

Good fit Use it to pay for 402-protected APIs, buy services, settle payments between agents, enforce per-task limits, or connect payment support to TypeScript and Go APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gongyijie85/dsh-ecc/agent-payment-x402
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gongyijie85/dsh-ecc --skill agent-payment-x402
Clone the repo
git clone --depth 1 https://github.com/gongyijie85/dsh-ecc

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-payment-x402

README.md
[![agentmods](https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/agent-payment-x402/github.svg)](https://agentmods.dev/skills/gongyijie85/dsh-ecc/agent-payment-x402)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/agent-payment-x402"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/agent-payment-x402/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-payment-x402

Your own site · 80×15
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/agent-payment-x402"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/agent-payment-x402.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,542 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.02542
Opus 5 $0.00038 $0.01271
Sonnet 5 $0.00015 $0.00508
Haiku 4.5 $0.00008 $0.00254

Measured 12d ago against content hash 78ac50508665, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

agent-payment-x402 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

94% identical to agent-payment-x402 — 28 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/agent-payment-x402/SKILL.md · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Payment Execution (x402)

Enable AI agents to make policy-gated payments with built-in spending controls. Uses the x402 HTTP payment protocol and MCP tools so agents can pay for external services, APIs, or other agents without custodial risk.

When to Use

Use when: your agent needs to pay for an API call, purchase a service, settle with another agent, enforce per-task spending limits, or manage a non-custodial wallet. Pairs naturally with cost-aware-llm-pipeline and security-review skills.

Decision Tree

Choose the integration path based on whether your agent is buying access to a paid API or charging others for one:

Need Recommended path
Agent pays a 402-gated API on Base or another agentwallet-supported chain Use agentwallet-sdk as an MCP payment server with strict spending policy
Agent pays a 402-gated API on X Layer Use OKX Agent Payments Protocol from okx/onchainos-skills; okx-x402-payment is a deprecated legacy alias
TypeScript API charges agents Use OKX Payments TypeScript seller SDK docs for Express, Hono, Fastify, or Next.js
Go API charges agents Use OKX Payments Go seller SDK docs for Gin, Echo, or net/http
Rust API charges agents Use OKX Payments Rust seller SDK docs for Axum
Java API charges agents Use OKX Payments Java seller SDK docs for Spring Boot 2/3, Java EE, or Jakarta
Python API charges agents Check the current OKX Payments repository before implementation; a Python seller guide may not be available

Supported Networks

  • agentwallet-sdk: use the package docs to confirm current network coverage before production. Base Sepolia is the safest development default; Base mainnet is the production path called out by the original skill.
  • OKX Payments / X Layer: current seller docs target X Layer (eip155:196) and USDT0 settlement. Fetch current SDK docs before generating production code because payment packages and facilitator behavior can change quickly.

Read the full file on GitHub · 226 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 226 lines · 76 tokens per session scan A 78ac50508665

Subscribe to this mod's changes

agent-payment-x402 is a skill published in the GitHub repository gongyijie85/dsh-ecc (7 stars, last pushed yesterday), licensed MIT. It adds 76 tokens to every session and 2,542 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to agent-payment-x402, differing in 28 lines, and is treated as a copy.

Related

Other skills, from other repositories

manage-taskboard

Manage work in the native DeepSeek Harness Taskboard with exact task ids and optimistic versions. Use when an Agent must inspect project work, claim an eligible todo, record progress or blockers, verify an implementation, submit it for human review, or release its own claim; also use when a human asks how to accept…

shengsheng90/DSH-taskboard · 88 tokens

investor-distiller

An analysis tool for studying investment bloggers on WeChat, a Chinese messaging and publishing platform. It collects their articles and builds a structured profile of their trading methods, market views, writing style, topics and audience interaction.

redfox-data/redfox-community-dsh · 113 tokens

gzh-astock-top

A tool for ranking prominent Chinese WeChat public accounts about A-shares, which are stocks listed on mainland Chinese exchanges. It returns account statistics and each account’s latest article for a chosen date.

redfox-data/redfox-community-dsh · 89 tokens

stock-analysis

A stock-analysis assistant based on writing styles distilled from five Chinese investment publishers. It combines their historical viewpoints with current market data to produce several kinds of stock and portfolio analysis.

redfox-data/redfox-community-dsh · 181 tokens

stock-feed

An A-share stock-news monitor that searches Xiaohongshu, Douyin, and public WeChat accounts for recent Chinese market discussions. It filters unrelated posts and compares signals across platforms in structured or visual reports.

redfox-data/redfox-community-dsh · 127 tokens

ai-intelligence-investigator

A research tool for investigating Chinese A-share companies, industries, events, competitors and people. A-shares are stocks listed on mainland Chinese exchanges; the tool gathers sources and produces structured reports with confidence labels.

redfox-data/redfox-community-dsh · 127 tokens