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.
npx skills add Starchild-ai-agent/official-skills --skill x402 -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/x402/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/x402/
1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill x402 -a codex2Manually: put the files in place
.agents/skills/x402/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill x402 -a cursor2Manually: put the files in place
.cursor/skills/x402/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Starchild-ai-agent/official-skills x4022Manually: put the files in place
.github/skills/x402/SKILL.md1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill x402 -a gemini-cli2Platform CLI
gemini skills install https://github.com/Starchild-ai-agent/official-skills --path x402Manually: put the files in place
.devin/skills/x402/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill x402 -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.