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

ldls-web

Skill627 starsChanged 9 days agoMITView on GitHub

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

The file

Files
SKILL.md

Lumen UI React

Read the Lumen rules first

Lumen ships its own rules for components, Tailwind tokens and typography. Read them before writing UI: apps/ledger-live-desktop/node_modules/@ledgerhq/lumen-ui-react/ai-rules/RULES.md.

The file exists once pnpm i has run. pnpm links @ledgerhq/lumen-ui-react 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-react package of any web consumer.

Map the contract onto Lumen

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

Contract (X.types.ts)Web implementation (X.web.tsx)
Intent callback, onOpenContacts()onClick={onOpenContacts}
Value callback, onSearchQueryChangeonChange={(event) => onSearchQueryChange(event.target.value)}
testIDdata-testid={testID}
// ContactsButton.web.tsx
import {
  Card,
  CardContent,
  CardContentTitle,
  CardHeader,
  CardLeading,
} from "@ledgerhq/lumen-ui-react";
import type { ContactsButtonProps } from "./ContactsButton.types";

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

What stays in the web file

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

  • Lumen imports and Lumen props types (@ledgerhq/lumen-ui-react).
  • Gesture and DOM event props: onClick, onChange, onSubmit, onFocus, onBlur, onKey*.
  • Event objects: ChangeEvent, SyntheticEvent, MouseEvent.
  • data-testid, which the contract spells testID.
  • className, style, CSSProperties and Tailwind classes.
  • Refs to HTML*Element.

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.