sodium
БесплатноЗапускает вложенные скриптыНе проверенSodium design system rules for this project's UI. Use when building or changing any screen, component, form or style, when porting an existing screen onto…
от arla6ka★ 650 звёзд на GitHubОб этом скилле
Sodium
Sodium is compact and ruled, for infrastructure and data tools: white and warm near-black grounds, 1px rules for structure, mono capitals for every interface word, Inter Display for headlines and prose, zero radius, and one sodium yellow for the thing to act on. Build with its recipes and components before writing markup.
Setup
Once, in the root layout: put the "sodium" class on <body> or the root element of the UI, with SodiumPortalProvider inside it. Sodium's styles and tokens apply only inside that class.
Menus, dialogs, popovers and toasts render at the end of the body; SodiumPortalProvider keeps them inside the scope, and without it they lose every token. import {SodiumPortalProvider} from '@/lib/sodium/portal'
<body className="sodium"><SodiumPortalProvider>{children}</SodiumPortalProvider></body>
Steps
- For a whole screen, start from a block under Blocks when one fits: install it, then swap its sample data and copy for the real ones.
- Pick the components the screen needs from the index below. Fetch each one's page before using it: it has the props, variants and that component's rules.
- Build only from those components and the tokens under Tokens, inside an element with the "sodium" class. Import each from the path in the index; support pieces are under Imports. Dark mode: put data-theme="dark" on the sodium element or any ancestor, such as . The theme does not follow the system setting (prefers-color-scheme) on its own.
- Frame the screen with the Page shell. If a token or component is missing, stop and say so. Do not invent one.
- Ask the person only when the screen needs a fact you were not given, such as a region or a limit; decide everything else from these rules and say what you chose.
- Porting an existing screen: swap one piece at a time for its component, keep the behavior and copy, and delete the old styles once nothing uses them. For a whole app, run migrate-design-system when it is installed.
- Lint: install it once with
npx shadcn@latest add https://design.how/r/sodium/lint.json, then runnpx eslint -c sodium.eslint.config.mjs .. Each message names the fix. - Review before you finish: run the lint and fix every error, then render the screen at 390 and 1280 wide, check it against the global rules and the anti-slop list, fix the worst defect, and check again. Done when no MUST or NEVER is broken and no raw color, size or font is left. Run ui-review when it is installed.
Priority order
When rules conflict, the earlier item wins.
- Accessibility and keyboard behaviour
- Tokens by role, never raw values
- Existing components and recipes, never rebuilt
- The signatures: mono capitals through the label roles, rules as structure, the one yellow action, square corners
- Compact spacing and type
Global rules
- sodium-components-first MUST Use a Sodium component or recipe before writing markup; fetch its page before you build. Because each one already carries the focus ring, the states and the yellow rules a hand-built copy forgets.
- Correct:
import {Button} from '@/components/sodium/ui/button'
- Correct:
- sodium-scope MUST Wrap Sodium UI in className="sodium" with SodiumPortalProvider inside it, so overlays keep the tokens. Because a menu or dialog renders at the end of the body, outside the scope, and would lose every colour.
- Correct:
<div className="sodium"><SodiumPortalProvider>{children}</SodiumPortalProvider></div>
- Correct:
- sodium-tokens-only MUST Use only the roles Sodium defines, such as text-text-2, bg-panel and border-line; never a hex, an arbitrary px or a dark: variant. Because the dark theme swaps the roles, and a raw value stays behind.
- Correct:
<p className="text-text-2"> - Wrong:
<p className="text-[#55524a]">
- Correct:
- sodium-one-primary MUST Lead a frame, footer, dialog or any group of actions with at most one primary Button (the yellow slab, or the destructive); every other action beside it is variant="secondary" or "ghost". Because the slab is how a person finds the next action, and two of them side by side split the eye.
- Correct:
<Button variant="secondary">Keep</Button><Button>Run</Button> - Wrong:
<Button>Keep</Button><Button>Run</Button>
- Correct:
- sodium-yellow-on-light NEVER Set text, an icon or a lone line in solid yellow; yellow-family text is text-accent-text. Because sodium yellow on white is 1.4:1, and light is the default theme.
- Correct:
<span className="text-accent-text">Running</span> - Wrong:
<span className="text-accent-fill">Running</span>
- Correct:
- sodium-caps-through-roles MUST Set every interface word (button, tab, tag, table head, axis) in a label role, and every sentence in the sans. Because the role carries the mono face, the capitals and the tracking together, and a sentence in capitals reads slowly.
- Correct:
<span className="type-label-sm">Queued</span> - Wrong:
<span className="uppercase">Queued</span>
- Correct:
- sodium-rules-not-boxes MUST Box a region once with frame and divide
Установить sodium в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sodium?
Sodium design system rules for this project's UI. Use when building or changing any screen, component, form or style, when porting an existing screen onto Sodium, or when checking UI against Sodium.
Как установить скилл sodium?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sodium запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies 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…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic