x402-react

x402-react is a skill for Cursor 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 Cursor

Written for Cursor: shipped in a Cursor plugin. Also seen: positional $N argument.

Part of the opendexter plugin — 5 skills, 3 commands, 1 agent shipped together

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: Cursor.

Or install opendexter, the plugin that ships this one along with the rest of its 5 skills, 3 commands, 1 agent.

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.5 $0.00022 $0.00771
Sonnet 5.5 $0.00011 $0.00386
Haiku 4.5 $0.00006 $0.00193

Measured 2mo ago against content hash 2fc95bc9f4d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

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. 2mo 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 8d ago), licensed MIT. It adds 56 tokens to every session and 1,928 once invoked, about $0.0002 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-31.

Related

x402-react compared with skills from other repositories

x402-react next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
x402-reactDexter-DAO/opendexter-ideSkill28d agoMITA56Cursor
serasera-cx/sera-agentsSkill202d agoMITA24Claude Code, Codex
serasera-cx/sera-agentsSkill202d agoMITA90Claude Code, Codex
x402aomi-labs/skillsSkill82d agoMITA84Claude Code
sera-protocolsera-cx/sera-agentsSkill202d agoMITA58Claude Code, Codex
pn-dcf-modelperniemann/pnCoreSkill05d agoMITA61Cursor
pn-gl-reconcilerperniemann/pnCoreSkill05d agoMITA72Cursor