x402-scaffold

x402-scaffold is a command for Claude Code from Aznatkoiny/zAI-Skills. It costs 39 tokens per session (1,008 once invoked), scanned A, original, MIT.

A command that creates an x402 payment starter: either a seller API that requires payment or a buyer client that pays for access.

In plain words
What is it for?
Use it to scaffold a seller or buyer implementation for Base or Solana, provided you specify the role and blockchain.
Why use it?
It provides a defined starting point for the payment flow and uses test networks by default to reduce the risk of accidental real payments.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: positional $N argument.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ai-toolkit plugin — 6 skills, 4 commands, 2 agents shipped together

Good fit Use it to scaffold a seller or buyer implementation for Base or Solana, provided you specify the role and blockchain.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Aznatkoiny/zAI-Skills
Claude Code
/plugin install ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 6 skills, 4 commands, 2 agents.

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 x402-scaffold

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/aznatkoiny/zai-skills/x402-scaffold"><img src="https://agentmods.dev/badge/commands/aznatkoiny/zai-skills/x402-scaffold.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,008 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00039 $0.01008
Opus 5.5 $0.00016 $0.00403
Sonnet 5.5 $0.00008 $0.00202
Haiku 4.5 $0.00004 $0.00101

Measured 25d ago against content hash 1b59da0eb932, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

x402-scaffold scanned grade A with 1 finding 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 25d 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.

Makes network callslowCapability

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

- **Seller:** a receiving address in `.env`, then `npm start`, then try it with `/x402-scaffold buyer evm` or `curl -i localhost:4021/weather` (they'll see the 402).
AI-Toolkit/commands/x402-scaffold.md · 56 lines

How it starts

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

Scaffold an x402 starter project using the x402-payments skill bundled with this plugin.

What the user asked for

$ARGUMENTS

Read two choices from it:

  • Role: seller (an API that charges per request) or buyer (a client or agent that pays).
  • Chain: evm (Base) or svm (Solana).

If either is missing, default to seller and evm. Say the assumption in one line and tell the user how to get the other variant (for example /x402-scaffold buyer evm). Ask only if their words point both ways.

Ground rules

The starter is wired for testnet: Base Sepolia (eip155:84532) or Solana Devnet, with the free facilitator https://x402.org/facilitator. Testnet is the safe default because nothing real can be lost while the user learns. If the user explicitly asks for mainnet, still build the testnet starter, add the mainnet settings as a commented-out block taken from the skill's references/deployment.md, and explain what switching on would change before you write it.

Keys never go into code, the conversation, or git: .env.example holds placeholders, .env is gitignored, and the code reads keys from the environment.

Build it

Read ${CLAUDE_PLUGIN_ROOT}/skills/x402-payments/SKILL.md, then the reference for the role: references/server-patterns.md for a seller, references/client-patterns.md for a buyer (both under ${CLAUDE_PLUGIN_ROOT}/skills/x402-payments/). Base the code on the skill's quick starts, which follow the official x402 examples.

Create this in the current directory (if it isn't empty, ask before writing, or offer a subfolder):

package.json      "type": "module", "engines": { "node": ">=22" }, scripts: { "start": "tsx src/index.ts", "typecheck": "tsc --noEmit" }
tsconfig.json     module/moduleResolution "NodeNext", target ES2022, strict
.env.example      placeholders only, with a comment on each variable
.gitignore        node_modules, .env
README.md         what it does, how to run it, how to get test USDC, what to try next
src/index.ts

Read the full file on GitHub · 56 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. 25d ago Changed · -11 lines · +10 tokens per session 1b59da0eb932
  2. 3mo ago First seen · 67 lines · 29 tokens per session scan A 17d31ddf09eb

Subscribe to this mod's changes

x402-scaffold is a command published in the GitHub repository Aznatkoiny/zAI-Skills (10 stars, last pushed 26d ago), licensed MIT. It adds 39 tokens to every session and 1,008 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

x402-scaffold compared with commands from other repositories

x402-scaffold next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
x402-scaffoldAznatkoiny/zAI-SkillsCommand1026d agoMITA39Claude Code
orchestrateegorfedorov/claude-context-optimizerCommand1422d agoMITA0Claude Code
symfony-votersdev-toolings/superpowers-symfonyCommand23622d agoMITA12Claude Code
api-genhalflength-ampleness75/claude-code-recipesCommand31mo agoMITA14Claude Code
conjurejohn-farina/claude-pluginsCommand11mo agoMITB62Claude Code
conjure-mcpjohn-farina/claude-pluginsCommand11mo agoMITB35Claude Code
conjure-helpjohn-farina/claude-pluginsCommand11mo agoMITB46Claude Code