Index of every page on this site: llms.txt
All skills
Run it yourself

Use with your agentic flow for clear dapp end-to-end tests. After you build a wallet feature — connect, transfer, swap, USDC or ERC20 deposit, contract call, signature — prove it by driving the real MetaMask or Leather extension in Playwright, then hand the reviewer video and screenshots of the actual popups and on-chain transactions.

  • 9 files
  • 65.8 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/yehia67/e2e-wallets/wallets-e2e

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈88 tokens for metadata: the name and description. ≈2.6k when used: this file. ≈14k more on demand in 7 files.

Description uses 4.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈350 characters, or 4.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Wallet dapp E2E testing

Use @wallets-e2e/core with the appropriate wallet driver to exercise the real browser extension and the real dapp. Preserve the consuming project's framework, package manager, selectors, server command, and test conventions; this skill supplies the wallet lifecycle and evidence model.

A wallet-touching feature is not finished when the code compiles. It is finished when a real extension has driven it and left video plus screenshots a reviewer can watch.

Get the packages first

core 0.2.0, metamask 0.2.1, leather 0.1.4, evidence 0.1.0 and mcp 0.2.1 are the mutually compatible set. Install that set; never substitute repository source for the public package. Recheck registry metadata rather than trusting this note to stay current.

For a normal consuming application, start with references/package-consumer-examples.md. Its examples use only public @wallets-e2e/* imports and a caller-owned unpacked extension path. Do not make package users copy implementation files or adapt repository fixtures as an installation method.

Prefer the MCP when it is connected

If the wallets-e2e MCP tools (list_guides, start_run, get_run, get_report) are available, use them instead of shelling out to Playwright:

  1. get_guide feature-to-test, then the wallet guide.
  2. Write the test against published packages.
  3. list_projects → start_run (it returns a runId immediately; a testnet tx can take ~10 minutes).
  4. Poll get_run. executed=0 is a failure.
  5. get_report on every finished run, pass or fail. Hand the HTML report, videos, and screenshots to the reviewer. get_report embeds representative screenshots; get_artifact fetches extras.

For video setup and review, read references/setup-and-reporting.md before running the suite. The video attachment is an mp4 of full-size frames built from screenshots (FFmpeg with libx264 on PATH or artifacts.ffmpegPath); videoSource: 'chromium' keeps Playwright's WebM recordings composed app → wallet → app, which crop the page once a wallet popup has opened. Show the video directly when the client supports local video playback; otherwise link it and the HTML report, or build the evidence site (get_report with evidence: true). Verify the complete requested journey in the video: a connection-only clip does not prove an approve/deposit flow. Prove every write with settleWrite (hash → receipt → state).

If those tools are missing, tell the user to add:

{
  "mcpServers": {
    "wallets-e2e": {
      "command": "npx",
      "args": ["-y", "@wallets-e2e/mcp"],
      "env": {
        "WALLETS_E2E_MCP_ROOT": "/absolute/path/to/this/dapp",
        "WALLETS_E2E_SEED_PHRASE": "throwaway test wallet",
        "WALLETS_E2E_ETH_ADDRESS": "0x...",
        "WALLETS_E2E_PASSWORD": "..."
      }
    }
  }
}

Then fall back to npx playwright test / npx playwright show-report with the same honesty rules.

When to use this skill

Most often you reach this skill immediately after building something, not as a separate testing task. Example: "develop a USDC deposit feature" means implement the frontend and contracts, then prove a real MetaMask approval and deposit with video of the popups and a mined receipt.

Start at references/feature-to-test.md. It is the workflow every other reference plugs into: name the flow, add test ids, write the test, assert on the chain, run it through the MCP, read the artifacts, fix, re-run.

Route the task

Read only the references needed for the requested work:

Agent workflow

  1. Inspect the repository before editing. Find the Playwright config, fixtures, dapp server command, wallet package, extension build path, test selectors, environment-variable convention, and existing focused tests. Reuse them rather than creating a parallel harness. If the package is absent, install a verified compatible public release. If none exists, report that blocker instead of cloning or linking toolkit source. Reuse existing local environment variables, funded test wallets, and deployed contracts. Check the project's deployment-address configuration before considering new deployment or wallet setup. Do not regenerate wallets, redeploy contracts, or replace the real example flow with a synthetic recording harness when the user wants evidence from their existing tests.

  2. Identify the chain and wallet explicitly: MetaMask takes an EvmNetwork; Leather takes a supported Stacks network. Do not infer a live network from an RPC URL or dapp label.

  3. Separate non-spending smoke coverage from live-chain spending coverage. Import, network, and connect tests should run without spending. Gate transfers and contract writes behind the repository's explicit opt-in environment variable.

  4. Implement the smallest complete user journey. A reliable wallet flow is:

    import → navigate dapp → select network → connect → trigger wallet action → approve/sign → wait for receipt → assert dapp and chain state

  5. Run focused tests through the MCP when it is connected (start_run / get_run / get_report). Otherwise use the project's package manager. Do not report success for a command that was skipped, not run, or intentionally failed. An intentional failure is valid only for proving failure artifacts and must be labelled as such.

  6. Generate review evidence on every finished run: preserve the HTML report, videos, screenshots, traces, and a short result summary with exact paths. Visually inspect relevant frames/screenshots; file existence alone does not prove that a wallet or dapp was recorded. Give those artifacts to the human reviewer so they can watch the real transactions.

Non-negotiable invariants

  • Use createExtensionTest for the extension-loaded persistent context and cleanup. Use withWalletReporting for the list plus unfiltered HTML reporters and artifact defaults.
  • Put every dapp-side action that opens a wallet window inside the driver method's trigger callback. The driver begins listening before invoking the callback. Clicking earlier creates the classic “popup appeared but the test timed out” race.
  • Import once per fresh profile and switch the wallet to the intended network before connecting or submitting a chain-aware action.
  • Use the action matching the wallet screen, not the contract name: connectToDapp for connection; confirmTransaction for any standard on-chain transaction/contract write; MetaMask approveTokenPermission only for its specialized ERC20 allowance screen; and confirmSignature for EIP-712/EIP-2612 signatures. Contract reads require no wallet confirmation.
  • Never treat popup closure, a dapp hash, or a pending receipt as success. Wait for mining, fail on a reverted/aborted result, then assert a meaningful state change. Wait for every dependent transaction before starting the next operation.
  • For browser EVM reads and receipts, prefer createInjectedEvmRpc(page) so the test uses the exact provider and network active in MetaMask. HTTP RPC resolution is for deployment scripts or callers that explicitly require it.
  • Never log, embed, commit, attach, or publish a valuable seed phrase/private key. Use a dedicated throwaway fixture wallet loaded from local environment variables. Treat videos, screenshots, and traces as sensitive because onboarding may record secret entry.
  • Live-chain tests consume gas and tokens. Do not fund, deploy, transfer, approve, or deposit without the user's scope or the repository's explicit opt-in gate.
  • Keep tests observable: assert the imported address, active chain, connected address, transaction hash shape, mined status, and balance/state delta appropriate to the flow.
  • Do not run Git write operations on the user's behalf. Leave staging, commits, branches, merges, rebases, resets, stashes, tags, cleaning, and pushes to the user; use read-only Git inspection only.
  • All user-facing setup and code examples must consume public package entrypoints. Repository source, workspace dependencies, internal scripts, and monorepo example paths are contributor concerns and must not be presented as a user installation path.

Completion standard

A wallet E2E change is complete only when the requested behavior is implemented, focused tests have actually run, dependent type/build checks pass, and the retained evidence answers what happened in the dapp and wallet. Report the exact pass/fail/skip counts, identify any spending tests not run, and give the reviewer the HTML report plus video and screenshot paths.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 92caf26. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated last month

README badge

README badge for yehia67/e2e-wallets