gzh-design
Verified微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown 先自动归一化),也支持"一键自动排版"(自动推断结构+选主题),还支持根据用户描述/参考图生成自定义主题组件库并保存本地复用。触发场景:(1) 用户提到"公众号排版""公众号文章""微信排版""gzh",(2) 用户想把文章(md/docx/pdf/纯文本)转成公众号 HTML,(3) 用户说"自动排版""一键排版"公众号内容,(4) 用户想为公众号排版"生成新主题/自定义风格/按这张图做一套组件库"。不用于生成普通网页/落地页/PPT(用前端或 PPT 类 skill)。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.7 KB |
| assets/preview-template.html | other | 3.5 KB |
| assets/sample-article.md | markdown | 2.7 KB |
| assets/theme-previews/theme-mono-blue-editorial.html | other | 45.0 KB |
| references/common-components.md | markdown | 11.3 KB |
| references/eval-cases.md | markdown | 5.6 KB |
| references/format-normalize.md | markdown | 4.4 KB |
| references/theme-generator.md | markdown | 25.3 KB |
| references/theme-graphite-minimal.md | markdown | 32.8 KB |
| references/theme-index.md | markdown | 3.1 KB |
| references/theme-moyu-green.md | markdown | 42.9 KB |
| references/theme-moyu-ticket.md | markdown | 23.4 KB |
| references/theme-olive-journal.md | markdown | 55.4 KB |
| references/theme-red-white.md | markdown | 28.4 KB |
| references/theme-zen-whitespace.md | markdown | 23.3 KB |
| scripts/component_lint.pyexecutable | script | 3.8 KB |
| scripts/extract_docx.py | script | 6.2 KB |
| scripts/test_validate_gzh_html.py | script | 4.8 KB |
| scripts/validate_gzh_html.pyexecutable | script | 8.3 KB |
| scripts/wrap_preview.pyexecutable | script | 1.7 KB |
references/theme-index.md
View on GitHub# 主题索引与选择决策表
本表是主题信息的**单一来源**。工作流第 1 步据此向用户展示选项,第 2 步据"组件库文件"列读取对应库,下划线标记时据"正文下划线 CSS"列取值。
每个主题的**英文标识**(用于产物命名 `{中文名}({标识}).html`、Agent 引用)= "组件库文件"列去掉 `theme-` 前缀与 `.md` 后缀。展示给用户仍用中文名。
## 已注册主题
| 主题 | 主色 | 适用场景 | 组件库文件 | 正文下划线 CSS |
|------|------|---------|-----------|---------------|
| 摸鱼绿 | `#059669` emerald | 教程、测评、清单、工具盘点(卡片丰富、信息密度高,默认推荐) | `references/theme-moyu-green.md` | `border-bottom:2px solid #A7F3D0;font-weight:600;` |
| 红白色系 | `#DC2626` 正红 | 深度分析、观点、力量感话题(经典编辑风,编号章节+引言卡+签名区,红色克制点睛) | `references/theme-red-white.md` | `border-bottom:2px solid #FECACA;font-weight:600;` |
| 石墨极简风 | `#52525B` 石墨灰 | 设计、科技评论、专业观点、高端品牌(极简克制、留白理性、全灰阶) | `references/theme-graphite-minimal.md` | `border-bottom:2px solid #52525B;font-weight:600;` |
| 留白禅意风 | `#4A5D52` 墨绿 | 禅意冥想、极简生活、深度随笔、艺术留白(呼吸感最强) | `references/theme-zen-whitespace.md` | `border-bottom:1.5px solid #B5C8BC;font-weight:500;` |
| 摸鱼票据风 | `#059669` emerald | 测评、工具对比、创意评测(票据/门票视觉隐喻,星级评分+编号+硬阴影卡片) | `references/theme-moyu-ticket.md` | `border-bottom:2px solid #A7F3D0;font-weight:600;` |
| 橄榄手记 | `#1e1f23` 墨黑(配橙 `#ed7b2f`) | 内刊手记、深度评测、案例复盘、系统性说明文档(编辑部内刊质感,分节形式多样,信息密度偏高) | `references/theme-olive-journal.md` | `border-bottom:2px solid #ed7b2f;font-weight:600;` |
## 选择建议
- **用户选择制**:用户没指定主题时,把本表全部主题列给用户选(中文名 + 适用场景),不替用户定;最贴合题材的主题可标"(推荐)"放第一位。
- 全自动模式(用户明说"直接排")才自动选:默认第一行主题,题材明显契合其它主题时选契合项并在交付时说明理由。
- 同一篇文章只用一套主题,不混搭。
## 下划线色值的权威性
正文关键词下划线一律用上表"正文下划线 CSS"列的值。组件库里可能有浅色下划线变体,那是可选样式;**正文关键词标记以本表为单一权威来源**,避免双轨。
## 新主题登记流程
1. 把主题组件库写入 `references/theme-{英文标识}.md`(格式要求见 SKILL.md「添加新主题的规范」)。
2. 在上表登记一行;首个/最常用主题放第一行作为默认推荐。
3. 跑 `python3 scripts/component_lint.py .` 确认 0 ERROR。
> 用户想要全新风格时,可走 `references/theme-generator.md` 的自定义主题生成流程:按偏好/参考图生成区块库(预览存 `assets/theme-previews/`),确认后转标准主题库并按上面流程登记。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse 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 PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse 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 presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |