aethercore-dev/ag402/ag402-skill

Claude Code and agent skill by aethercore-dev/ag402

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

AI Agent Payment Protocol — auto-pay x402 APIs with Solana USDC. Commands: setup, pay <url>, balance, history, doctor, serve. Use exec to run CLI commands.

Install

npx vskill@latest install aethercore-dev/ag402/ag402-skill

SKILL.md

ag402 — AI Agent Payment Protocol

Use exec to run ag402 CLI commands. This skill provides autonomous payment capabilities for AI agents via the x402 protocol on Solana (USDC).

When to Use

  • Agent needs to call a paid API (HTTP 402 response)
  • Agent needs to check wallet balance or transaction history
  • Agent needs to set up payment infrastructure
  • Agent needs to start/stop a payment gateway

Quick Start

1. Check if ag402 is installed
bash
ag402 --version

If not installed:

bash
pip install ag402-core
2. Initialize wallet (non-interactive, agent-safe)
bash
ag402 init

Creates a test wallet with $100 USDC. No prompts, no human input needed.

3. Verify setup
bash
ag402 balance

Expected: $100.00 test balance.

Commands

Pay for an API call
bash
ag402 pay <url>

Sends a request to <url>. If the server returns 402 Payment Required with an x402 challenge, ag402 automatically pays and retries. Returns the API response.

Example:

bash
ag402 pay https://api.example.com/premium/data

With options:

bash
ag402 pay https://api.example.com/generate \
--method POST \
--data '{"prompt": "hello"}' \
--amount 2.50
Check balance
bash
ag402 balance
View transaction history
bash
ag402 history
ag402 history --limit 20 --type payment
Full status dashboard
bash
ag402 status
Health check
bash
ag402 doctor
Start payment gateway (seller mode)
bash
ag402 serve --target http://localhost:8000 --price 0.01 --port 4020 &
Stop gateway

Kill the background process or use Ctrl+C in the terminal.

Production Mode

For real on-chain payments, set environment variables before running:

bash
X402_MODE=production \
X402_NETWORK=mainnet \
SOLANA_RPC_URL=<your_rpc_url> \
AG402_UNLOCK_PASSWORD=<wallet_password> \
ag402 pay <url>

Or configure persistently:

bash
ag402 env set X402_MODE production
ag402 env set X402_NETWORK mainnet
ag402 env set SOLANA_RPC_URL <your_rpc_url>

Then run ag402 pay <url> normally.

Environment Variables

VariableDescriptionDefault
X402_MODEtest or productionMust be set explicitly
X402_NETWORKmainnet, devnet, localnetdevnet
SOLANA_RPC_URLSolana RPC endpointPublic devnet
AG402_UNLOCK_PASSWORDWallet unlock password—
X402_DAILY_LIMITMax spend per day (USD)10
X402_PER_MINUTE_LIMITMax spend per minute (USD)2

Security

  1. Budget limits — daily and per-minute caps prevent runaway spending
  2. Test mode first — always test with virtual funds before production
  3. Wallet isolation — use a dedicated payment wallet, not your main wallet
  4. Transaction audit — all payments logged via ag402 history

Error Recovery

ErrorFix
ag402: command not foundpip install ag402-core
Insufficient balanceag402 init (test) or deposit real USDC (production)
Non-standard 402 responseServer is not x402-compatible
On-chain payment failedCheck network: ag402 doctor
Request timed outRetry; check RPC connectivity

Architecture

Agent (exec) → ag402 CLI → x402 protocol → Solana USDC payment → API response

The agent uses exec to invoke ag402 pay <url>. The CLI handles the full 402 → negotiate → pay → retry → return flow transparently.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/aethercore-dev/ag402/ag402-skill/badge)](https://verified-skill.com/skills/aethercore-dev/ag402/ag402-skill)

Something wrong with this skill or its page? Tell us.