From Design System
Transforms light-only designs into a proper dark mode with CSS variables, theme tokens, and a toggle switch. Provides a step-by-step checklist covering colors, shadows, gradients, images, states, system preference, and accessibility.
How this skill is triggered — by the user, by Claude, or both
Slash command
/design-system:dark-mode-addWhen to use
Уже есть готовый дизайн в light, нужна dark-версия.
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Не «инверт всех цветов». Хороший dark mode — это **отдельная тема** с продуманными токенами.
Не «инверт всех цветов». Хороший dark mode — это отдельная тема с продуманными токенами.
Если в коде color: #111 или background: #fff — переделай на CSS-переменные:
:root {
--bg: #FAF9F6;
--fg: #111;
--muted: #6B6B6B;
--rule: rgba(0,0,0,.08);
}
[data-theme="dark"] {
--bg: #0d0d0d;
--fg: #e8e6e1;
--muted: #888;
--rule: rgba(255,255,255,.1);
}
--bg в dark — не #000, а #0d0d0d / #111 / #161616. Чистый чёрный выглядит как «выключенный экран».--fg в dark — не #fff, а #e8e6e1 / #f5f5f3. Чистый белый режет глаза.Тени в dark почти не видно. Замени их на тонкие светлые бордеры:
.card { box-shadow: var(--shadow-md); }
[data-theme="dark"] .card {
box-shadow: none;
border: 1px solid var(--rule);
}
Розово-фиолетовый градиент в light часто выглядит свежо. В dark — кислотно. Ослабь intensity:
[data-theme="dark"] .hero-gradient {
filter: saturate(0.7) brightness(0.9);
}
currentColor.currentColor или две версии.Добавь лёгкий outline вокруг картинок, чтобы они не «висели в пустоте»:
[data-theme="dark"] img {
border: 1px solid var(--rule);
border-radius: 8px;
}
(Только не для иконок, очевидно.)
Hover/active в dark должны светлеть, а не темнеть. В light — наоборот.
button { background: var(--primary); }
button:hover { background: oklch(from var(--primary) calc(l - 0.05) c h); }
[data-theme="dark"] button:hover {
background: oklch(from var(--primary) calc(l + 0.05) c h);
}
Минимальный, без анимаций-аттракционов:
<button id="theme-toggle" aria-label="Toggle theme">🌓</button>
<script>
const root = document.documentElement;
const stored = localStorage.getItem('theme');
const sysDark = matchMedia('(prefers-color-scheme: dark)').matches;
root.dataset.theme = stored || (sysDark ? 'dark' : 'light');
document.getElementById('theme-toggle').onclick = () => {
const next = root.dataset.theme === 'dark' ? 'light' : 'dark';
root.dataset.theme = next;
localStorage.setItem('theme', next);
};
</script>
prefers-color-schemeУважай системный preference:
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) {
--bg: #0d0d0d;
--fg: #e8e6e1;
/* ... */
}
}
После переключения проверь a11y-audit — некоторые сочетания могут не пройти WCAG, нужно подкрутить.
filter: invert(1) на body. Ломает картинки и оттенки.Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Reference for writing and editing skills with predictable behavior, covering invocation models, description writing, and information hierarchy.
npx claudepluginhub jhamidun/claude-code-config-pack --plugin design-system