agentleFS
LedgerHQLedgerHQ/ledger-live/.agents/skills/ldls-native/SKILL.md

ldls-native

Skill627 starsChanged 8 days agoMITView on GitHub

Lumen UI React Native design system rules (`@ledgerhq/lumen-ui-rnative`) and how a native implementation maps a universal contract onto Lumen. Use when writing or reviewing native UI, in `*.native.tsx` files or under `apps/ledger-live-mobile/**`.

The file

Files
SKILL.md

Lumen UI React Native

Read the Lumen rules first

Lumen ships its own rules for components, the lx style system and tokens. Read them before writing UI: apps/ledger-live-mobile/node_modules/@ledgerhq/lumen-ui-rnative/ai-rules/RULES.md.

The file exists once pnpm i has run. pnpm links @ledgerhq/lumen-ui-rnative under the packages that depend on it, not at the repo root. If the path is missing, open ai-rules/RULES.md in the installed @ledgerhq/lumen-ui-rnative package of any native consumer.

Map the contract onto Lumen

The rules both platforms follow are in universal-components. On native, X.native.tsx maps:

Contract (X.types.ts)Native implementation (X.native.tsx)
Intent callback, onOpenContacts()onPress={onOpenContacts}
Value callback, onSearchQueryChangeonChangeText={onSearchQueryChange}
testIDtestID={testID}
// ContactsButton.native.tsx
import {
  Card,
  CardContent,
  CardContentTitle,
  CardHeader,
  CardLeading,
} from "@ledgerhq/lumen-ui-rnative";
import type { ContactsButtonProps } from "./ContactsButton.types";

export function ContactsButton({ title, onOpenContacts, testID }: ContactsButtonProps) {
  return (
    <Card type="interactive" onPress={onOpenContacts} testID={testID}>
      <CardHeader>
        <CardLeading>
          <CardContent>
            <CardContentTitle>{title}</CardContentTitle>
          </CardContent>
        </CardLeading>
      </CardHeader>
    </Card>
  );
}

What stays in the native file

These never appear in the contract. The native file owns them:

  • Lumen imports and Lumen props types (@ledgerhq/lumen-ui-rnative), and any react-native* import.
  • Gesture and input props: onPress, onLongPress, onChangeText, onSubmitEditing, onFocus, onBlur.
  • Event objects: GestureResponderEvent, NativeSyntheticEvent.
  • lx, style, StyleProp<ViewStyle>.
  • Refs to native views.
  • Values the native file can read itself, such as the safe area under a sheet (useBottomSheetBottomInset()), instead of a bottomInset prop.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.