/synpress:synpress-metamask-apifrom synpress
This skill should be used when calling Synpress MetaMask API methods — connectToDapp, confirmTransaction, approveTokenPermission, switchNetwork, signatures, and account import.
Ships in synpress. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Reference for @synthetixio/synpress/playwright MetaMask class (v4). Methods automate the extension UI.
import { MetaMask } from '@synthetixio/synpress/playwright'
const metamask = new MetaMask(context, metamaskPage, password, extensionId)
| Method | Purpose |
|---|---|
importWallet(seedPhrase) | Onboard from seed (setup) |
importWalletFromPrivateKey(privateKey) | Add imported account |
addNewAccount(accountName) | HD account from seed |
switchAccount(accountName) | Change active account |
getAccountAddress() | Read current address |
lock() / unlock() | Lock screen |
| Method | Purpose |
|---|---|
connectToDapp(accounts?) | Approve connection (default account if omitted) |
| Method | Purpose |
|---|---|
confirmTransaction({ gasSetting? }) | Approve tx; also NFT approvals |
rejectTransaction() | Reject tx |
approveTokenPermission({ spendLimit?, gasSetting? }) | ERC-20 spend cap ('max' or number) |
rejectTokenPermission() | Reject ERC-20 approve |
For NFTs use
confirmTransaction, notapproveTokenPermission.
| Method | Purpose |
|---|---|
confirmSignature() | eth_sign / personal_sign / typed data |
confirmSignatureWithRisk() | Signature marked risky |
rejectSignature() | Reject sign request |
| Method | Purpose |
|---|---|
addNetwork({ name, rpcUrl, chainId, symbol, blockExplorerUrl? }) | Custom chain (Anvil) |
switchNetwork(networkName, isTestnet) | Select network |
approveNewNetwork() / rejectNewNetwork() | dApp add-chain prompt |
approveSwitchNetwork() / rejectSwitchNetwork() | dApp switch-chain prompt |
approveNewEthereumRPC() / rejectNewEthereumRPC() | RPC provider prompts |
| Method | Purpose |
|---|---|
goBackToHomePage() | Extension home |
openSettings() | Settings |
openSidebarMenu(menu) | Sidebar entry |
toggleShowTestNetworks() | Show testnets (menu must be open) |
Pass optional gasSetting into confirm/approve methods when tests must assert slow/fast gas or custom limits (see Synpress GasSettings type).
// Happy path swap
await dapp.triggerSwap()
await metamask.confirmTransaction()
// Allowance then action
await dapp.clickEnableToken()
await metamask.approveTokenPermission({ spendLimit: 'max' })
await dapp.clickSwap()
await metamask.confirmTransaction()
// User rejection
await dapp.triggerSwap()
await metamask.rejectTransaction()
await expect(dapp.rejectionToast).toBeVisible()
metamask-transactions-approvals — conceptual approve vs tx flowsdefi-ui-synpress-metamask — full DeFi E2E playbookWhat SKILL.md sets; muted values are Claude Code's defaults
synpress@cyotee is listed by cyotee/cyotee-claude-plugins — review the source before installing
npx claudepluginhub cyotee/cyotee-claude-plugins --plugin synpress4 skills in this plugin
/synpress-overviewThis skill should be used when the user asks about "Synpress", "@synthetixio/synpress", Web3 E2E with MetaMask extension, or wallet-cache setup for Playwright/Cypress dApp tests./synpress-playwrightThis skill should be used when writing Playwright tests with Synpress — testWithSynpress, metaMaskFixtures, connecting dApps, confirming txs, and page objects with MetaMask./synpress-wallet-setupThis skill should be used when configuring Synpress wallet-setup — defineWalletSetup, MetaMask seed/password, wallet-setup cache, and Anvil/Hardhat test accounts.