In the Skill's Own Terms
The design-system skill is the shared brand owner for the markdown-html plugin. It captures brand identity once through a 10-question onboarding wizard — primary and accent HEX values, heading and body Google Fonts, a design style (editorial, technical, minimal or playful), default output directory, code theme, TOC behavior and an optional company name and logo — then validates body-text and link contrast against WCAG 2.2 AA and derives 12 CSS custom properties in HSL space.
Three stdlib-only Python tools handle onboarding, config loading and palette validation; precedence is project over global over built-in defaults. Every converter (md-document, md-review, md-slides) reads the saved config, so changing a token changes every rendered document.
What it produces
- A config file holding the brand and the derived palette, written either globally or into the project.
- Twelve CSS custom properties inlined into each converter's style block, such as --md-surface, --md-border, --md-link and --md-warn.
- A JSON schema for the config, shipped as an asset for validation.
How It Works
- 01Run Onboarding Once
The skill is the shared brand owner for the markdown-html plugin: md-document, md-review and md-slides all consume the config it writes, so a single run brands every conversion.
- 02Answer the Ten Questions
The wizard records default_output_dir, primary and accent HEX, heading and body fonts, design_style, code_theme, toc.behavior and optional company_name and logo_url.
- 03Let Validation Gate the Save
brand_palette_validator.validate() runs after every change, so the pair is re-checked on each field edit rather than only at the end of the wizard.
- 04Derive the Twelve Tokens
derive_palette() computes tokens such as --md-surface at bg plus or minus 4-6% luminance and --md-text-muted as rgba(text, 0.68), and stores them under derived_palette in the same config file.
- 05Resolve Config by Precedence
config_loader.py is the importable loader every converter calls before rendering; it merges project, then global, then built-in defaults, and honours the bypass env.
- 06Override or Reset non-interactively
Beyond the wizard, onboard.py takes --defaults, --set key=value, --scope project, --show and --reset, so brand fields can be changed or wiped without walking the questions again.