troubleshoot-connection

troubleshoot-connection is a skill for Cursor from MetaMask/metamask-connect-cursor-plugin. It costs 24 tokens per session (5,866 once invoked), scanned A, original, MIT.

A troubleshooting guide for MetaMask Connect connection failures, transport problems, and runtime errors.

In plain words
What is it for?
Use it to diagnose connection hangs, duplicate connection attempts, React Native import errors, QR-code problems, deeplink failures, and disconnect issues.
Why use it?
It links common symptoms to likely causes and fixes, including missing QR codes, failed mobile links, lost sessions, and Solana wallet detection issues.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

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

Good fit Use it to diagnose connection hangs, duplicate connection attempts, React Native import errors, QR-code problems, deeplink failures, and disconnect issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/metamask/metamask-connect-cursor-plugin/troubleshoot-connection
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 MetaMask/metamask-connect-cursor-plugin --skill troubleshoot-connection
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 troubleshoot-connection

README.md
[![agentmods](https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/troubleshoot-connection/github.svg)](https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/troubleshoot-connection)
Your own site
<a href="https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/troubleshoot-connection"><img src="https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/troubleshoot-connection/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 troubleshoot-connection

Your own site · 80×15
<a href="https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/troubleshoot-connection"><img src="https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/troubleshoot-connection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,866 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.00024 $0.05866
Opus 5 $0.00012 $0.02933
Sonnet 5 $0.00005 $0.01173
Haiku 4.5 $0.00002 $0.00587

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

Security

Grade A, and why

troubleshoot-connection 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 9d 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/troubleshoot-connection/SKILL.md · 483 lines

How it starts

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

Troubleshoot MetaMask Connect Issues

When to use

Use this skill when:

  • A connection attempt hangs, fails, or produces an unexpected error
  • React Native apps crash on import or at runtime with missing polyfill errors
  • QR codes don't appear or deeplinks don't open MetaMask Mobile
  • Solana wallet adapter doesn't detect MetaMask
  • Sessions are lost after page reload or disconnect behaves unexpectedly
  • You need a systematic checklist to verify a MetaMask Connect integration

Symptom -> Cause -> Fix Reference


1. Connection hangs / nothing happens after connect()

Cause A: Extension not detected but preferExtension is true (the default). The SDK falls through to MetaMask Wallet Protocol (MWP) but no QR code is rendered because headless mode is on and there is no display_uri listener.

Fix: Register a display_uri event listener to render the QR code URI before calling connect()

Cause B: A concurrent connect() call is already in progress over MWP.

Fix: Guard against double-clicking. Wrap connect() in a loading-state check and match on the "Existing connection is pending" error message — on MWP this error has no numeric code. (-32002 only appears on the extension transport.)


2. User rejected request (code 4001)

Cause: The user clicked "Reject" in MetaMask. This is normal behavior.

Fix: Handle gracefully — show a retry button. Do not treat this as an application error or log it to error-tracking services:

try {
  await client.connect({ chainIds: ['0x1'] });
} catch (err) {
  if (err.code === 4001) {
    // User rejected — show retry UI
    return;
  }
  throw err;
}

3. Connection already pending (code -32002)

Cause: A previous connect() call has not yet resolved (the user may still have the MetaMask approval dialog open on mobile).

Fix: Show a message like "Check MetaMask Mobile to approve the connection." Do not call connect() again — the original promise will resolve once the user acts.

Read the full file on GitHub · 483 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. 9d ago First seen · 483 lines · 24 tokens per session scan A 2b8eed8306f1

Subscribe to this mod's changes

troubleshoot-connection is a skill published in the GitHub repository MetaMask/metamask-connect-cursor-plugin (2 stars, last pushed 2mo ago), licensed MIT. It adds 24 tokens to every session and 5,866 once invoked, about $0.0001 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

code-changes

Orchestration workflow for any task that ends in code changes: issue analysis, pull request review, feature implementation, bug fixes, refactors, or fleshing out an idea. MUST be invoked at the start of such a task, before reading or writing any code. Defines how to analyze first, gate on user approval, plan, pick the…

JanDeDobbeleer/oh-my-posh · 88 tokens

cross-environment-semantic-drift

L1 trigger - audits L1/L2 boundary bugs, precompile context assumptions, integer width mismatches at environment boundaries, and EVM-on-non-EVM drift.

PlamenTSV/plamen · 43 tokens

consensus-math-correctness

L1 trigger - audits consensus arithmetic for truncation, unused bounds, EMA direction, and threshold edge errors.

PlamenTSV/plamen · 30 tokens

alchemy-cli

Use the Alchemy CLI (@alchemy/cli) for live blockchain data, transaction lookups, NFT/token/portfolio queries, simulation, tracing/debugging, contract reads/writes, wallet-signed sends, swaps and cross-chain bridges, Solana RPC/DAS plus wallet sends, webhook management, and Alchemy app administration. Preferred…

alchemyplatform/skills · 166 tokens

finish-it

Scope-cutting and shipping discipline from Derek Yu's 'Finishing a Game' and 'Death Loops', jam culture, and veteran shipping practice — diagnose why a game project stalled, cut to a shippable core, define a binary finish line, ship it. Use when: a game project is stalled or sprawling, 'I keep adding features', 'it's…

kyh/vibedgames · 115 tokens

skmtc-debug

Diagnose failures in SKMTC sessions — no output, wrong output, error messages, bundle freshness, parseIssues, "Registered definition mismatch", ref cycles, "Module not found" in generated code, or any other broken behavior. Applies across both CLI usage and generator authoring contexts. Use this skill when the user…

skmtc/skmtc · 213 tokens