mirror of
https://github.com/alirezarezvani/claude-skills.git
synced 2026-12-02 23:37:17 +00:00
Operationalizes Shihipar's "Claude Code HTML output" essay (Medium, 2026): markdown collapses past ~100 lines for agent-generated artifacts; HTML restores density, clarity, shareability, and lightweight interaction. This foundation PR ships 2 of 5 planned skills: - markdown-html-orchestrator (context: fork): deterministic doctype classifier scoring filename hints + content signals across DOCUMENT / REVIEW / SLIDES; silent-routes above two-signal threshold; refuses inputs < 100 lines per Shihipar; refuses without design-system onboarding. 3 stdlib tools: doctype_classifier.py, route_explainer.py (the never-silently-chain enforcer + onboarding gate), and output_path_resolver.py (kebab slug + collision suffix). - design-system: one-time onboarding wizard (10 questions for brand primary/accent HEX + heading + body Google Fonts + editorial/technical/ minimal/playful style + default output dir + syntax theme + TOC behavior + optional logo/company). WCAG-AA-validated 12 CSS custom properties derived in HSL space; refuses to save if body-text or link contrast fails 4.5:1, or if the output dir is unwritable. Pattern lifted from research-ops/skills/clinical-research/scripts/ (onboard.py + config_loader.py shape) and marketing/landing/scripts/ (brand_palette_validator.py WCAG + HSL math). Precedence: project > global > defaults; MARKDOWN_HTML_NO_CONFIG=1 bypasses. Plus cs-markdown-html-orchestrator agent, 3 slash commands (/cs:markdown-html router, /cs:grill-markdown-html 5-question grill, /cs:design-system onboarding surface), 6 reference docs each citing 5-7 authoritative sources (Tufte, Shihipar, Bret Victor, Maggie Appleton, Bartosz Ciechanowski, Amelia Wattenberger; WCAG 2.2, Ellen Lupton, Adobe Spectrum, Sara Soueidan, Material Design 3), 1 JSON schema asset, domain README + CLAUDE.md. Converter sub-skills (md-document, md-review, md-slides) land in v2.10.1 follow-up PRs. All three will import design-system/scripts/config_loader.py for shared brand tokens. Repo-level updates: scripts/sync-codex-skills.py SKILL_DOMAINS adds markdown-html → documentation category; .claude-plugin/marketplace.json adds markdown-html-skills plugin entry (63 → 64 plugins, 16 → 17 domains); root CLAUDE.md gets nav-map row, structure-tree entry, and v2.10.0 release-notes block. Validation: - check_plugin_json.py → OK - sync-codex-skills.py --dry-run → 2 new symlinks, total 338 → 340 - skill_description_validator.py → PASS on both SKILL.md files - skill_review_checklist_runner.py → 5/6 PASS (under-100-lines advisory fires; same as research-ops orchestrator) - All 6 Python tools smoke-tested with --help and --sample - End-to-end onboarding round-trip works (--defaults, --set, --reset) - WCAG-fail hard refusal fires correctly on impossible color combos - Classifier on the repo's own CLAUDE.md correctly returns needs-clarification (15 vs 13 — document signals tie with slides signals because of multiple --- HRs); orchestrator asks rather than silently chains. Distinct from Anthropic's official Playground plugin (interactive prompt-tuning controls with sliders/knobs/prompt-copy-back) and from marketing/landing/ (landing-page generator from scratch). https://claude.ai/code/session_01BK2KoQot1U7J5oSosrCQdc
79 lines
4.6 KiB
JSON
79 lines
4.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://github.com/alirezarezvani/claude-skills/blob/main/markdown-html/skills/design-system/assets/design_system_schema.json",
|
|
"title": "markdown-html design-system customization config",
|
|
"description": "JSON schema for the design-system config written by onboard.py and consumed by every markdown-html converter via config_loader.py. Lives at ~/.config/markdown-html/design-system.json (global) or ./.markdown-html/design-system.json (project).",
|
|
"type": "object",
|
|
"required": ["version", "skill", "default_output_dir", "brand", "typography", "design_style", "code_theme", "toc"],
|
|
"properties": {
|
|
"version": {"type": "integer", "const": 1, "description": "Schema version. Bump on breaking changes to the layout."},
|
|
"skill": {"type": "string", "const": "design-system"},
|
|
"default_output_dir": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Where converters save generated HTML by default. Must be a writable path. The orchestrator's output_path_resolver.py also accepts a --out override per conversion."
|
|
},
|
|
"brand": {
|
|
"type": "object",
|
|
"required": ["primary"],
|
|
"properties": {
|
|
"primary": {"type": "string", "pattern": "^#?[0-9a-fA-F]{6}$", "description": "Primary brand color, HEX."},
|
|
"accent": {"type": ["string", "null"], "pattern": "^#?[0-9a-fA-F]{6}$|^$", "description": "Optional accent color. If null/empty, brand_palette_validator derives it from the primary via hue-shift + lighten."},
|
|
"bg": {"type": ["string", "null"], "description": "Optional background override. If null, derived from primary."},
|
|
"text": {"type": ["string", "null"], "description": "Optional body text override. If null, derived (off-white on dark bg, near-black on light bg)."}
|
|
}
|
|
},
|
|
"typography": {
|
|
"type": "object",
|
|
"required": ["heading_font", "body_font"],
|
|
"properties": {
|
|
"heading_font": {"type": "string", "description": "Google Font family for headings. e.g., Inter, Source Serif 4, Playfair Display."},
|
|
"body_font": {"type": "string", "description": "Google Font family for body text."},
|
|
"scale_ratio": {"type": "number", "minimum": 1.0, "maximum": 2.0, "description": "Modular type-scale ratio. 1.25 = major third (default), 1.333 = perfect fourth, 1.5 = perfect fifth."}
|
|
}
|
|
},
|
|
"design_style": {
|
|
"type": "string",
|
|
"enum": ["editorial", "technical", "minimal", "playful"],
|
|
"description": "Layout density preset consumed by every converter. editorial = magazine-like with wide margins and pull-quotes; technical = docs-like with sticky TOC and code emphasis; minimal = sparse with maximum whitespace; playful = product-marketing with color blocks and varied scale."
|
|
},
|
|
"code_theme": {
|
|
"type": "string",
|
|
"enum": ["light", "dark", "auto"],
|
|
"description": "Prism.js theme selection. auto = follows prefers-color-scheme."
|
|
},
|
|
"toc": {
|
|
"type": "object",
|
|
"required": ["behavior"],
|
|
"properties": {
|
|
"behavior": {"type": "string", "enum": ["sticky-sidebar", "collapsible-top", "inline", "none"]},
|
|
"max_depth": {"type": "integer", "minimum": 1, "maximum": 6, "description": "Deepest heading level included in the TOC."}
|
|
}
|
|
},
|
|
"company_name": {"type": "string", "description": "Optional, shown in footer of every generated HTML."},
|
|
"logo_url": {"type": "string", "description": "Optional. Base64-embedded at render time by default; pass --logo-mode link to inline the URL instead."},
|
|
"derived_palette": {
|
|
"type": "object",
|
|
"description": "12 CSS custom properties derived from the brand input by brand_palette_validator.derive_palette(). Stored here so every converter has identical tokens without re-deriving. Keys are CSS variable names; values are HEX or rgba() strings.",
|
|
"properties": {
|
|
"--md-bg": {"type": "string"},
|
|
"--md-surface": {"type": "string"},
|
|
"--md-border": {"type": "string"},
|
|
"--md-text": {"type": "string"},
|
|
"--md-text-muted": {"type": "string"},
|
|
"--md-accent": {"type": "string"},
|
|
"--md-accent-soft": {"type": "string"},
|
|
"--md-code-bg": {"type": "string"},
|
|
"--md-link": {"type": "string"},
|
|
"--md-link-hover": {"type": "string"},
|
|
"--md-success": {"type": "string"},
|
|
"--md-warn": {"type": "string"}
|
|
}
|
|
},
|
|
"setup_completed_at": {
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"description": "ISO-8601 timestamp written by onboard.py on successful completion. The orchestrator refuses to convert if this is null."
|
|
}
|
|
}
|
|
}
|