Commit ddee296
feat: add metamask-connect agent skill (skills.sh) (#334)
* feat: add metamask-connect agent skill (skills.sh)
Colocate the MetaMask Connect SDK agent skill in the SDK repo so it
versions with the code and is installable via `npx skills add
MetaMask/connect-monorepo`, with skills.sh install analytics.
Single progressive-disclosure skill (Agent Skills format), mirroring
MetaMask/smart-accounts-kit#264: a routing SKILL.md points into
references/ (conventions, troubleshooting) and workflows/ (per-stack
setup, sign/send for EVM + Solana, multichain invokeMethod, migration).
Ported from MetaMask/skills#50 (now closed); source-verified against the
published @metamask/connect-* packages.
* docs(skills): fix stale wagmi connect-evm peer range and client wording
- Correct the @wagmi/connectors metaMask() optional peer range from the
stale ^1.3.0 to the current ^2.1.0 across setup-wagmi, setup-wagmi-connector,
migrate-from-sdk, and migrate-wagmi-connector. The old guidance ("do not
install 2.x") was inverted and would produce the peer mismatch it warned
against; now points readers at `npm info @wagmi/connectors peerDependencies`.
- Fix setup-evm-react-native: createEVMClient is not a singleton (only the
multichain core is); each call returns a fresh wrapper.
- Align Solana sign/send prerequisites with setup-solana-react: createSolanaClient
need not resolve before first render (wallet registers ~1s later).
* docs(skills): add Content Security Policy guidance
Add a Content Security Policy section to conventions.md covering the
required relay WebSocket and QR data: URI origins, optional analytics /
Stencil style allowances, and a minimal example. Add pointers from the
browser-specific setup guides (EVM, Solana, multichain) and a dedicated
troubleshooting entry so a CSP-blocked relay (which presents as a hung
connection) is diagnosable.
* docs(skills): add Node.js (CLI / server) setup workflow
Add workflows/setup-node.md covering headless integration: terminal ASCII
QR connect via MetaMask Mobile, createMultichainClient as the recommended
Node entry point (connect-multichain/connect-solana ship node builds;
connect-evm delegates to the multichain node build), EVM/Solana signing
through invokeMethod, the in-memory default storage caveat (no persistence
across restarts) and how to supply a custom StoreClient, and the absence
of polyfill/CSP requirements. Wire it into SKILL.md with a routing row and
a "When to use" bullet.
* docs(skills): fix prettier formatting in setup-node.md
Wrap the long Buffer.from(...).toString('base64') line in the Solana
invokeMethod example so it satisfies the repo's prettier (lint:misc)
80-col rule. Resolves the failing Lint CI job.
* docs(skills): split conventions.md into focused references; dedupe cross-cutting blocks
Reduce documentation drift surface by giving each topic a single canonical
home, per the Agent Skills guidance (focused reference files, TOCs >300
lines) and mirroring MetaMask/smart-accounts-kit#264's domain-split refs.
- Split the 610-line conventions.md into 7 focused, domain-organized
references (evm, events, multichain, solana, react-native, csp, testing),
each with its own table of contents. conventions.md is now a 93-line
always-on core (import paths, config, supportedNetworks, singleton, error
handling, connection state) plus a topic index routing to the rest.
- Repoint the CSP cross-links in setup-evm-browser, setup-solana-browser,
setup-multichain, and troubleshooting at the new canonical csp.md.
- Point the two React Native setup workflows at react-native.md as the
canonical polyfill/Metro reference (keeping their runnable recipes).
- Update SKILL.md's always-on pointer to describe the core + focused refs.
All skills/**/*.md pass prettier (3.6.2) and every internal link/anchor
resolves.
* docs(skills): fix dangling react-native-polyfills rule references
Point migrate-from-sdk and setup-wagmi-connector workflows at the
existing references/react-native.md instead of a non-existent rule.
* Apply suggestions from code review
Co-authored-by: jiexi <jiexiluan@gmail.com>
* docs(skills): clarify wagmi connector entrypoint and multichain dep
Address review feedback on conventions.md import-paths section:
- State that the wagmi metaMask() connector comes from wagmi/connectors
with connect-evm as an optional peer; connect-evm ships no wagmi
entrypoint.
- Trim the multichain dependency bullet: drop the imprecise ^1.0.0 pin
and 2.0.0 history, keep the load-bearing "installed transitively" fact.
* docs(skills): tighten conventions, solana, events, and multichain refs
Address review feedback:
- conventions: merge duplicate dapp.url bullets; add Solana disconnect
scope behavior; enumerate the EVM methods that are rejected.
- solana: rewrite the Chrome Android note to be actionable (the
wallet-adapter beforeunload patch is internal and not inherited by
consumers); reframe the RN section as a third-party adapter limitation
with the multichain/invokeMethod path.
- events: reframe intro so it doesn't read as EVM-only; add a Solana
state-changes section pointing at core.stateChanged.
- multichain: trim the bundle/lazy-transport section to the one
actionable guardrail.
---------
Co-authored-by: jiexi <jiexiluan@gmail.com>1 parent 96bcafe commit ddee296
28 files changed
Lines changed: 6145 additions & 0 deletions
File tree
- skills/metamask-connect
- references
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments