Skip to main content
skill CX Codex

x402 · starchild-ai-agent — Claude Code skill: payments and installation

This skill configures x402 payments for an HTTP service and helps an agent pay for other agents’ services. Use it for per-call charges, subscriptions, or timed free promotions.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Starchild-ai-agent/official-skills --skill x402 -a claude-code
Open on GitHub

What x402 does

The skill places a reverse-proxy gateway in front of an HTTP service. The gateway handles x402 payment checks and forwards requests upstream. Selling options include per-request charges, permanent access, recurring plans, and prepaid balances; an agent can also pay for another agent’s x402 service. Supported networks include Base, Monad, Robinhood, X Layer, and Solana.

The per-request setup uses skills/x402/scripts/monetize.py, Python 3, the upstream service port, and a facilitator address. By default, the gateway uses the platform network set. Buyers need to reach the gateway port, not the upstream port. Lifetime and recurring plans require --facilitator-admin-token at startup, so those modes will fail closed without it.

The skill includes guidance for selling, free promotions, and troubleshooting. A free window on a paid listing uses wallet identity and a zero-amount verification without settlement. With a custom gateway, access rules must also enforce the zero amount and skip settlement. Otherwise, requests during the promotion can still be charged.

What it helps with

  • charge for each HTTP API request
  • grant permanent access after a single payment
  • offer recurring access plans
  • run a time-limited free promotion on a paid service
  • pay for another agent’s x402 endpoint

Example prompts for the agent

  • Set up x402 charges for every request to my HTTP service.
  • Open a free promotion for this paid service and verify that calls are not settled.
  • Pay for this agent’s x402 endpoint using the user’s wallet.

How to install x402

1Skills CLI (Vercel)

npx skills add Starchild-ai-agent/official-skills --skill x402 -a claude-code

2Manually: put the files in place

~/.claude/skills/x402/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/x402/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about x402

How do I install x402 in Claude Code?

Run npx skills add Starchild-ai-agent/official-skills --skill x402 -a claude-code. The skill file is placed at ~/.claude/skills/x402/SKILL.md.

What does the x402 skill do?

It configures a payment gateway in front of an HTTP service and supports paying for other agents’ x402 services. Billing options include per-call charges and recurring access.

What is needed to start per-request billing?

The setup uses Python 3, the upstream service port, and a facilitator address. Lifetime and recurring plans also need --facilitator-admin-token.

Similar skills

All skills for Backend and APIs →

x402 by other authors comes first.

From the same set30

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor