applying-themes
БесплатноЗапускает вложенные скриптыНе проверенUse when a visual artifact needs a consistent color and type system applied — slide decks, reports, HTML pages, dashboards, PDFs, docs — or when asked to…
от osmontero★ 18 звёзд на GitHubОб этом скилле
Applying Themes
Overview
A theme is a complete set of semantic tokens, not a list of nice colors. Four hex values with no defined roles produce inconsistent output, because every component has to decide for itself which one is text and which one is background.
Core principle: Every theme resolves to the same eight tokens. Components reference token names, never hex values. Swapping the theme then means swapping one block.
base surface line ink ink-2 ink-3 accent accent-ink
The Iron Law
NO THEME APPLIED WITHOUT ITS CONTRAST VERIFIED
A palette that looks good and fails 4.5:1 is unusable, and contrast is not eyeballable — mid-tone accents on mid-tone surfaces fail constantly while looking fine. Every bundled theme ships with a machine-checkable contrast block. Custom themes get the same treatment before use.
Checklist
- Present the themes — the table below, with what each is for
- Get an explicit choice — do not assume one
- Read the theme file —
themes/<name>.mdis the source of truth - Verify contrast — run the checker; for a custom theme this is mandatory
- Emit the token block — once, at the top of the artifact
- Apply by token name — no raw hex anywhere in components
- Check the render — look at the output, especially secondary text
The Themes
| Theme | Character | Base | Best for |
|---|---|---|---|
ocean-depths |
Deep maritime calm | Dark | Financial, consulting, infrastructure |
sunset-boulevard |
Golden-hour warmth | Light | Creative, launches, hospitality |
forest-canopy |
Grounded earth tones | Light | Sustainability, craft, long-form |
modern-minimalist |
Grayscale discipline | Light | Docs, portfolios, systems |
golden-hour |
Amber richness | Light | Reviews, food, retrospectives |
arctic-frost |
Cold clinical clarity | Light | Medical, analytics, compliance |
desert-rose |
Dusty sophistication | Light | Boutique, invitations, wellness |
tech-innovation |
Terminal high-contrast | Dark | Dev tools, AI, changelogs, status |
botanical-garden |
Cultivated and alive | Light | Food, agriculture, community |
midnight-galaxy |
Deep-space drama | Dark | Launches, entertainment, keynotes |
Each themes/<name>.md carries the full palette with roles, the contrast requirements, a web font pairing plus a metric-safe PDF fallback, the scale ratio, and notes on how the theme fails if misused.
theme-showcase.pdfis a legacy visual from an earlier version of this skill and its colors and fonts no longer match the theme files. The markdown files are authoritative. Do not present the PDF as an accurate preview.
Presenting and Choosing
Show the table, ask once, and wait. Do not apply a theme without an explicit choice — restyling an entire deck to the wrong palette wastes more time than the question costs.
If the user describes a need rather than naming a theme ("something serious for a board deck"), recommend two with one-line reasoning and let them pick.
Verifying Contrast
source ~/.local/opencode-venv/bin/activate # POSIX
python3 scripts/check_contrast.py themes/ocean-depths.md # one theme
python3 scripts/check_contrast.py themes/*.md # all of them
python3 scripts/check_contrast.py --pair "#8a7357" "#fbf5ea" # ad-hoc pair
Windows (no bash): & ~\.local\opencode-venv\Scripts\python.exe scripts\check_contrast.py themes\<theme>.md — pass each theme file explicitly (PowerShell does not expand themes/*.md into Python args).
Exit code is non-zero on any failure, so it works as a gate. All ten bundled themes pass all six checks.
Applying
HTML / CSS
Emit the token block once in :root, then reference tokens only.
:root {
--base: #0f1c26; --surface: #16283a; --line: #2d4859;
--ink: #eef6f8; --ink-2: #accad4; --ink-3: #8aa7b3;
--accent: #4fd1c5; --accent-ink: #04222a;
--font-display: "Young Serif", Georgia, serif;
--font-text: "IBM Plex Sans", system-ui, sans-serif;
}
body { background: var(--base); color: var(--ink); font-family: var(--font-text); }
h1, h2 { font-family: var(--font-display); }
.card { background: var(--surface); border: 1px solid var(--line); }
.meta { color: var(--ink-3); }
.btn { background: var(--accent); color: var(--accent-ink); }
No raw hex outside :root. Grep for # in your component styles before finishing — a stray hex is how themes stop being swappable.
Both Color Schemes
If the artifact must work in light and dark, pick a light theme and a dark theme and map them to the same token names:
:root { /* forest-canopy tokens */ }
@media (prefers-color-scheme: dark) { :root { /* ocean-depths tokens */ } }
:root[data-theme="dark"] { /* ocean-depths tokens */ }
:root[data-theme="light"] { /* forest-canopy tokens */ }
Both the media query and the explicit attribute — a toggle that cannot override the OS preference in both directions is broken.
Установить applying-themes в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл applying-themes?
Use when a visual artifact needs a consistent color and type system applied — slide decks, reports, HTML pages, dashboards, PDFs, docs — or when asked to "theme this", "restyle with a palette", "make these slides look consistent", "pick colors and fonts", or to build a custom theme from a brand or a description. Provides 10 contrast-verified themes with semantic tokens and a checker script.
Как установить скилл applying-themes?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл applying-themes запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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