dark-mode-converter — скилл для Claude Code: тёмная тема
Скилл dark-mode-converter для Claude Code переводит светлую тему проекта в полноценный тёмный режим. Он разбирает цвета по смысловым ролям и добавляет переключение темы с сохранением выбора.
MIT 108 установок ★ 440 обновлён 2026-10-20
npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a claude-codeЧто делает dark-mode-converter
Скилл сначала находит цвета в проекте и предлагает заменить жёстко заданные значения смысловыми токенами. Затем он подбирает тёмную палитру по ролям: для поднятых поверхностей использует более светлые оттенки, для текста — не чисто белый, а акценты приглушает. Контраст текстовых пар проверяется по WCAG AA.
Дальше скилл настраивает тему для Tailwind или CSS-переменных и добавляет переключатель «светлая / тёмная / системная» с сохранением выбора в localStorage. Скрипт в <head> задаёт тему до первой отрисовки, а системный режим реагирует на смену настроек ОС без перезагрузки. Также разбираются изображения с белым фоном, графики, нативные поля форм и сторонние виджеты.
В конце скилл проходит ключевые маршруты в обоих режимах и формирует dark-mode-report.md с картой токенов, изменёнными файлами, таблицей контраста и пунктами для проверки дизайнером. Включите его запросом на создание тёмной темы, токенизацию цветов, проектирование палитры или аудит уже готового режима. Для проверки маршрутов нужны скриншоты либо список страниц для ручной проверки.
Какие задачи решает
- заменить жёстко заданные цвета смысловыми токенами
- спроектировать тёмную палитру с учётом уровней поверхностей
- добавить переключение темы и сохранение выбора
- найти нечитаемые элементы и светлые поверхности в готовой теме
- собрать отчёт по токенам, контрасту и изменённым файлам
Примеры запросов агенту
- Переведи этот проект на тёмную тему.
- Сначала разложи цвета проекта по смысловым токенам.
- Проведи аудит тёмного режима и создай
dark-mode-report.md.
Как установить dark-mode-converter
1Через Skills CLI (Vercel)
npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a claude-code2Вручную: положить файлы
~/.claude/skills/dark-mode-converter/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/dark-mode-converter/
1Через Skills CLI (Vercel)
npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a codex2Вручную: положить файлы
.agents/skills/dark-mode-converter/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a cursor2Вручную: положить файлы
.cursor/skills/dark-mode-converter/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install OneWave-AI/claude-skills dark-mode-converter2Вручную: положить файлы
.github/skills/dark-mode-converter/SKILL.md1Через Skills CLI (Vercel)
npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a gemini-cli2Командой платформы
gemini skills install https://github.com/OneWave-AI/claude-skills --path dark-mode-converterВручную: положить файлы
.devin/skills/dark-mode-converter/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о dark-mode-converter
Как установить dark-mode-converter в Claude Code?
Выполните npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a claude-code. Файл скилла находится по пути ~/.claude/skills/dark-mode-converter/SKILL.md.
Что делает dark-mode-converter?
Он переводит светлую тему проекта в тёмную: помогает разложить цвета по смысловым токенам, настроить палитру и добавить переключение с сохранением выбора. В конце создаёт dark-mode-report.md.
Как dark-mode-converter проверяет готовую тёмную тему?
Скилл предлагает пройти ключевые маршруты в обоих режимах и проверяет поверхности, текст, границы и акцентные кнопки. Итоговый отчёт содержит таблицу контраста и пункты, требующие внимания дизайнера.
Исходный текст
SKILL.md · MIT
--- name: dark-mode-converter description: Convert a light-only site or app to a real dark mode -- semantic token mapping, elevation-based surfaces, recalibrated shadows and imagery -- not a naive inversion. Handles Tailwind, CSS variables, and styled-components, plus the toggle, persistence, and no-flash boot. tools: Read, Glob, Grep, Write, Edit, Bash model: inherit --- # Dark Mode Converter Build dark mode the way design-mature products do: as a second theme with its own logic, not the light theme with colors flipped. Inversion fails because dark UIs work differently -- elevation is communicated by lighter surfaces instead of shadows, saturated colors vibrate on dark backgrounds, and pure black plus pure white is glare, not contrast. ## Workflow 1. **Tokenize first.** Inventory every color in the codebase. If colors are hardcoded in components, lift them into semantic tokens before converting -- `bg.base`, `surface`, `surface.raised`, `text.primary`, `text.muted`, `border`, `accent`, states. A dark mode built on raw hex replacements breaks on the next feature. (If tokens exist, audit for strays with the same sweep.) 2. **Design the dark palette** by role, following dark-UI physics: base is dark gray, never `#000` (`#0f1115`-`#1a1d23` territory, or tinted toward the brand hue); elevation gets *lighter* as surfaces rise (base -> card -> popover each a step up); text is off-white, never `#fff` (`#e8eaed`-ish, ~87% white) with muted steps; accents desaturate and lighten 1-2 steps so they do not vibrate; borders drop to low-alpha whites; shadows go darker and tighter or yield to surface-lightness entirely. Verify every text/surface pair at WCAG AA minimum. 3. **Wire the mechanism** per stack: Tailwind `dark:` with `class` strategy (v4: `@variant dark`), or a `[data-theme="dark"]` block redefining the custom properties. Add the toggle with three states (light/dark/system), `localStorage` persistence, `prefers-color-scheme` default, and the no-flash inline script in `<head>` that sets the class before first paint. 4. **Handle the hard parts** -- the places naive conversions die: images and illustrations with baked-in white backgrounds (swap variants, add a subtle surface behind them, or CSS-filter logos where acceptable); charts and data-viz palettes (need their own dark series colors); form controls and `color-scheme: dark` so native inputs, scrollbars, and autofill match; embedded third-party widgets (map themes, iframes); email templates and open-graph images that never inherit the theme; focus rings that vanish on dark. 5. **Audit pass.** Screenshot-walk the key routes in both modes (or list them for the user to check): look for stranded light surfaces, double-borders where shadows used to separate, unreadable muted text, and accent buttons that lost their punch. Output `dark-mode-report.md`: token map (light -> dark by role), files touched, contrast table, and remaining items needing design eyes. ## Rules - Semantic tokens or nothing. `dark:bg-gray-800` sprinkled across 90 components is a maintenance debt, not a theme -- centralize the mapping. - Never pure black base, never pure white text. Reserve those for moments, not defaults. - Elevation flips: light mode says "higher" with shadow, dark mode says it with a lighter surface. Convert the logic, not just the colors. - Accents recalibrate, brand does not change: adjust lightness/saturation to sit on dark, but the brand hue survives (check contrast of brand-on-dark and flag genuine conflicts for the user rather than silently shifting hue). - Both modes are first-class from now on: every report includes the rule that new components define both themes' tokens or fail review. - Test system-preference switching live -- the `system` setting must react to OS changes without reload. ## Quick Commands - "Convert this project to dark mode" -- full workflow - "Tokenize my colors first" -- step 1 standalone - "Just design the dark palette" -- step 2 from existing tokens - "Dark mode audit" -- step 5 against an existing implementation
© OneWave-AI · MIT · OneWave-AI/claude-skills