design-system
БесплатноЗапускает вложенные скриптыНе проверенDesign tokens, light/dark theming, and WCAG contrast validation for HTML documents and decks, compiled into one inlinable CSS bundle. Use when theming a…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
Document Design System
The visual layer for HTML documents and slide decks: a token file in, a single self-contained CSS bundle out, with every color pairing checked against WCAG before it ships. This is the theming layer for documents — type scales, reading measure, print roles, light/dark surfaces. It is not a product UI component library; there are no buttons, form states, or component variants here.
When to use this skill
- Theming a report or whitepaper that must render as one self-contained HTML file
- Building a deck theme where type must stay legible at projection distance
- Auditing an existing palette before a public or regulated publication
- Diagnosing dark-mode drift — text that reads fine in light mode and fails in dark
- Standardizing across documents so a series of reports looks like one series
- Answering "does this pass AA?" with a number instead of an opinion
Inputs the skill expects
- A design-token JSON file (or the intent to generate one from
assets/sample_tokens.json) - Brand colors, if any exist — a hex value and where it came from
- Typeface choices plus their fallback stacks (self-contained HTML cannot fetch web fonts)
- The conformance target: AA (default) or AAA
- Which artifacts consume the theme: document, deck, or both
- Whether the output will be printed or exported to PDF
Clarify First
Before generating a theme, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Conformance target (AA vs AAA): why it changes the output: AAA at 7:1 rules out most saturated mid-tones, so the accent and warning colors must be picked differently from the start.
- Print / PDF export required: why it changes the output: print needs a forced light role set and page-break rules; retrofitting them means re-deriving every dark value.
- Document or deck: why it changes the output: the type ratio differs (1.25 vs 1.333) and decks need larger minimum sizes for projection.
- Existing brand colors: why it changes the output: a fixed brand hex constrains the accent ramp and may force the underline-links decision.
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Workflows
Workflow 1 — Generate a themed CSS bundle from tokens
- Copy
assets/sample_tokens.jsonand edit the palette, roles, and scales. - Lint the token file first — a malformed ramp produces a valid-looking bundle with inverted colors.
- Compile the bundle and inline the result into the target HTML document.
python3 markdown-html/design-system/scripts/token_linter.py \
--input markdown-html/design-system/assets/sample_tokens.json --format text
python3 markdown-html/design-system/scripts/theme_builder.py \
--input markdown-html/design-system/assets/sample_tokens.json \
--out build/theme.css --format text
Workflow 2 — Gate a palette on WCAG contrast
- Declare every real foreground/background combination in the
pairingsblock, each with its usage class. - Run the AA gate; it exits non-zero on any failure, so it drops into CI directly.
- Run
--all-pairsto find combinations nobody declared but a stylesheet will eventually produce, and--level AAA --no-gateas an aspirational report.
python3 markdown-html/design-system/scripts/contrast_validator.py \
--input markdown-html/design-system/assets/sample_tokens.json \
--level AA --format text
python3 markdown-html/design-system/scripts/contrast_validator.py \
--input markdown-html/design-system/assets/sample_tokens.json \
--level AAA --no-gate --format json
Workflow 3 — Audit and repair an inherited theme
- Run the linter to surface structural rot: non-monotonic ramps, roles present in one mode only, literal hex values that will not respond to theming.
- Run the validator with
--all-pairsto get the full contrast matrix. - Fix in this order — ramp order first, then mode parity, then contrast. Ramp and parity errors invalidate the contrast numbers, so fixing contrast first wastes the work.
assets/sample_tokens_legacy.json is a deliberately damaged theme carrying all
four failure classes, so this workflow demonstrates real repair rather than a
clean run. Expect findings from both commands: the linter reports 4 errors and
5 warnings and exits 2; the validator is pinned to report-only with
--no-gate and finds 13 failing pairings.
python3 markdown-html/design-system/scripts/token_linter.py \
--input markdown-html/design-system/assets/sample_tokens_legacy.json \
--max-severity warning --format json
python3 markdown-html/design-system/scripts/contrast_validator.py \
--input markdown-html/design-system/assets/sample_tokens_legacy.json \
--all-pairs --no-gate --format text
Установить design-system в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл design-system?
Design tokens, light/dark theming, and WCAG contrast validation for HTML documents and decks, compiled into one inlinable CSS bundle. Use when theming a report or deck, auditing contrast, or fixing dark-mode color drift.
Как установить скилл design-system?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл design-system запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic