Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Defines the families contract pattern keeping coin-specific UI and logic in families/ folders for Desktop and Mobile.
14% 95%+82 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 3 of 22 without it.
This test ran on v1. v3 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
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.
families/<family>/):
if (currency.family === "evm") / if (transaction.family === "solana") to render or behave differently.@ledgerhq/coin-canton) in generic UI to branch on that coin.@ledgerhq/live-signer-*, @ledgerhq/device-signer-kit-*, @ledgerhq/wallet-btc) in generic UI. The coin-families/no-coin-specific-import lint rule reports them like a coin module.invariant(transaction.family === "bitcoin", "...") in families/bitcoin/) is acceptable; the rule applies to generic (shared) code only.Define a slot on the contract
LLDCoinFamily in apps/ledger-live-desktop/src/renderer/families/types.ts (e.g. NoAssociatedAccounts?: React.ComponentType<...>).noAssociatedAccountsByFamily) that families can optionally fill.Implement only in the family
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).Use the contract in generic code
if (family === "hedera"):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.getCustomNoAssociatedAccounts(currency) returning a component from a family map, then pass it to the screen (e.g. as CustomNoAssociatedAccounts in route params).apps/ledger-live-desktop/src/renderer/families/types.ts — NoAssociatedAccounts?: React.ComponentType<AddAccountsStepProps> on LLDCoinFamily.apps/ledger-live-desktop/src/renderer/families/hedera/NoAssociatedAccounts.tsx and hedera/index.ts exporting it in the family object.apps/ledger-live-desktop/src/mvvm/features/AddAccountDrawer/screens/ScanAccounts/useScanAccounts.ts: useLLDCoinFamily(currency.family).NoAssociatedAccounts, with no Hedera-specific branch.useScanDeviceAccountsViewModel.ts: getCustomNoAssociatedAccounts(currency) from ~/generated/NoAssociatedAccounts; result passed as CustomNoAssociatedAccounts to the NoAssociatedAccounts screen. No if (family === "hedera") in the VM.Next to this one in the catalogue, plus more from the same author.