Designing Tests
CloudAI-X/claude-workflow-v2
Designs and implements testing strategies for any codebase. An agent skill from CloudAI-X/claude-workflow-v2.
Write unit and integration tests for Ledger Wallet apps. An agent skill from LedgerHQ/ledger-live.
$ npx skills add LedgerHQ/ledger-live --skill testing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LedgerHQ/ledger-live testing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/testing .claude/skills/testing && rm -rf skills-srcUse ~/.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/
Install the "testing" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/testing into .claude/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/testingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LedgerHQ/ledger-live --skill testing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LedgerHQ/ledger-live testing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/testing .agents/skills/testing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "testing" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/testing into .agents/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LedgerHQ/ledger-live --skill testing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LedgerHQ/ledger-live testing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/testing .cursor/skills/testing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "testing" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/testing into .cursor/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LedgerHQ/ledger-live.git --path .agents/skills/testing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LedgerHQ/ledger-live --skill testing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LedgerHQ/ledger-live testing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/testing .gemini/skills/testing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "testing" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/testing into .gemini/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LedgerHQ/ledger-live testingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LedgerHQ/ledger-live --skill testing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/testing .github/skills/testing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "testing" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/testing into .github/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LedgerHQ/ledger-live --skill testing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LedgerHQ/ledger-live testing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/testing .opencode/skills/testing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "testing" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/testing into .opencode/skills/testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
testingWrite unit and integration tests for Ledger Wallet apps. An agent skill from LedgerHQ/ledger-live.
Testing is an agent skill from LedgerHQ/ledger-live. Write unit and integration tests for Ledger Wallet apps. Use for Jest tests (Desktop/Mobile), MSW handlers and testing best practices. Applies to ".test.", ".spec.", "/tests/", "/tests/", "/integrations/", "/jest-setup"
Its SKILL.md is about 1.8k 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 Unit testing, Integration testing and Test strategy. It works with Jest. The repository describes itself as: Mono-repository for Ledger Wallet apps and related packages. The licence is MIT.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit a3861a2. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
pnpmrgFrom the folder's file list and the shell code blocks in SKILL.md.
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.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Testing loads about 1.8k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 368 words of instructions outside code blocks.
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.
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.
The full file from LedgerHQ/ledger-live at commit a3861a2, republished under its MIT licence (© LedgerHQ). 368 words, ~1,770 tokens.
.claude/skills/testing/SKILL.md (or your agent's skills folder).Jest + MSW + React Testing Library (Desktop) / React Native Testing Library (Mobile) ❌ E2E tests → Use
e2eskill
toBeVisible() over toBeInTheDocument() — Always. toBeInTheDocument only checks DOM presence; elements can be hidden. Use toBeInTheDocument only when testing explicitly hidden elements.rg the codebase. If it exists, import it. If your new mock is reusable (2+ files), put it in a shared location.it("should <behavior> when <condition>").getByRole > getByLabelText > getByText > getByTestId (last resort).overriddenFeatureFlags in initialState.settings.genAccount() from @ledgerhq/ledger-wallet-framework/mocks/account, getCryptoCurrencyById() from @ledgerhq/live-common/currencies. Never recreate account/currency data from scratch.pnpm test:jest "filename" # Run specific file
pnpm test:jest # Run all tests
pnpm test:jest --coverage # Coverage report
# Coin modules (libs/coin-modules)
pnpm coin:<name> test # Unit tests
pnpm coin:<name> test "filename" # Specific file
pnpm coin:<name> test-integ # Integration tests (slow)| Platform | Render Import | MSW Server |
|---|---|---|
| Desktop | tests/testSetup | tests/server.ts |
| Mobile | @tests/test-renderer | __tests__/server.ts |
import { render, screen, waitFor } from "tests/testSetup";
import { server } from "tests/server";
import { http, HttpResponse } from "msw";
jest.mock("@ledgerhq/live-common/someService");
describe("MyComponent", () => {
beforeEach(() => jest.clearAllMocks());
it("should render title", () => {
render(<MyComponent title="Test" />);
expect(screen.getByText("Test")).toBeVisible();
});
it("should call onClick when button pressed", async () => {
const onClick = jest.fn();
const { user } = render(<MyComponent onClick={onClick} />);
await user.click(screen.getByRole("button"));
expect(onClick).toHaveBeenCalledTimes(1);
});
it("should display fetched data", async () => {
server.use(http.get("/api/data", () => HttpResponse.json({ name: "Bitcoin" })));
render(<MyComponent />);
await waitFor(() => expect(screen.getByText("Bitcoin")).toBeVisible());
});
});import { renderHook, act, waitFor } from "tests/testSetup";
const { result } = renderHook(() => useMyHook());
await act(async () => result.current.increment());
expect(result.current.value).toBe(1);Desktop — plain object merged with defaults:
render(<MyComponent />, {
initialState: {
settings: { theme: "dark" },
accounts: { active: [mockAccount] },
},
});Mobile — function receiving default state:
render(<MyScreen />, {
overrideInitialState: (state: State) => ({
...state,
settings: { ...state.settings, blacklistedTokenIds: ["ethereum/erc20/usdt"] },
}),
});Feature flags (both platforms):
render(<MyComponent />, {
initialState: {
settings: {
overriddenFeatureFlags: {
myFlag: { enabled: true, params: { key: "value" } },
},
},
},
});// External dependency
jest.mock("@ledgerhq/live-common/account/index");
const mockedFn = jest.mocked(getMainAccount);
mockedFn.mockReturnValue(mockAccount);
// ViewModel (MVVM)
jest.mock("../useMyViewModel", () => ({ useMyViewModel: jest.fn() }));
jest.spyOn(UseMyViewModel, "useMyViewModel").mockImplementation(() => ({
data: mockData,
isLoading: false,
}));
// MSW override for error case
server.use(http.get("/api/data", () => HttpResponse.json({ error: "Not found" }, { status: 404 })));Before creating anything, check these locations:
| Location | What's there |
|---|---|
@ledgerhq/ledger-wallet-framework/mocks/account | genAccount(), genTokenAccount() |
@ledgerhq/live-common/currencies | getCryptoCurrencyById(), getTokenById() |
tests/handlers/ | MSW handlers (market, assets, countervalues, cryptoIcons) |
tests/handlers/fixtures/ | JSON fixtures for API responses |
tests/fixtures/ | mockedAccountList, expectedCurrencyList |
tests/mocks/ | Mock components, assets, countervalues |
# Run BEFORE writing new mocks
rg "yourMockName|yourHelper" tests/ __tests__/ src/ libs/ --type tsNew reusable mocks go in tests/mocks/, new handlers in tests/handlers/, new fixtures in tests/handlers/fixtures/.
These cause flaky tests and mock cannibalization when running with parallel workers (--maxWorkers=50%).
Duplicate mocks — Don't jest.mock("module") in a test file when it's already mocked in jest-setup (apps/ledger-live-mobile/__tests__/jest-setup.js or apps/ledger-live-desktop/tests/jestSetup.js). Use jest.mocked(module.export).mockReturnValue(...) in beforeEach instead.
Hooks at describe load time — Never call renderHook(...) or access .result.current at the top level of a describe block. Move into beforeEach or inside each test — calling hooks outside of test callbacks crashes Jest parallel workers.
jest.restoreAllMocks() — Never use this; it restores global mocks from jest-setup and breaks other tests. Use jest.clearAllMocks() or mock.mockRestore() for specific spies only.
Wrong beforeEach order — Call jest.clearAllMocks() before mockReturnValue() or other mock configuration — not after (calling clear after wipes the setup).
1. Search for existing mocks → 2. Write test → 3. Run test → 4. Fix if fail → 5. Next fileStart with the simplest units (utils, hooks), then work up to components with side effects (API, navigation). This order catches foundational bugs early and builds confidence incrementally.
© LedgerHQ, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/testing of LedgerHQ/ledger-live.
Open the folder on GitHubat commit a3861a2
Testing 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Testing this skillLedgerHQ/ledger-live | 621 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Designing TestsCloudAI-X/claude-workflow-v2 | 1.4k | 1 repos | ~1.5k | Automated safety check: Pass | MIT | |
| Async Test And Doc Syncdiscord-php/DiscordPHP | 1.1k | — | ~3.4k | Automated safety check: Notes | MIT | |
| Write Testsgrafana/synthetic-monitoring-app | 171 | — | ~1.2k | Automated safety check: Pass | AGPL-3.0 | |
| Robotics Testingarpitg1304/robotics-agent-skills | 368 | — | ~4.7k | Automated safety check: Pass | Apache-2.0 | |
| Akka.NET Testing PatternsAaronontheweb/dotnet-skills | 1.2k | 1 repos | ~2.4k | Automated safety check: Pass | MIT |
CloudAI-X/claude-workflow-v2
Designs and implements testing strategies for any codebase. An agent skill from CloudAI-X/claude-workflow-v2.
discord-php/DiscordPHP
Maintain test and documentation alignment — PHPUnit tests, async testing patterns, PHPDoc contracts, guide pages, and documentation workflow.
grafana/synthetic-monitoring-app
Write Jest integration and unit tests for the Grafana Synthetic Monitoring app using React Testing Library, MSW, and src/test helpers.
arpitg1304/robotics-agent-skills
Testing strategies, patterns, and tools for robotics software.
Aaronontheweb/dotnet-skills
Shows how to test Akka.NET actors with Akka.Hosting.TestKit: swapping services for fakes, using TestProbes, and checking persistence, plus when the older TestKit still fits.
kurealnum/dotfiles
Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage.
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…
LedgerHQ/ledger-live
Write, review or debug a cloudSyncModule.ts — a CloudSyncDataManager that syncs one slice of user data through Ledger Sync (Cloud Sync).
LedgerHQ/ledger-live
Maintain CODEOWNERS file and team directories. An agent skill from LedgerHQ/ledger-live.
LedgerHQ/ledger-live
Coin-specific families logic must live in families/. An agent skill from LedgerHQ/ledger-live.
LedgerHQ/ledger-live
Structure a Ledger Wallet data layer where one API response serves several entities.
LedgerHQ/ledger-live
Investigate native React Native crashes (Fabric/Hermes/iOS) in ledger-live-mobile when JS error logs are missing or unhelpful.
Works with
Categories
Write unit and integration tests for Ledger Wallet apps. An agent skill from LedgerHQ/ledger-live. Testing is an agent skill from LedgerHQ/ledger-live. Write unit and integration tests for Ledger Wallet apps.
Testing fits situations like: jest tests (Desktop/Mobile); MSW handlers and testing best practices.
Run `npx skills add LedgerHQ/ledger-live --skill testing -a claude-code`. Or copy the skill folder (.agents/skills/testing in LedgerHQ/ledger-live) into .claude/skills/testing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LedgerHQ/ledger-live --skill testing -a codex`. Or copy the skill folder (.agents/skills/testing in LedgerHQ/ledger-live) into .agents/skills/testing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LedgerHQ/ledger-live --skill testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing, .gemini/skills/testing, .github/skills/testing and .opencode/skills/testing in your project.
Going by SKILL.md and its folder, Testing needs the command-line tools its instructions call (pnpm and rg).
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.
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.
Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Testing: Designing Tests (CloudAI-X/claude-workflow-v2, 1.4k stars), Async Test And Doc Sync (discord-php/DiscordPHP, 1.1k stars), Write Tests (grafana/synthetic-monitoring-app, 171 stars) and Robotics Testing (arpitg1304/robotics-agent-skills, 368 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LedgerHQ (a GitHub organization) maintains it in LedgerHQ/ledger-live, which has 621 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 7, 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.