setup-solana-react-app

setup-solana-react-app is a skill for Claude Code, Codex from MetaMask/metamask-connect-cursor-plugin. It costs 51 tokens per session (2,188 once invoked), scanned A, original, MIT.

A setup guide for adding MetaMask Solana wallet support to a React web application. Solana is a blockchain network, and a wallet lets users connect, sign messages, and send transactions.

In plain words
What is it for?
Use it to configure wallet providers and build connect, sign-message, and transaction-sending flows in React.
Why use it?
It brings together the packages and configuration needed for MetaMask to work with Solana’s wallet adapter. It is useful when the wallet is not appearing or wallet actions are not wired up correctly.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-app
Any agent
npx skills add MetaMask/metamask-connect-cursor-plugin --skill setup-solana-react-app
Clone the repo
git clone --depth 1 https://github.com/MetaMask/metamask-connect-cursor-plugin

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 setup-solana-react-app

README.md
[![agentmods](https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-app.svg)](https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-app)
Your own site
<a href="https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-app"><img src="https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-app.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,188 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00051 $0.02188
Opus 5 $0.00026 $0.01094
Sonnet 5 $0.00010 $0.00438
Haiku 4.5 $0.00005 $0.00219

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

Security

Grade A, and why

setup-solana-react-app 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 5d 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/setup-solana-react-app/SKILL.md · 195 lines

How it starts

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

Setup Solana React App with MetaMask

When to use

Use this skill when:

  • Integrating MetaMask with Solana in a React web application
  • Configuring @solana/wallet-adapter-react with MetaMask Connect's wallet-standard discovery
  • Building connect, sign message, or send transaction flows using useWallet
  • The MetaMask wallet is not appearing in the Solana wallet adapter

Workflow

Step 1: Install dependencies

npm install @metamask/connect-solana @metamask/connect-multichain @solana/wallet-adapter-react @solana/wallet-adapter-react-ui @solana/wallet-adapter-base @solana/web3.js

@metamask/connect-multichain is a regular dependency of @metamask/connect-solana and is installed transitively. (Only the 2.0.0 release briefly made it a peer dependency; 2.1.0 reverted that.) Installing it explicitly is harmless but not required. The SDK warns at runtime if duplicate or mismatched copies are resolved.

Step 2: Create the Solana client early in app startup

Initialize createSolanaClient early (e.g. in your bootstrap before rendering). It does not need to resolve before the first WalletProvider render — wallet-standard supports late registration, and the SDK registers the wallet about 1 second after the factory resolves. The adapter picks it up via the wallet-standard register event whenever it lands. If your UI asserts "MetaMask is available" synchronously, gate that specific UI on the client being ready.

// src/main.tsx (or index.tsx)
import { createSolanaClient } from '@metamask/connect-solana';
import { createRoot } from 'react-dom/client';
import App from './App';

async function bootstrap() {
  await createSolanaClient({
    dapp: {
      name: 'My Solana DApp',
      url: window.location.href,
    },
  });

  const root = createRoot(document.getElementById('root')!);
  root.render(<App />);
}

bootstrap();

createSolanaClient options:

Parameter Type Description
dapp.name string Required. Display name of your dApp
dapp.url string Optional. dApp URL
dapp.iconUrl string Optional. dApp icon
api.supportedNetworks Partial<Record<'mainnet' | 'devnet' | 'testnet', string>> Map network names to RPC URLs
debug boolean Reserved — accepted in the options type but not currently forwarded by createSolanaClient (no effect yet)
skipAutoRegister boolean Skip automatic wallet-standard registration
analytics.integrationType string Optional. Tag analytics events with an integration identifier (added in @metamask/connect-solana 0.8.0)

Read the full file on GitHub · 195 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. 5d ago First seen · 195 lines · 51 tokens per session scan A 2fbf565adce8

Subscribe to this mod's changes

setup-solana-react-app is a skill published in the GitHub repository MetaMask/metamask-connect-cursor-plugin (2 stars, last pushed 2mo ago), licensed MIT. It adds 51 tokens to every session and 2,188 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

nx-run-tasks

Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.

nrwl/nx · 40 tokens

onchainkit

Build onchain apps with Coinbase's OnchainKit React components - wallets, swaps, NFTs, payments.

alsk1992/CloddsBot · 24 tokens

devtools-event-client

Create typed EventClient for a library. Define event maps with typed payloads, pluginId auto-prepend namespacing, emit()/on()/onAll()/onAllPluginEvents() API. Connection lifecycle (5 retries, 300ms), event queuing, enabled/disabled state, SSR fallbacks, singleton pattern. Unique pluginId requirement to avoid event…

TanStack/devtools · 79 tokens

adding-personhog-rpc

Guide for adding a new RPC to personhog-replica and personhog-router. Covers eligibility checks, proto definition, code generation for Python and Node.js clients, Rust implementation (storage trait, postgres queries, service handler, router wiring), and index compatibility validation. Use when adding a new gRPC…

PostHog/posthog · 88 tokens

adopting-generated-api-types

Use when migrating frontend code from manual API client calls (api.get, api.create, api.surveys.get, api.dashboards.list, new ApiRequest()) and handwritten TypeScript interfaces to generated API functions and types. Triggers on files importing from lib/api, files with api.get . , manual interface definitions that…

PostHog/posthog · 131 tokens

implementing-mcp-tools

Guide for exposing PostHog product endpoints as MCP tools. Use when creating new or updating API endpoints, adding MCP tool definitions, scaffolding YAML configs, or writing serializers with good descriptions. Covers the full pipeline from Django serializer to generated TypeScript tool handler.

PostHog/posthog · 58 tokens