setup-solana-react-native-app

setup-solana-react-native-app is a skill for Cursor from MetaMask/metamask-connect-cursor-plugin. It costs 52 tokens per session (3,539 once invoked), scanned A, original, MIT.

A setup guide for adding MetaMask Solana wallet support to a React Native mobile app. React Native is a framework for building mobile apps with JavaScript, and Solana is a blockchain network.

In plain words
What is it for?
Use it to configure Solana support and build wallet signing and transaction-sending flows in React Native.
Why use it?
It provides the mobile-specific setup needed when the web wallet adapter cannot be used. It covers polyfills, Metro configuration, and MetaMask operations through a multichain interface.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the metamask-connect plugin — 18 skills, 3 agents shipped together

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-native-app
Any agent
npx skills add MetaMask/metamask-connect-cursor-plugin --skill setup-solana-react-native-app
Clone the repo
git clone --depth 1 https://github.com/MetaMask/metamask-connect-cursor-plugin

Made for: Cursor.

Or install metamask-connect, the plugin that ships this one along with the rest of its 18 skills, 3 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 setup-solana-react-native-app

README.md
[![agentmods](https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-native-app.svg)](https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-native-app)
Your own site
<a href="https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-native-app"><img src="https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/setup-solana-react-native-app.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,539 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.00052 $0.03539
Opus 5 $0.00026 $0.01769
Sonnet 5 $0.00010 $0.00708
Haiku 4.5 $0.00005 $0.00354

Measured 5d ago against content hash 66ae7cd73ab6, 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-native-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-native-app/SKILL.md · 382 lines

How it starts

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

Setup Solana React Native App with MetaMask

When to use

Use this skill when:

  • Integrating MetaMask with Solana in a React Native application
  • Setting up the required polyfills and metro shims for @metamask/connect-solana
  • Building Solana sign and send flows in React Native using invokeMethod
  • You need Solana support in React Native where @solana/wallet-adapter-react is not available

Workflow

Step 1: Install dependencies

npm install @metamask/connect-solana @metamask/connect-multichain @solana/web3.js react-native-get-random-values buffer readable-stream @react-native-async-storage/async-storage

@metamask/connect-multichain is a regular dependency of @metamask/connect-solana and is installed transitively — but this skill imports createMultichainClient directly (to configure mobile.preferredOpenLink, which createSolanaClient does not forward), so declare it explicitly to keep strict package managers (pnpm) happy. The SDK warns at runtime if duplicate or mismatched copies are resolved.

Step 2: Create the polyfills file

Create polyfills.ts at the root of your project.

// polyfills.ts
import { Buffer } from 'buffer';

// Buffer — connect-multichain self-polyfills this, but set early as a safety
// net for peer deps (e.g. @solana/web3.js) that may load first.
global.Buffer = Buffer;

// window object — required for correct platform detection and deeplink behaviour.
const eventListeners = new Map<string, Set<EventListener>>();
if (typeof global.window === 'undefined') {
  (global as any).window = {
    location: {
      hostname: 'my-rn-app',
      href: 'https://my-rn-app.local',
    },
    navigator: { product: 'ReactNative' },
    addEventListener: (event: string, listener: EventListener) => {
      if (!eventListeners.has(event)) eventListeners.set(event, new Set());
      eventListeners.get(event)?.add(listener);
    },
    removeEventListener: (event: string, listener: EventListener) => {
      eventListeners.get(event)?.delete(listener);
    },
    dispatchEvent: (_event: Event) => true,
  };
}

// NOTE: Event and CustomEvent are NOT needed for standalone connect-solana —
// the SDK uses eventemitter3 internally. Add them only if using wagmi.

Read the full file on GitHub · 382 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 · 382 lines · 52 tokens per session scan A 66ae7cd73ab6

Subscribe to this mod's changes

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

amethyst

Build customized Amethyst Nostr clients for Android. Fork, rebrand, customize, and distribute your own version.

vitorpamplona/amethyst · 0 tokens

install-wallet-ui-react-native

Use when setting up Wallet UI in a new or existing Expo application. Guides selection between modern @solana/kit (Recommended) or legacy @solana/web3.js.

wallet-ui/wallet-ui · 41 tokens

bitcoin-infrastructure-bluewallet

BlueWallet: mobile Bitcoin + Lightning wallet (iOS/Android). LND on-device + LndHub backend variants. Multi-wallet support. USE WHEN: mobile wallet integrations, evaluating BlueWallet vs Phoenix / Mutiny.

claude-dev-suite/claude-dev-suite · 53 tokens

solana-mobile

Scaffold, configure, and troubleshoot Solana Mobile apps for Android using the solana-mobile CLI, Expo, and React Native. Use when creating a new Solana mobile app, picking a template, adding Solana to an existing Expo app, checking the Android toolchain, managing Android emulators or connected devices, installing a…

solana-mobile/solana-mobile-skills · 89 tokens

integration-privy

Add Privy authentication to a Solana Expo Android app on top of Mobile Wallet Adapter, using Sign-In-With-Solana. Use when installing @privy-io/expo, mounting PrivyProvider, logging a user in with useLoginWithSiws, linking a wallet to an existing Privy account, reading the Privy access token from a backend, or…

solana-mobile/solana-mobile-skills · 87 tokens

solana-mobile-wallet

Connect Solana wallets and sign or send transactions in React Native Expo apps using Mobile Wallet Adapter and Wallet UI. Use when adding a connect wallet button, showing a connected address, disconnecting, signing messages, sign-in with Solana, transferring SOL, or sending any transaction from a Solana mobile app.

solana-mobile/solana-mobile-skills · 66 tokens