design-system
Skill này làm gì
Skill này chạy một bước thiết lập ngắn cho các cài đặt thương hiệu được dùng bởi các công cụ chuyển markdown sang HTML. Nó dành cho người muốn tài liệu sau khi chuyển đổi khớp với thương hiệu của họ.
Khi nào nên dùng
- ✓Khi bạn chuyển một file markdown sang HTML lần đầu và muốn nó mang phong cách thương hiệu của bạn.
- ✓Khi bạn muốn đổi màu thương hiệu, phông chữ hoặc cài đặt phong cách.
- ✓Khi bạn muốn ghi đè thương hiệu riêng cho một kho mã cụ thể.
Liên kết skill
https://github.com/alirezarezvani/claude-skills/blob/main/markdown-html/skills/design-system/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy thiết lập màu thương hiệu và phông chữ của tôi để các tài liệu sau khi chuyển đổi khớp với phong cách công ty chúng tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill hỏi một loạt câu hỏi ngắn về màu sắc, phông chữ, phong cách và mục lục, kiểm tra bảng màu có đủ tương phản dễ đọc không, rồi lưu cài đặt để các công cụ chuyển đổi dùng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Design System — Onboarding + Shared Brand Tokens
The design-system skill is the shared brand owner for the markdown-html plugin. Run its onboarding once. Every converter (md-document, md-review, md-slides) reads the resulting config via config_loader.py and applies the same 12 CSS custom properties to its output. Without this, conversions render with placeholder defaults — technically functional but unbranded.
This skill ships exactly three Python tools:
onboard.py— interactive (or--defaults/--set/--show/--reset) wizard.config_loader.py— importable customization loader with project > global > defaults precedence andMARKDOWN_HTML_NO_CONFIG=1bypass.brand_palette_validator.py— WCAG-AA contrast checker + HSL palette deriver.
All three are stdlib-only and contain no LLM calls (deterministic per Path-B discipline).
When to invoke
| Symptom | Action |
|---|---|
| User says "convert this markdown to HTML" for the first time in this workspace | Run python3 markdown-html/skills/design-system/scripts/onboard.py |
~/.config/markdown-html/design-system.json doesn't exist OR setup_completed_at is null |
Refuse conversion, surface onboarding |
| User wants per-repo brand override | python3 .../onboard.py --scope project |
| User wants to change a single field non-interactively | python3 .../onboard.py --set brand.primary=#FF6B35 |
| User wants to reset and re-onboard | python3 .../onboard.py --reset then re-run |
| User wants zero-touch defaults (CI, ephemeral session) | python3 .../onboard.py --defaults |
| Headless / containerized run that should ignore saved config | MARKDOWN_HTML_NO_CONFIG=1 ... |
Onboarding question set (10 questions)
| # | Key | Choices / Validator | Default |
|---|---|---|---|
| 1 | default_output_dir |
path; os.access(parent, os.W_OK) |
./markdown-html-out/ |
| 2 | brand.primary |
HEX ^#?[0-9a-fA-F]{6}$ |
#0A1628 |
| 3 | brand.accent |
HEX or blank (auto-derive) | derive from primary |
| 4 | typography.heading_font |
Google Font name (12 safe defaults) | Inter |
| 5 | typography.body_font |
Google Font name | Inter |
| 6 | design_style |
editorial / technical / minimal / playful |
technical |
| 7 | code_theme |
light / dark / auto |
auto |
| 8 | toc.behavior |
sticky-sidebar / collapsible-top / inline / none |
sticky-sidebar |
| 9 | company_name |
string (may be empty) | "" |
| 10 | logo_url |
URL or empty (base64-embedded at render) | "" |
Hard rules
- WCAG AA body-text contrast must pass.
brand_palette_validator.validate()runs after every change. Body text on bg must reach 4.5:1; link on bg must reach 4.5:1. If either fails,onboard.pyrefuses to save (exit code 4) and tells the user to pick a darker primary, blankbrand.bg/brand.textto let derivation pick a safe pair, or overridebrand.textdirectly. Canon: WCAG 2.2 §1.4.3. - Output directory must be writable.
onboard.pywalks up the path to find an existing ancestor and checksos.W_OK. Empty or unwritable path → exit code 3. The orchestrator'soutput_path_resolver.pyhonors the same rule per-conversion. - Customization must change behavior, not sit as decoration. Every consumer (md-document, md-review, md-slides) must read the config and render differently when the user changes
design_style,brand.primary,code_theme, ortoc.behavior. Decorative-only fields fail the design discipline. - Precedence is fixed. Project > global > defaults. The deep-merge preserves nested keys (e.g. you can override
brand.primaryin a project config without losingtypography.heading_fontfrom global). - Bypass env exists for a reason.
MARKDOWN_HTML_NO_CONFIG=1is for headless CI, ephemeral test containers, and the autoresearch-style evaluator loops. Never set it silently for an interactive user.
Derived 12-token palette
Once the user's brand is captured, brand_palette_validator.derive_palette() produces 12 CSS custom properties stored under derived_palette in the same config file. Every converter inlines these into its <style> block.
| Token | Purpose | Derivation |
|---|---|---|
--md-bg |
Document background | Primary if dark, near-neutral if vibrant |
--md-surface |
Card / callout / blockquote background | Bg ± 4-6% luminance |
--md-border |
Hairline dividers, table borders | Bg ± 8-12% luminance |
--md-text |
Body text | Off-white on dark bg |
Câu hỏi thường gặp
Nó có từ chối các màu có độ tương phản thấp không?
Có. Nó từ chối các bảng màu không đạt tiêu chuẩn tương phản WCAG AA.
Tôi có thể thiết lập mà không cần trả lời mọi câu hỏi không?
Có. Công cụ thiết lập có tùy chọn dùng mặc định hoặc chỉ thay đổi từng trường một.
Cài đặt được lưu ở đâu?
Chúng được lưu trong một file cấu hình toàn cục, hoặc trong thư mục dự án nếu bạn chọn cài đặt cấp dự án.
Chi tiết
Mô tả gốc của tác giả
Use when setting up brand settings before the first markdown-to-HTML conversion, or changing them. Runs a 10-question onboarding with onboard.py (colors, fonts, style, TOC) and refuses palettes that fail WCAG AA via brand_palette_validator.py.
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9625
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-launcher-orchestrator
29kGiúp agent của bạn lên kế hoạch, xây dựng, kiểm thử và lên lịch một Claude managed agent trong tài khoản riêng, từng bước một, bắt đầu từ một mục tiêu rõ ràng.
grade-iterate
29kCho phép agent của bạn chấm kết quả một managed AI agent theo bảng tiêu chí và cải thiện qua số vòng cố định, nên không bao giờ lặp vô tận.
interview
29kCho phép agent của bạn phỏng vấn bạn về ý tưởng agent AI và biến câu trả lời thành một kế hoạch xây dựng đơn giản trước khi khởi chạy bất cứ điều gì.
run-without-you
29kGiúp agent của bạn thiết lập một managed AI agent chạy theo lịch hoặc khi có sự kiện xảy ra, với thời gian cron được kiểm tra trước khi khởi chạy.
Skill tương tự
brand-discovery
280kGiúp xác định bản sắc thương hiệu thông qua các buổi phỏng vấn có cấu trúc. Tạo hướng dẫn đầy đủ về mục đích, đối tượng và tính cách của thương hiệu.
brand-voice
280kTạo hồ sơ viết dựa trên văn bản thương hiệu thực tế. Đảm bảo nội dung và giao tiếp giữ được phong cách nhất quán và chân thực.
design-md
260kDạy agent viết, kiểm tra và xuất tệp DESIGN.md, ghi màu, phông chữ và phong cách thương hiệu theo dạng công cụ AI đọc được.