From eb84d8ede8417bb15cbf3aefea4f329218b6a857 Mon Sep 17 00:00:00 2001 From: myelinated-wackerow <263208946+myelinated-wackerow@users.noreply.github.com> Date: Mon, 4 May 2026 13:56:46 -0700 Subject: [PATCH 1/7] feat(skills): add design-system skill Establishes .claude/skills/design-system/ as the canonical knowledge base for UI work in this repo. Provides component choices, design tokens, RTL/i18n rules, server/client guidance, accessibility, and the "use a variant, not a new component" pattern. Designed for agent context but useful as developer reference. Skill structure follows the agentskills.io specification: SKILL.md entry point plus references/ for progressive disclosure. Total ~3000 lines across 14 files. Co-Authored-By: Claude Opus 4.7 Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com> --- .claude/skills/design-system/SKILL.md | 126 ++++ .../skills/design-system/references/a11y.md | 104 ++++ .../references/canonical-imports.md | 318 ++++++++++ .../references/card-walkthrough.md | 123 ++++ .../references/cleanup-playbook.md | 304 +++++++++ .../design-system/references/components.md | 579 ++++++++++++++++++ .../design-system/references/gotchas.md | 179 ++++++ .../design-system/references/i18n-rtl.md | 229 +++++++ .../references/new-component-checklist.md | 226 +++++++ .../references/page-hero-walkthrough.md | 124 ++++ .../references/server-vs-client.md | 102 +++ .../references/spacing-typography.md | 170 +++++ .../skills/design-system/references/tokens.md | 241 ++++++++ .../references/variant-vs-new.md | 181 ++++++ 14 files changed, 3006 insertions(+) create mode 100644 .claude/skills/design-system/SKILL.md create mode 100644 .claude/skills/design-system/references/a11y.md create mode 100644 .claude/skills/design-system/references/canonical-imports.md create mode 100644 .claude/skills/design-system/references/card-walkthrough.md create mode 100644 .claude/skills/design-system/references/cleanup-playbook.md create mode 100644 .claude/skills/design-system/references/components.md create mode 100644 .claude/skills/design-system/references/gotchas.md create mode 100644 .claude/skills/design-system/references/i18n-rtl.md create mode 100644 .claude/skills/design-system/references/new-component-checklist.md create mode 100644 .claude/skills/design-system/references/page-hero-walkthrough.md create mode 100644 .claude/skills/design-system/references/server-vs-client.md create mode 100644 .claude/skills/design-system/references/spacing-typography.md create mode 100644 .claude/skills/design-system/references/tokens.md create mode 100644 .claude/skills/design-system/references/variant-vs-new.md diff --git a/.claude/skills/design-system/SKILL.md b/.claude/skills/design-system/SKILL.md new file mode 100644 index 00000000000..2e523b7de19 --- /dev/null +++ b/.claude/skills/design-system/SKILL.md @@ -0,0 +1,126 @@ +--- +name: design-system +description: Use when building, refactoring, or styling any UI in the ethereum.org Next.js site (`src/components/`, `app/`, `src/styles/`, `public/content/`, or any `.tsx`/`.mdx`/`.css` change that affects the rendered UI). Provides canonical component choices, design tokens, RTL/i18n rules, server/client guidance, and the "use a variant, not a new component" pattern for the project's Tailwind v4 + Radix + shadcn-style design system. +--- + +# ethereum.org Design System + +Tailwind v4 (CSS-first config, no `tailwind.config.ts`) + React 18 / Next.js App Router + Radix UI primitives + shadcn-style component layer. Tokens live in CSS. Read this file fully on activation; pull from `references/` only when the listed trigger applies. + +## The Core Habit: Reuse Over Reinvent + +The single highest-leverage habit for keeping this codebase consistent: **when you need new UI, look for a primitive or variant first, only invent if nothing fits.** Most "new component" instincts are actually "new variant" instincts in disguise. + +Before you write any UI code, ask: +- Is there a primitive that already does this? (`Card`, `Button`, `Alert`, `Tag`, `Hero/*`) +- Is the difference small enough to express as a *variant* on an existing primitive? +- Can I compose existing primitives instead of inlining a long Tailwind class chain? + +If you find yourself writing `flex items-center gap-X rounded-Y border bg-... p-Z` for a card-like thing, you're reinventing ``. If you write `

N

` for a stat, you're reinventing ``. If you write `
Title
`, you're reinventing `

` (which is already styled by `base.css`). **Compose, don't inline.** + +When the existing primitive doesn't quite fit, the answer is usually "add a variant," not "create a new file." See `references/variant-vs-new.md`. + +## Top Rules + +1. **No raw `` or ` + +``` + +Without it, screen readers announce nothing meaningful for the button. + +### `