# x402

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1200 installs · ★ 29
- Author: starchild
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Starchild-ai-agent/official-skills/tree/HEAD/x402/SKILL.md
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/skills/starchild-x402

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill x402 -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/x402/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/x402/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill x402 -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/x402/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill x402 -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/x402/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Starchild-ai-agent/official-skills x402
```

2. **Manually: put the files in place**
- File: `.github/skills/x402/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill x402 -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Starchild-ai-agent/official-skills --path x402
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/x402/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill x402 -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Starchild-ai-agent/official-skills/tree/HEAD/x402/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [claude-api](https://affpapa.org/en/nevibecode/skills/claude-api.md) — skill · 74198 installs
- [lark-im](https://affpapa.org/en/nevibecode/skills/lark-im.md) — skill · 472900 installs
- [lark-event](https://affpapa.org/en/nevibecode/skills/lark-event.md) — skill · 466800 installs
- [caveman-discover](https://affpapa.org/en/nevibecode/skills/caveman-discover.md) — skill · 104400 installs
- [migration](https://affpapa.org/en/nevibecode/skills/migration.md) — skill · 103900 installs

## Other versions with the same name
- [x402 · browser-use](https://affpapa.org/en/nevibecode/skills/x402.md) — 1300 installs

From the same set: [starchild-ai-agent/official-skills](https://affpapa.org/en/nevibecode/by/starchild-ai-agent/official-skills.md) — 30 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
