setup-evm-react-native-app

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

Setup guidance for connecting a React Native mobile app to MetaMask’s EVM wallet. React Native is a framework for building mobile apps with JavaScript, and polyfills provide browser or Node features it does not include by default.

In plain words
What is it for?
Use it to install the MetaMask SDK, add required polyfills, configure Metro bundler shims, connect to MetaMask Mobile, and troubleshoot related startup errors.
Why use it?
It addresses mobile-specific gaps such as missing globals, module compatibility, import order, and links that open MetaMask Mobile.

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-evm-react-native-app
Any agent
npx skills add MetaMask/metamask-connect-cursor-plugin --skill setup-evm-react-native-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-evm-react-native-app

README.md
[![agentmods](https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/setup-evm-react-native-app.svg)](https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/setup-evm-react-native-app)
Your own site
<a href="https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/setup-evm-react-native-app"><img src="https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/setup-evm-react-native-app.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,961 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 $0.00045 $0.02961
Opus 5 $0.00023 $0.01481
Sonnet 5 $0.00009 $0.00592
Haiku 4.5 $0.00005 $0.00296

Measured 4d ago against content hash d36ba6785c62, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup-evm-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 4d 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-evm-react-native-app/SKILL.md · 321 lines

How it starts

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

Setup EVM React Native App with MetaMask Connect

When to use

Use this skill when:

  • Creating a React Native app that connects to MetaMask Mobile
  • Setting up polyfills for window and other missing globals
  • Configuring metro.config.js with Node.js module shims
  • Debugging React Native import order or missing polyfill errors

Workflow

Step 1: Install dependencies

Install the SDK and all required polyfill/shim packages:

npm install @metamask/connect-evm @metamask/connect-multichain react-native-get-random-values buffer @react-native-async-storage/async-storage readable-stream

@metamask/connect-multichain is installed transitively by @metamask/connect-evm (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 on duplicate or mismatched copies. react-native-get-random-values provides crypto.getRandomValues — strictly required only on React Native < 0.72 (Hermes 0.72+ ships globalThis.crypto.getRandomValues natively), but recommended as a safety net on all versions. It must be imported before any other SDK-related code. readable-stream provides the stream shim for Metro. buffer is recommended as a safety net for peer dependencies — @metamask/connect-multichain self-polyfills Buffer internally, but other deps (e.g. eciesjs) may load before it. @react-native-async-storage/async-storage is needed for session persistence.

Step 2: Create polyfills.ts

Create src/polyfills.ts with all required global shims. This file must be imported before anything else:

// src/polyfills.ts
// IMPORTANT: react-native-get-random-values must be imported in the
// entry file BEFORE this polyfills file. See Step 4.

import { Buffer } from 'buffer';

// Buffer global — connect-multichain self-polyfills this, but set it here
// as a safety net for other deps that may load before connect-multichain.
global.Buffer = Buffer;

// window object — required for correct platform detection and deeplink behaviour.
// connect-multichain inspects window.navigator.product and window.location to
// determine platform type and whether to use deeplinks vs install modal.
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 polyfills are NOT needed for standalone
// @metamask/connect-evm usage — the SDK uses eventemitter3 internally.
// Add them only if you are also using wagmi (wagmi dispatches DOM events).

Read the full file on GitHub · 321 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. 4d ago First seen · 321 lines · 45 tokens per session scan A d36ba6785c62

Subscribe to this mod's changes

setup-evm-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 45 tokens to every session and 2,961 once invoked, about $0.0002 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