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 |
assets/report-template.html
View on GitHub<title>{{Subject}} discovery</title>
<!--
ds-discovery report template. Fill every {{placeholder}}, repeat the marked
blocks, then delete these comments and any unused example rows.
Artifact: publish as-is (the publisher adds <html>/<head>/<body>).
Local file: wrap in <!doctype html><html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"></head><body>…</body></html>.
-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap">
<style>
/* Layout: one reading column; the comparison table and code scroll inside their own wrappers. */
/* Palette: Lumen's Ledger Live greys and purple accent (libs/design-core). */
:root {
--bg: #ffffff;
--surface: #f7f7f7;
--muted: #f1f1f1;
--line: #e8e8e8;
--fg: #000000;
--fg-muted: #6a6a6a;
--accent: #d4a0ff;
--on-accent: #000000;
--link: #7e4ea5;
--ok: #1f7a4d;
--ok-bg: #e3f4ea;
--warn: #8a5a00;
--warn-bg: #fbf0d9;
--font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
--mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #000000; --surface: #151515; --muted: #1f1f1f; --line: #3c3c3c;
--fg: #ffffff; --fg-muted: #9c9c9c; --link: #d4a0ff;
--ok: #6fd39b; --ok-bg: #12301f; --warn: #f0c46b; --warn-bg: #33270f;
color-scheme: dark;
}
}
:root[data-theme="dark"] {
--bg: #000000; --surface: #151515; --muted: #1f1f1f; --line: #3c3c3c;
--fg: #ffffff; --fg-muted: #9c9c9c; --link: #d4a0ff;
--ok: #6fd39b; --ok-bg: #12301f; --warn: #f0c46b; --warn-bg: #33270f;
color-scheme: dark;
}
* { box-sizing: border-box; }
body {
margin: 0; padding-inline: 16px; padding-block: 40px 64px;
background: var(--bg); color: var(--fg);
font: 400 15px/1.6 var(--font);
}
main { max-width: 1040px; margin-inline: auto; display: grid; gap: 48px; }
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 16px; }
h3 { font-size: 1rem; font-weight: 600; }
p, li { max-width: 68ch; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
code, pre { font-family: var(--mono); font-size: 0.875em; }
code { background: var(--muted); padding: 1px 5px; border-radius: 4px; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 0; }
pre code { background: none; padding: 0; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
header { display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.chip { font-size: 0.8rem; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--muted); }
.chip.key { background: var(--accent); color: var(--on-accent); }
.meta { color: var(--fg-muted); font-size: 0.875rem; }
.tldr { background: var(--surface); border-radius: 12px; padding: 20px 24px; display: grid; gap: 10px; }
.tldr li { font-weight: 500; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 0.875rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface); font-weight: 600; font-size: 0.8rem; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { position: sticky; left: 0; background: var(--bg); font-weight: 600; white-space: nowrap; }
td a.src { font-size: 0.75rem; white-space: nowrap; }
tr.ref th, tr.ref td { background: var(--surface); }
.cov { display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 7px; border-radius: 4px; margin-bottom: 4px; }
.cov.yes { background: var(--ok-bg); color: var(--ok); }
.cov.partial { background: var(--warn-bg); color: var(--warn); }
.cov.no { background: var(--muted); color: var(--fg-muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card .meta { font-size: 0.8rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.split > section { display: grid; gap: 12px; align-content: start; min-width: 0; }
.split h3 { color: var(--fg-muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.flag { border-left: 3px solid var(--warn); padding-left: 12px; color: var(--fg); }
.sources li { font-size: 0.875rem; overflow-wrap: anywhere; }
footer { color: var(--fg-muted); font-size: 0.8rem; border-top: 1px solid var(--line); padding-top: 16px; }
/* Expandable comparison rows */
.table-tools { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.table-tools h2 { margin: 0; }
.btn { font: inherit; font-size: 0.8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.toggle::before { content: '▸'; color: var(--fg-muted); transition: transform 0.15s; }
.toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { .toggle::before { transition: none; } }
tr.detail > td { background: var(--surface); padding: 16px; }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; max-width: 960px; }
@media (max-width: 720px) { .detail-body { grid-template-columns: minmax(0, 1fr); } }
.shot { margin: 0; display: grid; gap: 6px; }
.shot img { width: 100%; max-height: 220px; object-fit: contain; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.shot figcaption { font-size: 0.75rem; color: var(--fg-muted); }
.no-shot { font-size: 0.8rem; color: var(--fg-muted); border: 1px dashed var(--line); border-radius: 8px; padding: 16px; text-align: center; }
</style>
<!-- REPORT CONTENT START: replace everything down to the END marker -->
<main>
<header>
<span class="eyebrow">Lumen · Design-system discovery</span>
<h1>{{The question, as asked, e.g. "How should Lumen's Tabs be named, built and navigated by keyboard?"}}</h1>
<ul class="chips" aria-label="Scope">
<li class="chip key">{{New component | Naming | Pattern | Token}}</li>
<li class="chip">{{Web}}</li>
<li class="chip">{{React Native}}</li>
</ul>
<p class="meta">{{YYYY-MM-DD}} · Consulted: Coinbase CDS, Adobe Spectrum, Astryx, Material (M3 + MUI), Primer, MetaMask DS, Base UI, WAI-ARIA APG</p>
</header>
<section aria-labelledby="tldr">
<h2 id="tldr">TL;DR</h2>
<div class="tldr">
<ul>
<!-- 3–5 bullets: the answer first, then the strongest consensus and the main divergence. -->
<li>{{Recommendation in one sentence}}</li>
<li>{{Consensus point}}</li>
<li>{{Divergence worth a decision}}</li>
</ul>
</div>
</section>
<!-- New component or update only; delete this section for naming, pattern and token questions. -->
<section aria-labelledby="fit">
<h2 id="fit">Does it belong in Lumen?</h2>
<div class="split">
<section>
<h3>Generic or feature-specific?</h3>
<ul>
<li><strong>Prior art</strong>: {{how many systems ship it, and how mature}}</li>
<li><strong>Demand</strong>: {{consumers or spreadsheet tabs that need it}}</li>
<li><strong>Generic core</strong>: {{what's generic vs product logic that stays in the app}}</li>
</ul>
<p class="flag">{{Verdict in one line}}</p>
</section>
<section>
<h3>Maintainable at which level?</h3>
<ul>
<li><strong>Spec maturity</strong>: {{settled, or still moving}}</li>
<li><strong>Cost</strong>: {{what Lumen already has to build on}}</li>
<li><strong>Abstraction</strong>: {{hook or primitive / thin component / full component / documented recipe, and why}}</li>
</ul>
<p class="flag">{{Verdict in one line}}</p>
</section>
</div>
</section>
<section aria-labelledby="compare">
<div class="table-tools">
<h2 id="compare">Comparison</h2>
<button type="button" class="btn" id="expand-all" aria-pressed="false">Expand all</button>
</div>
<!-- With more than 4 dimensions, widen the table (e.g. style="min-width: 1040px"); it scrolls inside its wrapper. -->
<div class="table-wrap">
<table>
<thead>
<tr>
<th scope="col">System</th>
<!-- One column per dimension from references/dimensions.md (4–7 columns).
Component questions start with API shape (compound, constrained, slots…). -->
<th scope="col">{{Dimension}}</th>
<th scope="col">{{Dimension}}</th>
<th scope="col">{{Dimension}}</th>
</tr>
</thead>
<tbody>
<!-- Repeat this pair per system. The first row is the one-line summary; the detail row
(same id as aria-controls, colspan = column count) holds the screenshot and copy/avoid notes. -->
<tr>
<th scope="row"><button type="button" class="toggle" aria-expanded="false" aria-controls="d-{{system-id}}">{{System}}</button></th>
<td><span class="cov yes">Yes</span><br>{{Their name, version, maturity}} <a class="src" href="{{url}}">source</a></td>
<td>{{One-line finding}} <a class="src" href="{{url}}">source</a></td>
<td><span class="cov no">Not covered</span></td>
</tr>
<tr class="detail" id="d-{{system-id}}" hidden>
<td colspan="4"><div class="detail-body">
<!-- Screenshot from scripts/capture-demo.mjs, inlined by its `inline` command; or the no-shot line. -->
<figure class="shot"><img src="{{shot:system-id}}" alt="{{What the demo shows}}"><figcaption>Live demo on <a href="{{demo url}}">{{site}}</a>, captured {{YYYY-MM-DD}}</figcaption></figure>
<!-- <p class="no-shot">No component to show</p> -->
<ul>
<li>{{Copy: …, and why}}</li>
<li>{{Avoid: …, and why}}</li>
</ul>
</div></td>
</tr>
<!-- APG gets its own shaded row and doesn't count towards consensus. -->
<tr class="ref">
<th scope="row">WAI-ARIA APG</th>
<td colspan="3">{{Pattern name, roles and keyboard model}} <a class="src" href="{{url}}">source</a></td>
</tr>
<!-- Lumen's current state closes the table. -->
<tr>
<th scope="row">Lumen today</th>
<td>{{What exists, or "—"}}</td>
<td>{{…}}</td>
<td>{{…}}</td>
</tr>
</tbody>
</table>
</div>
<p class="meta">Expand a system for its live-demo screenshot and what Lumen should copy or avoid.</p>
</section>
<section aria-labelledby="lumen">
<h2 id="lumen">Lumen today</h2>
<!-- Existing components, props and tokens, with paths, plus the conventions that constrain the answer. -->
<p>{{Current state, e.g. "No Tabs on web; SegmentedControl in libs/ui-react covers 2–4 options."}}</p>
</section>
<section aria-labelledby="reco">
<h2 id="reco">Recommendation</h2>
<div class="split">
<section>
<h3>Design</h3>
<ul>
<li>{{When to use, anatomy, states, behaviour, content}}</li>
</ul>
</section>
<section>
<h3>Engineering</h3>
<ul>
<li>{{API, composition, web/RN parity, a11y implementation}}</li>
</ul>
<pre><code>{{API sketch following component-architecture}}</code></pre>
</section>
</div>
<!-- Only when a recommendation contradicts an existing Lumen choice. -->
<p class="flag">{{Contradicts current Lumen behaviour: what, and why change}}</p>
</section>
<section aria-labelledby="questions">
<h2 id="questions">Open questions</h2>
<div class="split">
<section>
<h3>Design</h3>
<ul><li>{{Question}}</li></ul>
</section>
<section>
<h3>Engineering</h3>
<ul><li>{{Question}}</li></ul>
</section>
</div>
</section>
<section aria-labelledby="sources">
<h2 id="sources">Sources</h2>
<ol class="sources">
<!-- Every URL cited above, with the date it was read. -->
<li><a href="{{url}}">{{System — page title}}</a>, read {{YYYY-MM-DD}}</li>
</ol>
</section>
<footer>Generated with the Lumen <code>ds-discovery</code> skill. Findings summarize each system's public docs and source; follow the links for the originals.</footer>
</main>
<!-- REPORT CONTENT END -->
<script>
// Expand/collapse comparison rows; toggles visibility through `hidden`.
(() => {
const toggles = [...document.querySelectorAll('.toggle')];
const setOpen = (btn, open) => {
btn.setAttribute('aria-expanded', String(open));
const row = document.getElementById(btn.getAttribute('aria-controls'));
if (row) row.hidden = !open;
};
toggles.forEach((btn) => btn.addEventListener('click', () => setOpen(btn, btn.getAttribute('aria-expanded') !== 'true')));
const all = document.getElementById('expand-all');
if (!all) return;
all.addEventListener('click', () => {
const open = all.getAttribute('aria-pressed') !== 'true';
toggles.forEach((btn) => setOpen(btn, open));
all.setAttribute('aria-pressed', String(open));
all.textContent = open ? 'Collapse all' : 'Expand all';
});
})();
</script>
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 |