Agent skill

Errors

by LedgerHQ in LedgerHQ/ledger-live

How to define and check error classes in Ledger Live. An agent skill from LedgerHQ/ledger-live.

MITAuto-check passed

Install Errors

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

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

GitHub CLI
$ gh skill install LedgerHQ/ledger-live errors --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/errors .claude/skills/errors && 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
errors
GitHub stars
622
Token cost
~801 tokens
SKILL.md length
228 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

How to define and check error classes in Ledger Live. An agent skill from LedgerHQ/ledger-live.

  • SKILL.md covers Define errors, Check error type: prefer… and Where errors live
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Errors is an agent skill from LedgerHQ/ledger-live. How to define and check error classes in Ledger Live. Read when adding a new error, creating an errors.ts file, or checking an error's type.

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

The repository describes itself as: Mono-repository for Ledger Wallet apps and related packages. The licence is MIT.

Example prompts

  • “/errors”

What it can do on your machine

Read from SKILL.md and the folder at commit 30d7883. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

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

  • Network

    No URLs in SKILL.md.

    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

Errors loads about 801 tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 228 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~801

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 30d7883, republished under its MIT licence (© LedgerHQ). 228 words, ~801 tokens.

Download SKILL.mdSave it as .claude/skills/errors/SKILL.md (or your agent's skills folder).
name
errors
description
How to define and check error classes in Ledger Live. Read when adding a new error, creating an errors.ts file, or checking an error's type.
globs
**/errors.ts, **/errors/**/*.ts

Errors

Each package owns its errors in its own src/errors.ts, as plain native classes. There is no shared errors lib: the former @ledgerhq/errors package has been removed.

Define errors

A package groups its errors in src/errors.ts. Extend Error directly and set a stable name. The name string is the contract — keep it stable, it is what survives across process/serialization boundaries.

ts
// message-only
export class FooNotFound extends Error {
  override name = "FooNotFound";
}

// with a default message
export class InvalidChallenge extends Error {
  override name = "InvalidChallenge";
  constructor() {
    super("backend returned an invalid challenge");
  }
}

// with extra fields
export class HttpError extends Error {
  override name = "HttpError";
  readonly status: number | undefined;
  constructor(message: string, status?: number) {
    super(message);
    this.status = status;
  }
}

Group a family under a per-package base class so callers can catch the whole set:

ts
export class WalletAuthError extends Error {
  override name = "WalletAuthError";
}
export class WalletAuthSignatureError extends WalletAuthError {
  override name = "WalletAuthSignatureError";
  constructor(cause: unknown) {
    super("failed to sign challenge", { cause });
  }
}

See libs/ledger-auth/src/errors.ts for a full reference.

cause

Use the native second argument: super(message, { cause }). Error cause was standardized in ES2022 and is supported by modern runtimes; its TypeScript typing (ErrorOptions) requires lib: es2022.error (i.e. es2022). Coin modules and some older packages still target es2020 — there, declare and assign manually:

ts
export class BroadcastError extends Error {
  override name = "BroadcastError";
  cause?: unknown;
  constructor(message: string, cause?: unknown) {
    super(message);
    this.cause = cause;
  }
}

Check error type: prefer error.name

Prefer error.name === "FooNotFound" over instanceof FooNotFound.

instanceof breaks once an error crosses a boundary — desktop/mobile IPC, worker messaging, or the external @ledgerhq/coin-module-framework — because the object is rebuilt and loses its prototype. The name string always survives.

ts
// ✅ survives serialization
if (error instanceof Error && error.name === "FooNotFound") { … }

// ⚠️ only works in-process, before any serialization
if (error instanceof FooNotFound) { … }

Use instanceof only when you are certain the error has not crossed a boundary (e.g. caught in the same module that threw it) and you need the typed fields.

Where errors live

  • Logic in one package → that package's src/errors.ts.
  • Used only by an app → the app's src/errors.ts (apps/ledger-live-desktop, apps/ledger-live-mobile).
  • Shared by several coin modules → libs/ledger-wallet-framework/src/errors.ts (@ledgerhq/ledger-wallet-framework/errors), the shared home below the coin layer.

© 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/errors of LedgerHQ/ledger-live.

Open the folder on GitHubat commit 30d7883

Compare with similar skills

Errors 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.

Errors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Errors this skillLedgerHQ/ledger-live622—~801Automated safety check: PassMIT
Recursive Decision Ledgeraffaan-m/ECC275k1 repos~701Automated safety check: PassMIT
Party Ledger Reconciliationsickn33/agentic-awesome-skills47k1 repos~5.2kAutomated safety check: PassMIT
Defining Clos Classesultralisp/ultralisp258—~1kAutomated safety check: PassNone
Ledgeralsk1992/CloddsBot2.9k—~134Automated safety check: PassMIT
Tabler Class Reference Tablestabler/tabler42k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Run repeated rollouts ("Prime Gauss" style recursive prompting) while keeping an append-only decision ledger of trials, marks, coherence checks, and promotion gates, so recursive confidence never…

    275k GitHub starsUsed in 1 repo~701 tokens
    Business, Finance & HRAuto-check passed
  • Party Ledger Reconciliation

    sickn33/agentic-awesome-skills

    Party ledger reconciliation: party type, name and PAN/VAT, ledger against statement balance, difference and reason, duplicates, confirmation status and adjustment.

    47k GitHub starsUsed in 1 repo~5.2k tokens
    Business, Finance & HRAuto-check passed
  • Defining Clos Classes

    ultralisp/ultralisp

    A skill your agent uses when defining CLOS classes and their constructors in Common Lisp, adding an optional slot to an existing class, or converting a defstruct to a defclass — especially when…

    258 GitHub stars~1k tokensUpdated 24 days ago
    DevelopmentAuto-check passed
  • Ledger

    alsk1992/CloddsBot

    Trade decision audit trail and statistics. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub stars~134 tokensUpdated 5 days ago
    Data & AnalyticsAuto-check passed
  • Writes or updates the classnames front matter that renders the class table at the end of a Tabler component docs page.

    42k GitHub stars~1.4k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Ledger Tasks Yylo

    sickn33/agentic-awesome-skills

    Use YYLO Ledger task management: create, list, search, get, mark, update, archive, deps, ready, order and merge with dependencies.

    47k GitHub starsUsed in 1 repo~2.8k tokens
    Productivity & AutomationAuto-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

Questions about Errors

What does Errors do?

How to define and check error classes in Ledger Live. An agent skill from LedgerHQ/ledger-live. Errors is an agent skill from LedgerHQ/ledger-live. How to define and check error classes in Ledger Live.

How do I install Errors in Claude Code?

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

How do I install Errors in Codex?

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

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

What does Errors need to run?

SKILL.md names no scripts, command-line tools or credentials: Errors is instructions for the agent only.

Does Errors 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 Errors 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 Errors use?

Errors 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 Errors use?

About 801 tokens (SKILL.md is roughly 3.2k 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 Errors?

Skills that share tags, products or a category with Errors: Recursive Decision Ledger (affaan-m/ECC, 275k stars), Party Ledger Reconciliation (sickn33/agentic-awesome-skills, 47k stars), Defining Clos Classes (ultralisp/ultralisp, 258 stars) and Ledger (alsk1992/CloddsBot, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Errors?

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 8, 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.