design-system
БесплатноБез исполняемых скриптовНе проверенUse when building, refactoring, or styling any UI in the ethereum.org Next.js site (`src/components/`, `app/`, `src/styles/`, `public/content/`, or any…
от ethereum★ 6 005 звёзд на GitHubОб этом скилле
ethereum.org Design System
Tailwind v4 (CSS-first config, no tailwind.config.ts) + React 19 / 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 <Card>. If you write <p className="text-4xl font-bold">N</p> for a stat, you're reinventing <BigNumber>. If you write <div className="text-5xl font-bold">Title</div>, you're reinventing <h1> (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
- No raw
<a>or<button>. Use<Button>/<ButtonLink>from@/components/ui/buttons/ButtonandInlineLink/BaseLink/LinkWithArrowfrom@/components/ui/Link. These primitives handle event tracking, external-link safety, locale routing, and focus rings. - No raw color values. Use semantic tokens (
text-body,bg-background,border-border,text-primary). Hex literals andrgb()calls bypass dark mode. - Prefer adding a variant to an existing primitive over creating a new component. Card, Button, Alert, Tag are the most common targets.
- Server Components by default. Only
"use client"when you need state, effects, browser APIs, or inline event handlers. - All text is translatable.
getTranslationsfromnext-intl/server(server) oruseTranslationsfromnext-intl(client). One namespace-boundtper namespace -- bind a second function (e.g.const tCommon = useTranslations("common")) to access another namespace. Never hard-code user-facing English. In Route Handlers and Server Actions, pass the locale explicitly (getTranslations({ locale, namespace })) --next/root-paramsdoesn't reach them yet. Everywhere else it resolves on its own -- seereferences/i18n-rtl.md. - Logical CSS for direction. Use
ms-/me-/ps-/pe-/inset-s-/inset-e-/border-s/border-e/text-start/text-end. The site supports Arabic and Urdu (RTL). Hard-codedleft-/right-/ml-/mr-/pl-/pr-breaks RTL. - Locale-aware formatters.
numberFormat()from@/lib/utils/numbers,formatDateTime()/formatDate()from@/lib/utils/date(UTC + hydration-safe). NevertoLocaleString/Intl.NumberFormatdirectly. useRtlFlip()for directional icons (right-pointing arrows/chevrons). Or useChevronNext/ChevronPrevfrom@/components/Chevron.- Markdown content goes through
MdComponents. The<Card>markdown shortcode is backed by@/components/MarkdownCard(a thin wrapper around theui/cardprimitives with an MDX-friendly prop shape). For app code, compose the primitives directly from@/components/ui/card. - Storybook stories ship with new UI components. No automated unit tests; Storybook + Chromatic + types are the verification layer.
- Don't add new layouts. There are six canonical layouts (
TopicLayout,StaticLayout,DocsLayout,TutorialLayout,ContentLayout,BaseLayout). New sectioned content goes insrc/data/topics/<key>.tsas aTopicLayoutconfig -- not a new layout component. Seereferences/layouts.md.
Highest-Value Gotchas (index)
Landmines where the code looks reasonable but the pattern is wrong. One line each; the canonical write-ups live in the named reference.
- Look-alike imports -- Tooltip (
@/components/Tooltip, notui/tooltip), Modal (ui/dialog-modalvsui/dialog; don't mix sources within a feature), Card (ui/cardfor app code, notMarkdownCard), Heroes (named exports of@/components/Hero;titleis always the<h1>, noheaderprop). Decision trees:references/canonical-imports.md. - Stale shadcn token names (
bg-popover,bg-muted,text-muted-foreground, ...) linger in a fewui/files but don't resolve in this project's tokens. Don't add new uses. List:references/tokens.md; replacements:references/cleanup-playbook.md. useColorModeValueis a deprecated Chakra leftover -- usedark:+ semantic tokens.Cardis variant-driven, notclassName-driven. Padding/spacing/background/radius/text color go throughvariant/size; a
Установить design-system в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл design-system?
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.
Как установить скилл design-system?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл design-system запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic