x402-react

x402-react is a skill for Claude Code, Codex from Dexter-DAO/opendexter-ide. It costs 56 tokens per session (1,928 once invoked), scanned A, original, MIT.

React hooks and components for x402, a payment method that lets an application request payment for online data or access.

In plain words
What is it for?
Use it to add wallet-connected paid requests, access passes, payment status, balances, transaction links, and sponsored-access suggestions to React apps.
Why use it?
It connects payment requests with users' crypto wallets instead of requiring custom payment-flow code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to add wallet-connected paid requests, access passes, payment status, balances, transaction links, and sponsored-access suggestions to React apps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dexter-dao/opendexter-ide/x402-react
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 Dexter-DAO/opendexter-ide --skill x402-react
Clone the repo
git clone --depth 1 https://github.com/Dexter-DAO/opendexter-ide

Made for: Claude Code, Codex.

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-react

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dexter-dao/opendexter-ide/x402-react"><img src="https://agentmods.dev/badge/skills/dexter-dao/opendexter-ide/x402-react.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,928 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.
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.00056 $0.01928
Opus 5 $0.00028 $0.00964
Sonnet 5 $0.00011 $0.00386
Haiku 4.5 $0.00006 $0.00193

Measured 8d ago against content hash 2fc95bc9f4d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

x402-react 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 8d 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.

packages/mcp/skills/x402-react/SKILL.md · 233 lines

How it starts

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

@dexterai/x402 React Hooks

React hooks for x402 v2 payments. Works with Solana wallet adapters and wagmi/viem for EVM.

npm install @dexterai/x402 @solana/wallet-adapter-react

useX402Payment

Main hook for payment-enabled fetch with wallet state:

import { useX402Payment } from '@dexterai/x402/react';
import { useWallet } from '@solana/wallet-adapter-react';

function PayButton() {
  const solanaWallet = useWallet();

  const {
    fetch: x402Fetch,
    isLoading,
    status,
    error,
    balances,
    connectedChains,
    transactionUrl,
    sponsoredRecommendations,
  } = useX402Payment({
    wallets: { solana: solanaWallet },
  });

  return (
    <div>
      <p>Solana: {connectedChains.solana ? 'Connected' : 'Disconnected'}</p>
      {balances.map(b => (
        <p key={b.network}>{b.chainName}: ${b.balance.toFixed(2)} {b.asset}</p>
      ))}
      <button
        onClick={async () => {
          const res = await x402Fetch('https://api.example.com/paid-data');
          const data = await res.json();
          console.log(data);
        }}
        disabled={isLoading}
      >
        {isLoading ? 'Paying...' : 'Get Data ($0.01)'}
      </button>
      {status === 'error' && <p>Error: {error?.message}</p>}
      {transactionUrl && <a href={transactionUrl}>View tx</a>}
      {sponsoredRecommendations?.map(r => (
        <p key={r.resourceUrl}>{r.sponsor}: {r.description}</p>
      ))}
    </div>
  );
}

Multi-chain with wagmi

import { useX402Payment } from '@dexterai/x402/react';
import { useWallet } from '@solana/wallet-adapter-react';
import { useAccount } from 'wagmi';

function MultiChainPay() {
  const solanaWallet = useWallet();
  const evmAccount = useAccount();

  const { fetch: x402Fetch, connectedChains, balances } = useX402Payment({
    wallets: {
      solana: solanaWallet,
      evm: evmAccount,
    },
    preferredNetwork: 'eip155:8453', // Prefer Base
  });

  // ...
}

UseX402PaymentConfig

Option Type Description
wallets { solana?, evm? } Wallet instances per chain
preferredNetwork string CAIP-2 network to prefer
rpcUrls Record<string, string> Custom RPC URLs
verbose boolean Debug logging

Read the full file on GitHub · 233 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. 8d ago First seen · 233 lines · 56 tokens per session scan A 2fc95bc9f4d9

Subscribe to this mod's changes

x402-react is a skill published in the GitHub repository Dexter-DAO/opendexter-ide (2 stars, last pushed 3d ago), licensed MIT. It adds 56 tokens to every session and 1,928 once invoked, about $0.0003 per session on Opus 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-31.

Related

Other skills, from other repositories

pn-threejs-core

Guides Three.js scenes, cameras, lighting, asset loading, animation, physics, and performance. Use when working on Three.js; covers scene structure, R3F/Drei patterns, WebGPU migration (r171+), TSL shaders, and compute shaders.

perniemann/pnCore · 59 tokens

pn-ui-component-libraries

Curated UI/UX and component library knowledge. Recommends libraries for stack and use case; when shadcn MCP is available, use its tools to browse/search/install. Use when building UI, during discovery, or prior-art for frontend projects.

perniemann/pnCore · 57 tokens

pn-react-next-perf

Optimizes React/Next.js data loading and rendering; avoids waterfalls, unnecessary client JS, and missing loading/error boundaries. Use when building or reviewing React or Next.js apps.

perniemann/pnCore · 41 tokens

screen-reader-testing

Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, or ensuring assistive technology support.

wshobson/agents · 39 tokens

frontend-ui-dark-ts

Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.

microsoft/skills · 48 tokens

zustand-store-ts

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

microsoft/skills · 42 tokens