LedgerHQ/lumen / .claude/skills/ds-discovery
ds-discovery
VerifiedUse when asked how other design systems handle a component, prop, token or pattern; to name a component, prop or token; to research best practices (composition, when to split, a11y, responsiveness, motion) before building; or for a design-system discovery or benchmark report. Compares Coinbase CDS, Adobe Spectrum, Astryx, Material, Primer, MetaMask DS and Base UI, anchors the recommendation in Lumen's code, and outputs a shareable HTML report.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.3 KB |
| assets/report-template.html | other | 14.6 KB |
| references/dimensions.md | markdown | 4.3 KB |
| references/sources.md | markdown | 5.1 KB |
| scripts/capture-demo.mjs | script | 3.7 KB |
references/dimensions.md
View on GitHub# Dimensions per question type
Use the set for the request's main type, and borrow from another set when the
question mixes them. These dimensions become the comparison-table columns, so
keep each finding to one line.
## New component
Discovery compares **what each system exposes**, not how it's built: skip
implementation internals (state storage, rendering tricks, DOM measurement)
unless they constrain the API or behaviour. Default table columns: API shape,
key props, behaviour, spec, accessibility, platforms.
**API shape**: name every shape the system uses, in this vocabulary:
| Shape | Looks like |
|---|---|
| Compound | `<Tabs><Tabs.List><Tabs.Tab/>…` parts the consumer assembles |
| Constrained | One component, props only, fixed layout |
| Collection | An `items` array, often with a render function per item |
| Slots | Named props taking nodes (`leadingContent`, `slots={{…}}`) |
| Render props | A function child or prop that renders part of the UI |
| Headless hook | A hook returning state and props (`useTabs`), no markup |
| Element override | `render`, `asChild` or `as` to swap the rendered element |
| Dimension | What to look for | For |
|---|---|---|
| Purpose | When to use it, when not to, which alternatives the system points to | Design |
| API shape | The shapes above, and which one is the main entry point | Engineering |
| Key props | Names of the props that carry meaning (value/change pair, variants, states), controlled vs uncontrolled | Engineering |
| Anatomy | Parts and what each is called | Both |
| Variants & sizes | Names and how many | Both |
| States | Hover, focus, disabled, loading, error, selected, read-only | Both |
| Behaviour | Keyboard, focus management, dismissal, selection model | Both |
| Accessibility | APG pattern, labelling, live announcements | Both |
| Responsiveness | Changes per breakpoint, overflow handling, touch-target size | Both |
| Motion | Transitions, durations, reduced-motion handling | Both |
| Content | Label length, casing, truncation, i18n and RTL | Design |
| Platforms | React Native equivalent, and how it differs from web | Engineering |
| Maturity | Stable, beta, pre-1.0, preview or draft spec: how much weight the finding deserves | Both |
## Fit for Lumen (new component or update)
Answer these before recommending an API; they decide whether there's an API at all.
**Generic or feature-specific?**
- **Prior art**: how many reference systems ship it, and how mature they are.
- **Demand**: how many consumers need it (the scope spreadsheet's tabs, a
`consumer-impact` usage scan). One consumer is a signal, not proof.
- **Generic core**: which part every system shares, and which part is product
logic that stays in the app.
**Maintainable at which level?**
- **Spec maturity**: settled, or still moving (preview components, systems that
disagree, an unfinished Figma spec).
- **Cost**: what Lumen already has to build on, on both platforms.
- **Abstraction**: the smallest level that serves the demand: a hook or
primitive, a thin component, a full component, or a documented recipe built
from existing components (nothing shipped).
End each half with a one-line verdict.
## Naming (component, prop or token)
- **Term per system**: the name, plus the concept it covers. Check that the
concepts really match, not only the words.
- **Consensus vs outliers**.
- **Lumen fit**:
- conflicts with names already in `libs/`;
- the prop-naming rules in the `component-architecture` skill;
- whether the name works on both platforms.
- **Recommendation**: one name, plus the rejected alternatives and why.
## Pattern (composition, when to split, a11y, responsiveness, motion)
- **Rule**: what each system states, with the link.
- **Criteria**: what drives the decision, e.g. parts reused on their own, shared
state, how independently consumers need to style them.
- **Examples** from their catalogue.
- **Anti-patterns** they call out.
- **Lumen today**: where it already follows or breaks the pattern.
## Token
- **Tiers**: primitive, semantic, component. Which tier do consumers use?
- **Naming grammar** (e.g. `category-property-variant-state`), with real examples.
- **Scales**: the steps and their values (spacing, radius, type, motion).
- **Theming**: which modes exist (light/dark, brands) and how they switch.
- **Outputs**: CSS variables, JS, native, each mapped to `libs/design-core`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |