ledger-live: Skill for Claude Code

.agents/skills/coin-families-contract/SKILL.md

coin-families-contract is a skill for Claude Code, Codex from LedgerHQ/ledger-live. It costs 63 tokens per session (1,144 once invoked), scanned A, original, MIT.

A design rule for keeping coin-specific wallet behavior inside separate coin-family modules while shared screens use a common interface.

In plain words
What is it for?
Use it when changing wallet screens, view models, hooks, or family modules that behave differently for different cryptocurrencies.
Why use it?
It prevents shared code from filling up with exceptions for individual coins and makes the interface easier to extend or load in parts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is LedgerHQ/ledger-live's own configuration. It tells Claude Code and Codex how to work on ledger-live itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ledger-live configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LedgerHQ/ledger-live. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LedgerHQ/ledger-live/develop/.agents/skills/coin-families-contract/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/LedgerHQ/ledger-live

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for coin-families-contract

README.md
[![agentmods](https://agentmods.dev/badge/skills/ledgerhq/ledger-live/coin-families-contract/github.svg)](https://agentmods.dev/skills/ledgerhq/ledger-live/coin-families-contract)
Your own site
<a href="https://agentmods.dev/skills/ledgerhq/ledger-live/coin-families-contract"><img src="https://agentmods.dev/badge/skills/ledgerhq/ledger-live/coin-families-contract/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for coin-families-contract

Your own site · 80×15
<a href="https://agentmods.dev/skills/ledgerhq/ledger-live/coin-families-contract"><img src="https://agentmods.dev/badge/skills/ledgerhq/ledger-live/coin-families-contract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,144 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.01144
Opus 5.5 $0.00025 $0.00458
Sonnet 5.5 $0.00013 $0.00229
Haiku 4.5 $0.00006 $0.00114

Measured yesterday against content hash 5732ab8f5f8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

coin-families-contract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/coin-families-contract/SKILL.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Coin families contract (Desktop & Mobile UI)

Principle: Coin-specific UI and behavior must live in families/. Generic screens, hooks, and components must not branch on family === "evm" (or any family name). They must use the families contract: optional slots defined in the family type, implemented per family, and consumed via a single lookup (e.g. useLLDCoinFamily(currency.family).SlotName). This keeps generic code family-agnostic and supports modularisation and lazy loading.

Do not do (anti-patterns)

  • Generic code (outside families/<family>/):
    • if (currency.family === "evm") / if (transaction.family === "solana") to render or behave differently.
    • Coin-specific hooks or logic in shared ViewModels / screens (e.g. Canton onboarding branch inside a generic Scan Device VM).
    • Importing a specific coin module (e.g. @ledgerhq/coin-canton) in generic UI to branch on that coin.
  • Exception: Type-narrowing inside a family folder (e.g. invariant(transaction.family === "bitcoin", "...") in families/bitcoin/) is acceptable; the rule applies to generic (shared) code only.

Do (correct pattern)

  1. Define a slot on the contract

    • Desktop: Add an optional property to LLDCoinFamily in apps/ledger-live-desktop/src/renderer/families/types.ts (e.g. NoAssociatedAccounts?: React.ComponentType<...>).
    • Mobile: Use the same idea: a typed contract (or generated map like noAssociatedAccountsByFamily) that families can optionally fill.
  2. Implement only in the family

    • Put the component or logic in families/<family>/ (e.g. families/hedera/NoAssociatedAccounts.tsx) and add it to the family object (Desktop: the default export of families/<family>/index.ts, loaded on demand through loaders.ts; Mobile: in the generated aggregation if applicable).
  3. Use the contract in generic code

    • Generic code looks up by family and uses the slot if present, with no if (family === "hedera"):
    • Desktop: useLLDCoinFamily(currency.family).NoAssociatedAccounts → use it when defined. The hook lives in apps/ledger-live-desktop/src/renderer/families/useLLDCoinFamily.ts and is imported from ~/renderer/families. It suspends while the family chunk loads, so it needs a <Suspense> boundary above it. Outside React, importLLDCoinFamily(name) from the same module returns a promise.
    • Mobile: e.g. getCustomNoAssociatedAccounts(currency) returning a component from a family map, then pass it to the screen (e.g. as CustomNoAssociatedAccounts in route params).

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · -2 tokens per session 5732ab8f5f8c
  2. 2mo ago First seen · 54 lines · 65 tokens per session scan A 08f9af4730dd

Subscribe to this mod's changes

coin-families-contract is a skill published in the GitHub repository LedgerHQ/ledger-live (624 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 1,144 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.