ag402: Skill for Claude Code

.claude/skills/buy/SKILL.md

buy is a skill for Claude Code from AetherCore-Dev/ag402. It costs 55 tokens per session (2,175 once invoked), scanned B, original, MIT.

A setup guide for using the x402 payment protocol to call APIs that require payment, with payment made in USDC on the Solana blockchain.

In plain words
What is it for?
Use it to connect an agent or script to paid x402 APIs, configure a wallet, and integrate the buyer client with tools such as Claude Code or Cursor.
Why use it?
It lets an AI agent or HTTP client respond to a payment-required response, pay for the request, and retry it with payment proof.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument; mentions Claude Code; built for openclaw.

This is AetherCore-Dev/ag402's own configuration. It tells Claude Code how to work on ag402 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ag402 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AetherCore-Dev/ag402. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AetherCore-Dev/ag402/main/.claude/skills/buy/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AetherCore-Dev/ag402

Made for: Claude Code.

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 buy

README.md
[![agentmods](https://agentmods.dev/badge/skills/aethercore-dev/ag402/buy/github.svg)](https://agentmods.dev/skills/aethercore-dev/ag402/buy)
Your own site
<a href="https://agentmods.dev/skills/aethercore-dev/ag402/buy"><img src="https://agentmods.dev/badge/skills/aethercore-dev/ag402/buy/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 buy

Your own site · 80×15
<a href="https://agentmods.dev/skills/aethercore-dev/ag402/buy"><img src="https://agentmods.dev/badge/skills/aethercore-dev/ag402/buy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,175 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00055 $0.02175
Opus 5.5 $0.00022 $0.00870
Sonnet 5.5 $0.00011 $0.00435
Haiku 4.5 $0.00006 $0.00217

Measured 2mo ago against content hash 3ceb69a795b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

buy scanned grade B with 2 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 2mo 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.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

1. Restart the AI tool (or reload MCP config)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

This injects `ag402_core.enable()` via `sitecustomize.py`, so all `urllib`/`httpx`/`requests` calls that receive 402 will be auto-paid. Works for any Python script.
.claude/skills/buy/SKILL.md · 270 lines

How it starts

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

Buy — Connect an AI Agent to Paid x402 APIs

Overview

This skill sets up the buyer side of the x402 payment protocol. It configures an AI agent (or any HTTP client) to automatically detect 402 Payment Required responses, pay on-chain in USDC on Solana, and retry the request with proof of payment — all transparently.

Result: The user's AI agent or script can call any x402-gated API and auto-pay.

When to Use

  • User says "buy", "pay for API", "auto-pay", "connect to paid API", or "use x402"
  • User wants to integrate ag402 into Claude Code, Cursor, or another AI tool
  • User wants their agent to autonomously pay for API calls
  • User wants to call an ag402 serve gateway from the buyer side

Step 1: Install (Silent)

Check that ag402 is installed. Only speak if something is missing.

ag402 --version

If this fails:

pip install ag402-core

For AI tool integration (MCP), also install:

pip install ag402-client-mcp

Step 2: Wallet Setup

If the user is present and can interact with the terminal, ask them to choose:

  • A) Quick start — test mode (recommended) → no wallet needed, 100 USDC test funds deposited automatically
  • B) I have a Solana wallet and want production mode → will need private key + ag402 upgrade

For option A (vast majority of users), run:

ag402 setup

ag402 setup is an interactive wizard with prompts (password input, confirmations). Let the user run it directly — do not try to automate or pipe input to it.

If you are operating autonomously (no human in the loop), use ag402 init instead:

ag402 init

ag402 init is non-interactive — it creates a test wallet and deposits $100 USDC with zero prompts. This is the correct command for AI agents acting autonomously.

After either command, verify:

ag402 balance

Expected: shows $100.00 test balance.

For option B, start with option A first (test mode), verify everything works, then upgrade:

Read the full file on GitHub · 270 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. 2mo ago First seen · 270 lines · 55 tokens per session scan B 3ceb69a795b7

Subscribe to this mod's changes

buy is a skill published in the GitHub repository AetherCore-Dev/ag402 (9 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 2,175 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads mcp configuration, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

aomi-transact

Build natural-language crypto/DeFi agents and EVM MCP plugins (Claude Code, Cursor, Codex, Gemini). Aomi turns prompts into wallet-signed txs on Ethereum, Base, Arbitrum, Optimism, Polygon, Linea — non-custodial, fork-simulated. 40+ apps: Uniswap, Aave, Lido, Morpho, GMX, Hyperliquid, Polymarket.

sickn33/agentic-awesome-skills · 95 tokens

officecli-financial-model

Use this skill when the user wants to build a financial model — 3-statement model, DCF valuation, LBO, SaaS unit economics, sensitivity / scenario analysis, debt schedule, or fundraising projections — in Excel. Trigger on: 'financial model', '3-statement model', 'P&L + BS + CF', 'DCF', 'WACC', 'NPV', 'terminal value'…

iOfficeAI/OfficeCLI · 222 tokens

portfolio

Cross-chain DeFi portfolio discovery, rebalancing suggestions, and NEAR Intent construction. Activates when the user pastes a wallet address or asks about yield/positions/rebalancing. Bootstraps a per-user "portfolio" project, aggregates positions across all the user's addresses inside one project, and offers a…

suyoumo/ClawProBench · 69 tokens

1m-trade

Integrated on-chain operations hub: integrates BlockBeats market intelligence, Hyperliquid DEX trading via hl1m, wallet creation and management at https://www.1m-trade.com, and supports local initialization using hl1m init-wallet (wallet address + proxy private key, never use the main wallet private key). Supports…

LeoYeAI/openclaw-master-skills · 79 tokens

agent-otc-trade

Facilitate over-the-counter trades between agents using Uniswap as the settlement layer. Use when user wants to trade tokens directly with another agent, settle an agent-to-agent trade through Uniswap, or execute an OTC swap with a specific counterparty agent. Verifies counterparty identity via ERC-8004, negotiates…

LeoYeAI/openclaw-master-skills · 80 tokens

agentic-street

Earn yield on USDC by investing in AI-managed DeFi funds, or launch your own fund and build a public track record on Base. Browse funds, deposit USDC, check fund performance, monitor proposals, veto suspicious trades, withdraw returns, create investment fund, propose DeFi trades via adapters or raw calls, earn…

LeoYeAI/openclaw-master-skills · 91 tokens