agentkit-x402

agentkit-x402 is a skill for Claude Code from worldcoin/agentkit. It costs 109 tokens per session (2,302 once invoked), scanned A, original, MIT.

An HTTP payment-handling skill for AI agents using websites and APIs protected by x402 and AgentKit. It checks whether an agent can prove it is backed by a human before paying.

In plain words
What is it for?
Use it after receiving a 402 Payment Required response from an API or website. It helps inspect the response, authenticate with AgentKit, and pay only when needed.
Why use it?
It helps avoid unnecessary payments when free or discounted access is available. It also guides the agent through signing and sending the required proof.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agentkit plugin — 2 skills shipped together

Good fit Use it after receiving a 402 Payment Required response from an API or website. It helps inspect the response, authenticate with AgentKit, and pay only when needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/worldcoin/agentkit/agentkit-x402
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add worldcoin/agentkit --skill agentkit-x402
Clone the repo
git clone --depth 1 https://github.com/worldcoin/agentkit

Made for: Claude Code.

Or install agentkit, the plugin that ships this one along with the rest of its 2 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/worldcoin/agentkit/agentkit-x402"><img src="https://agentmods.dev/badge/skills/worldcoin/agentkit/agentkit-x402.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,302 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 34
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 74
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 144
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 152
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 184
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium MCP Rug Pull · line 214
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00109 $0.02302
Opus 5.5 $0.00044 $0.00921
Sonnet 5.5 $0.00022 $0.00460
Haiku 4.5 $0.00011 $0.00230

Measured 2mo ago against content hash cbb6646d33d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agentkit-x402 scanned grade A with 0 findings 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 2mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agentkit-x402/SKILL.md · 236 lines

How it starts

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

Using AgentKit as an Agent

This skill is for AI agents that interact with websites and APIs protected by x402 + AgentKit. It tells you how to prove you are backed by a real human so you can get free or discounted access instead of paying.

Critical Rule: Always Check for AgentKit Before Paying

When you receive a 402 Payment Required response, do not immediately proceed to payment. First inspect the response for an agentkit extension. If one is present, attempt the AgentKit authentication flow below. Only fall back to payment if:

  • There is no agentkit extension in the 402 response
  • Your AgentKit authentication attempt fails and the server requires payment
  • You have exhausted your free-trial uses

Preferred Runtime Helper

If you can change the agent's HTTP client, use createAgentkitClient from @worldcoin/agentkit and route x402 API calls through agentkit.fetch. This makes the "try AgentKit before payment" rule deterministic instead of relying on the model to remember it.

import { createAgentkitClient } from '@worldcoin/agentkit'

const agentkit = createAgentkitClient({
  signer: {
    address: wallet.address,
    chainId: 'eip155:8453',
    type: 'eip191',
    signMessage: message => wallet.signMessage(message),
  },
})

const response = await agentkit.fetch('https://api.example.com/data')

If agentkit.fetch returns another 402, continue with the normal x402 payment flow.

Wallet Types

Your wallet determines how you sign the challenge. There are two types:

EOA (Externally Owned Account)

A standard wallet where you directly hold the private key (e.g. a raw private key, a mnemonic-derived wallet).

  • Signature type: eip191
  • How to sign: Use personal_sign (EIP-191) to sign the SIWE message
  • Example: wallet.signMessage(siweMessage)

Smart Contract Wallet (SCW)

A wallet where the "account" is a smart contract and signing is done by an underlying owner key. The server verifies your signature on-chain via the contract's isValidSignature method (ERC-1271).

Read the full file on GitHub · 236 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. 2mo ago First seen · 236 lines · 109 tokens per session scan A cbb6646d33d0

Subscribe to this mod's changes

agentkit-x402 is a skill published in the GitHub repository worldcoin/agentkit (25 stars, last pushed 17d ago), licensed MIT. It adds 109 tokens to every session and 2,302 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

agentkit-x402 compared with skills from other repositories

agentkit-x402 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentkit-x402worldcoin/agentkitSkill2517d agoMITA109Claude Code
signature-replayPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0A31Claude Code, Codex
official-sui-skillsMystenLabs/suiSkill7.8kyesterdayApache-2.0A116Claude Code, Codex
bridgealsk1992/CloddsBotSkill3.1k1mo agoMITA13Claude Code, Codex
onchainkitalsk1992/CloddsBotSkill3.1k1mo agoMITA24Claude Code, Codex
marginfialsk1992/CloddsBotSkill3.1k1mo agoMITA11Claude Code, Codex
devtools-event-clientTanStack/devtoolsSkill510yesterdayMITA79Claude Code, Codex