Agent skill

W3wallets

by Maksandre in Maksandre/w3wallets

Interact with browser wallets (MetaMask, Polkadot.js) in Playwright e2e tests.

MITAuto-check passedTesting & QA

Install W3wallets

skills CLI
$ npx skills add Maksandre/w3wallets --skill w3wallets -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Maksandre/w3wallets w3wallets --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Maksandre/w3wallets.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/w3wallets .claude/skills/w3wallets && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
w3wallets
GitHub stars
104
Token cost
~1.7k tokens
SKILL.md length
379 words
Files
5 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Interact with browser wallets (MetaMask, Polkadot.js) in Playwright e2e tests.

  • The user needs to set up wallet extensions
  • SKILL.md covers Quick Start, Setup, withWallets Fixture and Wallet API Overview, plus 6 more sections
  • Calls npx and npm
  • Create wallet fixtures

What it does

W3wallets is an agent skill from Maksandre/w3wallets. Interact with browser wallets (MetaMask, Polkadot.js) in Playwright e2e tests. Use when the user needs to set up wallet extensions, create wallet fixtures, approve/deny transactions, manage wallet caching, or any Web3 wallet interaction in tests.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/caching.md`, `references/custom-wallets.md` and `references/metamask-api.md`).

It sits in Testing & QA, covering Browser testing, End-to-end testing and Crypto and DeFi analysis. It works with Playwright and Ethereum. The repository describes itself as: Web3 wallet automation for Playwright testing. The licence is MIT.

When your agent uses it

  • The user needs to set up wallet extensions
  • Create wallet fixtures
  • Approve/deny transactions
  • Manage wallet caching

Example prompts

  • “/w3wallets”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 9fda5f8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

W3wallets loads about 1.7k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 64 tokens; SKILL.md has 379 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Maksandre/w3wallets at commit 9fda5f8, republished under its MIT licence (© Maksandre). 379 words, ~1,702 tokens.

Download SKILL.mdSave it as .claude/skills/w3wallets/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
w3wallets
description
Interact with browser wallets (MetaMask, Polkadot.js) in Playwright e2e tests. Use when the user needs to set up wallet extensions, create wallet fixtures, approve/deny transactions, manage wallet caching, or any Web3 wallet interaction in tests.
metadata.author
Maksandre
metadata.version
1.0
license
MIT

w3wallets

A Playwright library for browser wallet interactions (MetaMask, Polkadot.js) in e2e tests.

Quick Start

bash
# 1. Install the library
npm install -D w3wallets

# 2. Download the wallet extension
npx w3wallets metamask

# 3. Create a fixture and write a test
ts
// fixtures.ts
import { test as base } from "@playwright/test";
import { withWallets, metamask } from "w3wallets";

export const test = withWallets(base, metamask);

// my-test.spec.ts
import { test } from "./fixtures";

test("connect wallet", async ({ page, metamask }) => {
  await metamask.onboard("your twelve word mnemonic phrase here ...");
  await page.goto("http://localhost:3000");
  await page.getByRole("button", { name: "Connect Wallet" }).click();
  await metamask.approve();
});

Setup

Download wallet extensions with the CLI:

bash
npx w3wallets metamask      # downloads MetaMask
npx w3wallets polkadotjs    # downloads Polkadot.js
npx w3wallets <extension-id> # downloads any Chrome extension by ID

Extensions are stored in .w3wallets/ at the project root. Add .w3wallets/ to .gitignore.

withWallets Fixture

withWallets(base, ...walletConfigs) extends Playwright's test with wallet fixtures. Each wallet config adds a typed fixture by its name.

ts
import { test as base } from "@playwright/test";
import { withWallets, metamask, polkadotJS } from "w3wallets";

// Single wallet
const test = withWallets(base, metamask);
// test("...", async ({ metamask }) => { ... });

// Multiple wallets
const test = withWallets(base, metamask, polkadotJS);
// test("...", async ({ metamask, polkadotJS }) => { ... });

Each fixture provides a wallet instance with its own extension page. The context fixture is a persistent Chromium context with extensions loaded.

Wallet API Overview

MetaMask
MethodDescription
onboard(mnemonic, password?)Import wallet with recovery phrase
approve()Confirm the pending transaction/connection
deny()Reject the pending transaction/connection
lock()Lock the wallet
unlock(password?)Unlock the wallet (handles post-unlock screens)
switchNetwork(name, category?)Switch to a network by name (category is deprecated and ignored)
switchAccount(name)Switch to an account by name
addNetwork(settings)Add a custom network via settings page
addCustomNetwork(settings)Add a custom network via the networks modal
enableTestNetworks()Toggle test networks visibility
importAccount(privateKey)Import an account by private key
accountNameIs(name)Assert the active account name

NetworkSettings: { name: string, rpc: string, chainId: number, currencySymbol: string }

Polkadot.js
MethodDescription
onboard(seed, password?, name?)Import account from seed phrase
approve()Approve connection or sign transaction
deny()Reject connection or cancel signing
selectAllAccounts()Select all accounts for connection
selectAccount(accountId)Select a specific account by ID
enterPassword(password?)Enter password for signing

Full API details: MetaMask reference | Polkadot.js reference

Common Patterns

Show full SKILL.md (154 more words)Show less
The Two-Page Dance

Wallet interactions involve two pages: your dApp page and the wallet extension page. The library handles navigation to the extension automatically.

ts
// 1. Trigger action on dApp page
await page.getByRole("button", { name: "Connect Wallet" }).click();

// 2. Approve in wallet (library navigates to extension page internally)
await metamask.approve();

// 3. Continue on dApp page
await page.bringToFront(); // bring dApp page back to focus if needed
Connect, Sign, Approve, Deny
ts
// Connect
await page.getByRole("button", { name: "Connect" }).click();
await metamask.approve();

// Sign a message
await page.getByRole("button", { name: "Sign" }).click();
await metamask.approve();

// Deny a transaction
await page.getByRole("button", { name: "Send" }).click();
await metamask.deny();
Switch Network
ts
await metamask.switchNetwork("Sepolia");
await metamask.switchNetwork("My Custom Network");

Caching

Wallet onboarding (seed import, password setup) takes 15-30 seconds. Caching reduces this to ~2 seconds by restoring a pre-onboarded browser profile.

Quick setup:

ts
// wallets-cache/default.cache.ts
import { prepareWallet, metamask } from "w3wallets";

export default prepareWallet(metamask, async (wallet) => {
  await wallet.onboard("your twelve word mnemonic ...", "MyPassword123!");
});
bash
npx w3wallets cache wallets-cache          # build cache
npx w3wallets cache wallets-cache --force  # rebuild
ts
// fixtures.ts — use cached wallet
import { test as base } from "@playwright/test";
import { withWallets } from "w3wallets";
import cachedMetamask from "./wallets-cache/default.cache";

const test = withWallets(base, cachedMetamask);

// Fixture: unlock instead of onboard
test.extend({
  metamask: async ({ metamask }, use) => {
    await metamask.unlock(); // ~2s instead of ~20s
    await use(metamask);
  },
});

Full caching guide: references/caching.md

Configuration

Environment variables:

VariableDescriptionDefault
W3WALLETS_ACTION_TIMEOUTTimeout for actions (click, fill, goto) in ms30000
W3WALLETS_EXPECT_TIMEOUTTimeout for expect assertions in msPlaywright default (5000)
W3WALLETS_DEBUGEnable debug logging ("true")disabled
bash
W3WALLETS_DEBUG=true npx playwright test

Waiting Best Practices

  • Prefer waiting for UI effects: await expect(element).toBeVisible()
  • Use page.waitForResponse / page.waitForRequest for API calls when no reliable UI indicator exists
  • Avoid page.waitForTimeout — only use during debugging or as a last resort

Custom Wallets

You can add support for any Chrome extension wallet by extending the Wallet base class. See references/custom-wallets.md.

References

© Maksandre, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/w3wallets of Maksandre/w3wallets.

  • SKILL.md
  • references/caching.md
  • references/custom-wallets.md
  • references/metamask-api.md
  • references/polkadotjs-api.md

Open the folder on GitHubat commit 9fda5f8

Compare with similar skills

W3wallets next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

W3wallets compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
W3wallets this skillMaksandre/w3wallets104—~1.7kAutomated safety check: PassMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
playwright-cli Browser Automationgithub/gh-aw5.3k23 repos~2.8kAutomated safety check: PassMIT
Write and Verify Playwright Testsappsmithorg/appsmith41k—~2.9kAutomated safety check: NotesApache-2.0
Cucumber and Playwright E2E Testslanggenius/dify158k—~682Automated safety check: PassCustom licence
E2E Testinglangflow-ai/langflow156k—~3.3kAutomated safety check: PassMIT

Similar skills

  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.3k GitHub starsUsed in 23 repos~2.8k tokens
    Testing & QAAuto-check passed
  • Writes a Playwright end-to-end test from a prompt, runs it against a live Appsmith deployment and retries with fixes up to three times until it passes.

    41k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check: notes
  • Guides changes and reviews of the Cucumber and Playwright end-to-end suite under `e2e/`: feature files, step definitions, support code, tags, locators and assertions.

    158k GitHub stars~682 tokensUpdated today
    Testing & QAAuto-check passed
  • E2E Testing

    langflow-ai/langflow

    Write and review Playwright E2E tests for Langflow. An agent skill from langflow-ai/langflow.

    156k GitHub stars~3.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Handsontable Playwright E2E Tests

    handsontable/handsontable

    Guides writing and changing Playwright end-to-end tests for Handsontable using page objects, data-testid hooks and deterministic waits.

    22k GitHub stars~1.7k tokensUpdated today
    Testing & QAAuto-check passed

Categories

Questions about W3wallets

What does W3wallets do?

Interact with browser wallets (MetaMask, Polkadot.js) in Playwright e2e tests. W3wallets is an agent skill from Maksandre/w3wallets.js) in Playwright e2e tests.

When should I use W3wallets?

W3wallets fits situations like: the user needs to set up wallet extensions; create wallet fixtures; approve/deny transactions; manage wallet caching.

How do I install W3wallets in Claude Code?

Run `npx skills add Maksandre/w3wallets --skill w3wallets -a claude-code`. Or copy the skill folder (skills/w3wallets in Maksandre/w3wallets) into .claude/skills/w3wallets in your project. Claude Code loads it when a task matches its description.

How do I install W3wallets in Codex?

Run `npx skills add Maksandre/w3wallets --skill w3wallets -a codex`. Or copy the skill folder (skills/w3wallets in Maksandre/w3wallets) into .agents/skills/w3wallets in your project. Codex loads it when a task matches its description.

Can I use W3wallets in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Maksandre/w3wallets --skill w3wallets -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/w3wallets, .gemini/skills/w3wallets, .github/skills/w3wallets and .opencode/skills/w3wallets in your project.

What does W3wallets need to run?

Going by SKILL.md and its folder, W3wallets needs the command-line tools its instructions call (npx and npm). Our summary lists: Node.js.

Does W3wallets access the network?

SKILL.md contains no URLs. Its commands use npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is W3wallets safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does W3wallets use?

W3wallets is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does W3wallets use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.8k tokens, read only when the agent opens those files.

What are the alternatives to W3wallets?

Skills that share tags, products or a category with W3wallets: Web Application Testing (anthropics/skills, 180k stars), playwright-cli Browser Automation (github/gh-aw, 5.3k stars), Write and Verify Playwright Tests (appsmithorg/appsmith, 41k stars) and Cucumber and Playwright E2E Tests (langgenius/dify, 158k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains W3wallets?

Maksandre (a GitHub user) maintains it in Maksandre/w3wallets, which has 104 GitHub stars. The repository was last updated on September 26, 2026.

Source: Maksandre/w3wallets on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.