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.
git clone --depth 1 https://github.com/MetaMask/metamask-connect-cursor-pluginWrote 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.
[](https://agentmods.dev/rules/metamask/metamask-connect-cursor-plugin/react-native-polyfills)<a href="https://agentmods.dev/rules/metamask/metamask-connect-cursor-plugin/react-native-polyfills"><img src="https://agentmods.dev/badge/rules/metamask/metamask-connect-cursor-plugin/react-native-polyfills/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.
<a href="https://agentmods.dev/rules/metamask/metamask-connect-cursor-plugin/react-native-polyfills"><img src="https://agentmods.dev/badge/rules/metamask/metamask-connect-cursor-plugin/react-native-polyfills.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01177 | $0.01177 |
| Opus 5.5 | $0.00471 | $0.00471 |
| Sonnet 5.5 | $0.00235 | $0.00235 |
| Haiku 4.5 | $0.00118 | $0.00118 |
Grade A, and why
react-native-polyfills 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Native Polyfills for MetaMask Connect
Per-Package Polyfill Requirements
Different integrations need different polyfills. Do not blindly copy the full set:
| Polyfill | connect-evm / connect-solana (standalone) | + wagmi |
|---|---|---|
react-native-get-random-values |
RN < 0.72 only (see below) | RN < 0.72 only |
Buffer |
Safety net only (self-polyfilled by connect-multichain) | Safety net only |
window object |
Required for correct deeplink/platform detection | Required |
Event |
Not required | Required (wagmi uses DOM events) |
CustomEvent |
Not required | Required (wagmi uses DOM events) |
Import Order (Critical)
// Entry file (_layout.tsx / index.js) — order is critical
import 'react-native-get-random-values'; // MUST be first (if used)
import './polyfills'; // window shim, and Event/CustomEvent if using wagmi
Incorrect order causes crypto.getRandomValues is not a function at runtime.
react-native-get-random-values
- Required only for React Native < 0.72 — Hermes 0.72+ exposes
globalThis.crypto.getRandomValuesnatively - Still recommended as an explicit safety net — especially if any dependency has its own minimum RN version assumptions
- Must be the very first import in the entry file, before anything that touches crypto
Buffer Polyfill
@metamask/connect-multichainself-polyfillsBuffervia its React Native entry point — not needed for the SDK itself- Still recommended to set
global.Buffer = Bufferinpolyfills.tsas a safety net for peer deps (e.g.eciesjs,@solana/web3.js) that may load before connect-multichain - Install:
npm install buffer
window Object Polyfill
- Required for correct platform and deeplink behaviour —
getPlatformType()in connect-multichain inspectswindowandglobal.navigator.productto decide between the deeplink path and the install-modal path - All
window.*accesses inside the SDK are guarded, so code will not crash without it, butisSecure()returns the wrong value and deeplinks will not trigger - Provide at minimum:
location,addEventListener,removeEventListener,dispatchEvent
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.
- 3mo ago First seen · 106 lines · 1,177 tokens per session scan A ab2e2027ea38
react-native-polyfills is a cursor rule published in the GitHub repository MetaMask/metamask-connect-cursor-plugin (2 stars, last pushed 2mo ago), licensed MIT. It adds 1,177 tokens to every session, about $0.0047 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.
react-native-polyfills compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| react-native-polyfillsMetaMask/metamask-connect-cursor-plugin | Cursor rule | 2 | 2mo ago | MIT | A | 1,177 | Cursor |
| react-native-best-practicescallstackincubator/agent-skills | Cursor rule | 1.7k | 1mo ago | MIT | A | 0 | Cursor |
| expo-developmentbernierllc/agents-environment-config | Cursor rule | 11 | today | MIT | A | 0 | Cursor |
| expoblockmatic/basilic | Cursor rule | 90 | 1mo ago | MIT | A | 0 | Cursor |
| library-conventionskuraydev/react-native-typescript-library-starter | Cursor rule | 65 | 3mo ago | MIT | A | 1,034 | Cursor |
| mobile-feature-architectureOpen-Locker/Open-Locker | Cursor rule | 33 | 3d ago | AGPL-3.0 | A | 0 | Cursor |
| architecture-navigationUM-ARK/UM-All-Frontend | Cursor rule | 20 | 3d ago | none | A | 34 | Cursor |