Agent skill

E2E Swap

by LedgerHQ in LedgerHQ/ledger-live

Write or update Swap E2E tests for Ledger Live Desktop (Playwright) and Mobile (Detox).

MITAuto-check passedTesting & QA

Install E2E Swap

skills CLI
$ npx skills add LedgerHQ/ledger-live --skill e2e-swap -a claude-code

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

GitHub CLI
$ gh skill install LedgerHQ/ledger-live e2e-swap --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/LedgerHQ/ledger-live.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/e2e-swap .claude/skills/e2e-swap && 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
e2e-swap
GitHub stars
622
Token cost
~1.4k tokens
SKILL.md length
564 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Write or update Swap E2E tests for Ledger Live Desktop (Playwright) and Mobile (Detox).

  • Works in 4 steps: Verify current code and usages (rg for… → Classify → Implement only real changes. → …
  • Swap spec updates
  • SKILL.md covers Use this skill when, Current source of truth, Platform model and Implementation rules, plus 5 more sections
  • Calls pnpm

What it does

E2E Swap is an agent skill from LedgerHQ/ledger-live. Write or update Swap E2E tests for Ledger Live Desktop (Playwright) and Mobile (Detox). Use for swap spec updates, provider flows, multi-step approvals, page-object refactors, swap-history checks, KYC/validation banners, and review-driven cleanup.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering End-to-end testing and Refactoring. It works with Playwright. The repository describes itself as: Mono-repository for Ledger Wallet apps and related packages. The licence is MIT.

When your agent uses it

  • Swap spec updates
  • Multi-step approvals
  • Page-object refactors
  • Swap-history checks

Example prompts

  • “/e2e-swap”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Verify current code and usages (rg for symbol usage).
  2. Classify
  3. Implement only real changes.
  4. Prepare explicit PR replies for stale/duplicate/already-fixed comments.

What it can do on your machine

Read from SKILL.md and the folder at commit 9c51f17. 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:

    • pnpm

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

  • Network

    No URLs in SKILL.md. Its commands use pnpm, 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

E2E Swap loads about 1.4k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 564 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.4k

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 LedgerHQ/ledger-live at commit 9c51f17, republished under its MIT licence (© LedgerHQ). 564 words, ~1,373 tokens.

Download SKILL.mdSave it as .claude/skills/e2e-swap/SKILL.md (or your agent's skills folder).
name
e2e-swap
description
Write or update Swap E2E tests for Ledger Live Desktop (Playwright) and Mobile (Detox). Use for swap spec updates, provider flows, multi-step approvals, page-object refactors, swap-history checks, KYC/validation banners, and review-driven cleanup.

Swap E2E Skill

Use this skill when

  • Updating swap tests in e2e/desktop or e2e/mobile.
  • Refactoring swap page objects or moving reusable flow logic out of specs.
  • Fixing PR review comments about dead code, selector ownership, brittle amounts, or multi-step approval assertions.

Current source of truth

  • Desktop specs: e2e/desktop/tests/specs/*swap*.spec.ts
  • Desktop swap shared utils:
    • e2e/desktop/tests/utils/swapUtils.ts
  • Desktop page objects:
    • e2e/desktop/tests/page/swap.page.ts
    • e2e/desktop/tests/page/drawer/swap.confirmation.drawer.ts
  • Mobile builders/specs:
    • e2e/mobile/specs/swap/otherTestCases/swap.other.ts
    • e2e/mobile/specs/swap/**/*.spec.ts
  • Mobile page objects:
    • e2e/mobile/page/liveApps/swapLiveApp.ts
    • e2e/mobile/page/trade/swap.page.ts

Platform model

  • Desktop:
    • Electron can expose multiple windows (main app + one or more webviews).
    • Resolve swap webview via WebViewAppPage.getWebView() using webviewIdentifier title matching, not fixed electronApp.windows()[N] indexes.
    • SwapPage methods usually receive electronApp.
    • SwapConfirmationDrawer methods act on the main window.
  • Mobile:
    • Webview operations use Detox web helpers.
    • Native operations use regular Detox matchers.

Implementation rules

  • Keep selectors centralized in page objects, not inline in specs.
  • Keep test IDs as class properties in page objects (avoid repeated string literals in methods).
  • Do not define reusable workflow methods in spec files. Put them in page objects (for atomic UI actions) or shared utils (for multi-step flows).
  • Remove dead methods/fields quickly; do not keep unused helpers.
  • Keep single-use constants local to the narrowest scope that uses them.
  • Reuse existing provider helper selectSpecificProvider(...) before adding new variants.
  • Prefer runtime UI assertions over cross-repo filesystem assertions.
  • Prefer if/else in @Step methods over early return branches for readability and reporting consistency.
  • When replacing all occurrences in strings, prefer replaceAll() over regex-based replace() where equivalent.
  • Avoid unnecessary non-null assertions (!); prefer type-safe narrowing/guards.
  • For fragile swap amounts, fetch minimum dynamically with:
    • app.swap.getMinimumAmount(...) (desktop)
    • app.swapLiveApp.getMinimumAmount(...) (mobile)

Desktop patterns (current API)

  • Keep assertion method prefixes consistent within a page object (check*).
  • In SwapPage, prefer const webview = await this.getWebView() for swap webview context. Do not pass electronApp unless a method explicitly needs non-webview Electron windows/events.
  • Current Changelly UI swap pattern:
    • performSwapUntilQuoteSelectionStep(...)
    • app.swap.selectSpecificProvider(Provider.CHANGELLY, electronApp)
    • const amountToSend = await app.swap.getAmountToSend(electronApp) (only when needed by follow-up assertions)
  • Avoid reintroducing removed generic/dead helpers:
    • checkBannerVisibility(...) (removed)
    • verifyContinueButtonVisible() in desktop swap page (removed)
    • selectProviderQuoteWithRetry(...) in swap utils (removed)
Show full SKILL.md (238 more words)Show less

Mobile patterns (current API)

  • Multi-step flow should assert progression, not only click:
    • tapExecuteSwap()
    • tapExecuteSwapOnStepApproval() (includes post-click wait to send summary)
  • Do not reintroduce removed JS-click helper tapSwapOnMultiStepApproval() unless there is a proven regression and a documented reason.
  • Swap history feedback link assertion should be page-object driven:
    • app.swap.checkSwapHistoryFeedbackFormUrl(expectedUrl)
    • Prefer platform-specific attributes for URL assertion (value on iOS, label on Android).
  • Do not add unused icon selector fields (networkFeesInfoIcon, rateInfoIcon).

Validation before finishing

Run validation for the impacted E2E package(s), not the whole monorepo:

  • Desktop:
    • pnpm --filter ledger-live-desktop-e2e-tests typecheck
    • Run targeted Playwright tests for changed swap specs when environment allows.
  • Mobile:
    • pnpm --filter ledger-live-mobile-e2e-tests typecheck
    • Run targeted Detox tests for changed swap specs when environment allows.

Validation workflow notes:

  • Reuse an existing watch terminal when available before starting a new watcher.
  • Prefer watch mode where scripts support it.

If unrelated pre-existing failures appear, explicitly report them as pre-existing and keep scope focused on swap changes.

PR review comment workflow

For each comment:

  1. Verify current code and usages (rg for symbol usage).
  2. Classify:
    • real change needed,
    • duplicate comment,
    • stale/already addressed.
  3. Implement only real changes.
  4. Prepare explicit PR replies for stale/duplicate/already-fixed comments.

Quick checklist

  • No inline repeated test IDs in specs when page object exists.
  • No dead selectors/helpers added.
  • Multi-step mobile flow has a post-click state assertion.
  • Amounts are not hardcoded where minimum is provider-dependent.
  • Desktop assertions use correct window context.
  • Typecheck and relevant test commands were attempted/reported.

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

Files

Just SKILL.md in .agents/skills/e2e-swap of LedgerHQ/ledger-live.

Open the folder on GitHubat commit 9c51f17

Compare with similar skills

E2E Swap 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.

E2E Swap compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
E2E Swap this skillLedgerHQ/ledger-live622—~1.4kAutomated safety check: PassMIT
Playwright Page Objectsbartstc/vite-ts-react-template122—~1kAutomated safety check: NotesMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
Write and Verify Playwright Testsappsmithorg/appsmith41k—~2.9kAutomated safety check: NotesApache-2.0
playwright-cli Browser Automationgithub/gh-aw5.4k23 repos~2.8kAutomated safety check: PassMIT
Cucumber and Playwright E2E Testslanggenius/dify158k—~682Automated safety check: PassCustom licence

Similar skills

  • Playwright Page Objects

    bartstc/vite-ts-react-template

    A skill your agent uses when creating page objects or refactoring Playwright E2E tests for better maintainability with Page Object Model patterns.

    122 GitHub stars~1k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • 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
  • 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 yesterday
    Testing & QAAuto-check: notes
  • 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.4k GitHub starsUsed in 23 repos~2.8k tokens
    Testing & QAAuto-check passed
  • 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.

    155k GitHub stars~3.3k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from LedgerHQ/ledger-live

All 50 skills in this repo
  • Impacting PRs

    LedgerHQ/ledger-live

    Find which open PRs are impacted by a migration/sunset/refactor and notify their authors — blocking review when the old path is already gone from develop, heads-up comment when it is only deprecated…

    622 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Cloud Sync Module

    LedgerHQ/ledger-live

    Write, review or debug a cloudSyncModule.ts — a CloudSyncDataManager that syncs one slice of user data through Ledger Sync (Cloud Sync).

    622 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Codeownership

    LedgerHQ/ledger-live

    Maintain CODEOWNERS file and team directories. An agent skill from LedgerHQ/ledger-live.

    622 GitHub stars~687 tokensUpdated today
    Auto-check passed
  • Coin Families Contract

    LedgerHQ/ledger-live

    Coin-specific families logic must live in families/. An agent skill from LedgerHQ/ledger-live.

    622 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Data Layer Advanced

    LedgerHQ/ledger-live

    Structure a Ledger Wallet data layer where one API response serves several entities.

    622 GitHub stars~509 tokensUpdated today
    Auto-check passed
  • Debug Rn Native Crash

    LedgerHQ/ledger-live

    Investigate native React Native crashes (Fabric/Hermes/iOS) in ledger-live-mobile when JS error logs are missing or unhelpful.

    622 GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about E2E Swap

What does E2E Swap do?

Write or update Swap E2E tests for Ledger Live Desktop (Playwright) and Mobile (Detox). E2E Swap is an agent skill from LedgerHQ/ledger-live. Write or update Swap E2E tests for Ledger Live Desktop (Playwright) and Mobile (Detox).

When should I use E2E Swap?

E2E Swap fits situations like: swap spec updates; multi-step approvals; page-object refactors; swap-history checks.

How do I install E2E Swap in Claude Code?

Run `npx skills add LedgerHQ/ledger-live --skill e2e-swap -a claude-code`. Or copy the skill folder (.agents/skills/e2e-swap in LedgerHQ/ledger-live) into .claude/skills/e2e-swap in your project. Claude Code loads it when a task matches its description.

How do I install E2E Swap in Codex?

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

Can I use E2E Swap 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 LedgerHQ/ledger-live --skill e2e-swap -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/e2e-swap, .gemini/skills/e2e-swap, .github/skills/e2e-swap and .opencode/skills/e2e-swap in your project.

What does E2E Swap need to run?

Going by SKILL.md and its folder, E2E Swap needs the command-line tools its instructions call (pnpm).

Does E2E Swap access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is E2E Swap 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 E2E Swap use?

E2E Swap is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does E2E Swap use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to E2E Swap?

Skills that share tags, products or a category with E2E Swap: Playwright Page Objects (bartstc/vite-ts-react-template, 122 stars), Web Application Testing (anthropics/skills, 180k stars), Write and Verify Playwright Tests (appsmithorg/appsmith, 41k stars) and playwright-cli Browser Automation (github/gh-aw, 5.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains E2E Swap?

LedgerHQ (a GitHub organization) maintains it in LedgerHQ/ledger-live, which has 622 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 9, 2026.

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