Skip to content

ZJU-REAL/Easel / skills/builtin/gzh-design

gzh-design

Verified

微信公众号文章排版引擎:把 Markdown / Word(.docx) / PDF / 纯文本转成可直接粘贴进公众号编辑器的 HTML,自动章节编号、关键词标记、引言卡、目录、代码块、图片/GIF、作者签名;主题从 references/theme-index.md 组件库按题材推荐,支持"一键自动排版"与按描述/参考图生成自定义主题。触发:用户提到"公众号排版/微信排版/gzh"、想把文章(md/docx/pdf/纯文本)转成公众号 HTML、说"自动排版/一键排版"公众号内容。不用于普通网页/落地页/PPT。

FileKindSize
CONTRIBUTING.mdmarkdown2.0 KB
EASEL-META.mdmarkdown1.1 KB
LICENSEother34.2 KB
README.en.mdmarkdown15.6 KB
README.mdmarkdown19.8 KB
SKILL.mdskill md17.8 KB
archive/gallery-v1/cardnote.htmlother18.7 KB
archive/gallery-v1/cream.htmlother18.2 KB
archive/gallery-v1/datainfo.htmlother29.8 KB
archive/gallery-v1/dianlan.htmlother17.7 KB
archive/gallery-v1/graphite.htmlother19.7 KB
archive/gallery-v1/heibaihui.htmlother17.6 KB
archive/gallery-v1/heikeji.htmlother23.0 KB
archive/gallery-v1/hongbai.htmlother17.2 KB
archive/gallery-v1/hupo.htmlother17.1 KB
archive/gallery-v1/jiaotang.htmlother17.6 KB
archive/gallery-v1/lvkeji.htmlother21.0 KB
archive/gallery-v1/magfeature.htmlother22.5 KB
archive/gallery-v1/meigui.htmlother17.2 KB
archive/gallery-v1/mistblue.htmlother20.4 KB
archive/gallery-v1/qingshiban.htmlother17.0 KB
archive/gallery-v1/rich_hongbai.htmlother14.5 KB
archive/gallery-v1/rich_morandi.htmlother15.2 KB
archive/gallery-v1/rich_terminal.htmlother17.5 KB
archive/gallery-v1/rich_zen.htmlother13.3 KB
archive/gallery-v1/tianlan.htmlother16.3 KB
archive/gallery-v1/zise.htmlother17.7 KB
archive/themes-v1/theme-amber-orange.mdmarkdown22.0 KB
archive/themes-v1/theme-caramel-brown.mdmarkdown23.1 KB
archive/themes-v1/theme-card-notes.mdmarkdown33.9 KB
archive/themes-v1/theme-cream-warmth.mdmarkdown22.1 KB
archive/themes-v1/theme-data-infographic.mdmarkdown34.9 KB
archive/themes-v1/theme-editorial-feature.mdmarkdown25.7 KB
archive/themes-v1/theme-elegant-purple.mdmarkdown20.9 KB
archive/themes-v1/theme-emerald-tech.mdmarkdown23.7 KB
archive/themes-v1/theme-indigo-business.mdmarkdown20.9 KB
archive/themes-v1/theme-mist-blue.mdmarkdown25.5 KB
archive/themes-v1/theme-mono-black.mdmarkdown19.7 KB
archive/themes-v1/theme-morandi.mdmarkdown25.0 KB
archive/themes-v1/theme-rose-pink.mdmarkdown23.4 KB
archive/themes-v1/theme-sky-blue.mdmarkdown14.0 KB
archive/themes-v1/theme-slate-minimal.mdmarkdown22.2 KB
archive/themes-v1/theme-terminal.mdmarkdown27.6 KB
archive/themes-v1/theme-terracotta-tech.mdmarkdown21.2 KB
assets/preview-template.htmlother4.0 KB
assets/sample-article.mdmarkdown2.7 KB
assets/theme-previews/theme-mono-blue-editorial.htmlother45.0 KB
docs/all-themes.mdmarkdown1.9 KB
docs/gallery/graphite-minimal.htmlother18.4 KB
docs/gallery/index.htmlother2.9 KB
docs/gallery/moyu-green.htmlother24.8 KB
docs/gallery/moyu-ticket.htmlother22.4 KB
docs/gallery/olive-journal.htmlother26.3 KB
docs/gallery/red-white.htmlother18.7 KB
docs/gallery/sample-article.mdmarkdown2.7 KB
docs/gallery/zen-whitespace.htmlother16.9 KB
references/common-components.mdmarkdown11.3 KB
references/eval-cases.mdmarkdown5.6 KB
references/format-normalize.mdmarkdown4.4 KB
references/theme-generator.mdmarkdown25.3 KB
references/theme-graphite-minimal.mdmarkdown32.7 KB
references/theme-index.mdmarkdown3.1 KB
references/theme-moyu-green.mdmarkdown43.1 KB
references/theme-moyu-ticket.mdmarkdown23.5 KB
references/theme-olive-journal.mdmarkdown55.4 KB
references/theme-red-white.mdmarkdown28.4 KB
references/theme-zen-whitespace.mdmarkdown23.3 KB
scripts/component_lint.pyexecutablescript3.8 KB
scripts/extract_docx.pyscript6.2 KB
scripts/validate_gzh_html.pyexecutablescript7.0 KB
scripts/wrap_preview.pyexecutablescript3.4 KB

archive/gallery-v1/rich_hongbai.html

View on GitHub
<section style="max-width: 677px;margin: 0 auto;background: #ffffff;font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;color: #374151;line-height: 1.75;letter-spacing: 0.5px;overflow-x: hidden;">

  <!-- 1. 开头引言卡片(白底 + 红色阴影光晕)组件2 -->
  <section style="margin:10px 10px 32px;background:#ffffff;border-radius:12px;box-shadow:0 4px 24px -4px rgba(220,38,38,0.15);padding:28px 24px 22px;overflow:hidden;">
    <p style="font-size:42px;color:#DC2626;font-weight:900;margin:0;line-height:0.6;">
      <span leaf="">"</span>
    </p>
    <p style="font-size:16px;font-weight:800;color:#1C1917;margin:12px 0 8px;line-height:1.75;padding-left:4px;">
      <span style="background:#DC2626;color:#FFFFFF;padding:2px 8px;border-radius:4px;"><span leaf="">排版</span></span>
      <span leaf="">不该是写完文章后最痛苦的一步,当它变成</span>
      <span style="background:#DC2626;color:#FFFFFF;padding:2px 8px;border-radius:4px;"><span leaf="">可复用的能力</span></span>
      <span leaf="">,每次发布都在省时间。</span>
    </p>
    <p style="text-align:right;font-size:12px;color:#9CA3AF;margin:8px 0 0;letter-spacing:1px;">
      <span leaf="">—— 林深</span>
    </p>
  </section>

  <!-- 2. 前言正文(作者信息 + 导入段落)-->
  <section style="padding: 0 10px 20px;">
    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">最近我把公众号排版做成了</span>
      <span style="border-bottom:2px solid #FECACA;font-weight:600;"><span leaf="">流水线</span></span>
      <span leaf="">。先看一段核心代码:</span>
    </p>
  </section>

  <!-- 前言代码块(通用增量库 1a 深色代码块)-->
  <section style="margin:0 10px 24px;border-radius:10px;overflow:hidden;background:#1E293B;box-shadow:0 6px 20px -8px rgba(15,23,42,0.45);">
    <section style="display:flex;align-items:center;padding:10px 16px;background:#0F172A;">
      <span style="display:inline-block;width:11px;height:11px;border-radius:50%;background:#FF5F56;margin-right:7px;font-size:0;line-height:0;overflow:hidden;">.</span>
      <span style="display:inline-block;width:11px;height:11px;border-radius:50%;background:#FFBD2E;margin-right:7px;font-size:0;line-height:0;overflow:hidden;">.</span>
      <span style="display:inline-block;width:11px;height:11px;border-radius:50%;background:#27C93F;font-size:0;line-height:0;overflow:hidden;">.</span>
      <span style="margin-left:12px;font-size:12px;color:#64748B;font-family:'SF Mono','Roboto Mono',Consolas,Monaco,monospace;letter-spacing:1px;"><span leaf="">python</span></span>
    </section>
    <section style="padding:16px 18px;overflow-x:auto;">
      <p style="margin:0;font-family:'SF Mono','Roboto Mono',Consolas,Monaco,'Courier New',monospace;font-size:13px;line-height:1.8;color:#E2E8F0;white-space:pre;"><span leaf="">def render(article, theme="红白色系"):</span><br>
<span leaf="">    html = build(article, theme)</span><br>
<span leaf="">    return validate(html)  # 必须过校验</span></p>
    </section>
  </section>

  <!-- 3. 目录导读(组件3)-->
  <section style="padding: 0 10px 32px;">
    <p style="font-size: 14px;color: #9CA3AF;margin: 0 0 14px;letter-spacing:1px;">
      <span leaf="">📌 本文看点</span>
    </p>
    <section style="display:flex;justify-content:space-between;">
      <section style="flex:1;background:#FEF2F2;border-radius:10px;padding:16px 12px;margin-right:8px;text-align:center;border:1px solid #FEE2E2;">
        <p style="display:inline-block;background:#DC2626;color:#FFFFFF;font-size:12px;font-weight:800;padding:2px 10px;border-radius:4px;margin:0 0 8px;"><span leaf="">01</span></p>
        <p style="font-size:13px;font-weight:700;color:#1C1917;margin:0;"><span leaf="">为什么做这件事</span></p>
      </section>
      <section style="flex:1;background:#FEF2F2;border-radius:10px;padding:16px 12px;margin-right:8px;text-align:center;border:1px solid #FEE2E2;">
        <p style="display:inline-block;background:#DC2626;color:#FFFFFF;font-size:12px;font-weight:800;padding:2px 10px;border-radius:4px;margin:0 0 8px;"><span leaf="">02</span></p>
        <p style="font-size:13px;font-weight:700;color:#1C1917;margin:0;"><span leaf="">核心方法拆解</span></p>
      </section>
      <section style="flex:1;background:#FEF2F2;border-radius:10px;padding:16px 12px;text-align:center;border:1px solid #FEE2E2;">
        <p style="display:inline-block;background:#DC2626;color:#FFFFFF;font-size:12px;font-weight:800;padding:2px 10px;border-radius:4px;margin:0 0 8px;"><span leaf="">03</span></p>
        <p style="font-size:13px;font-weight:700;color:#1C1917;margin:0;"><span leaf="">能力积累的意义</span></p>
      </section>
    </section>
  </section>

  <!-- 4. 章节分割线(组件4)-->
  <section style="padding:0 10px;">
    <section style="height:1px;background:linear-gradient(to right, transparent, #FCA5A5, #DC2626, #FCA5A5, transparent);margin:0;">
      <span leaf=""><br></span>
    </section>
  </section>

  <!-- 5. 第一章:为什么要做这件事(组件5,编号01)-->
  <section style="margin-top: 48px;margin-bottom: 28px;padding: 0 10px;">
    <section style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:14px;border-bottom:3px solid #DC2626;">
      <section style="display:flex;align-items:center;">
        <span style="display:inline-block;background:#DC2626;color:#FFFFFF;font-size:18px;font-weight:900;padding:4px 14px;border-radius:6px;margin-right:14px;line-height:1.3;"><span leaf="">01</span></span>
        <section>
          <p style="font-size:10px;color:#DC2626;font-weight:700;letter-spacing:3px;margin:0 0 2px;text-transform:uppercase;">
            <span leaf="">WHY WE START</span>
          </p>
          <h3 style="font-size:18px;font-weight:800;color:#1C1917;margin:0;letter-spacing:0.5px;">
            <span leaf="">为什么要做这件事</span>
          </h3>
        </section>
      </section>
    </section>

    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">公众号编辑器限制很多,比如不能用</span>
      <span style="background:#F1F5F9;color:#DC2626;padding:1px 6px;border-radius:4px;font-family:'SF Mono',Consolas,Monaco,monospace;font-size:14px;"><span leaf="">&lt;style&gt;</span></span>
      <span leaf="">标签。这些</span>
      <span style="border-bottom:2px solid #FECACA;font-weight:600;"><span leaf="">平台限制</span></span>
      <span leaf="">让排版工作变得繁琐,每次发文都要重复劳动。</span>
    </p>

    <!-- 列表项 → 带缩进的正文段落 -->
    <p style="margin-bottom: 12px;font-size: 15px;line-height: 1.8;text-align: justify;padding-left:16px;">
      <span leaf="">· </span>
      <span style="border-bottom:2px solid #FECACA;font-weight:600;"><span leaf="">样式必须全部内联</span></span>
      <span leaf="">,不能依赖外部 CSS 文件</span>
    </p>
    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;padding-left:16px;">
      <span leaf="">· </span>
      <span style="border-bottom:2px solid #FECACA;font-weight:600;"><span leaf="">所有文字要用 span 包裹</span></span>
      <span leaf="">,否则粘贴后样式大面积丢失</span>
    </p>

    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">下面是排版前后的效果对比:</span>
    </p>

    <!-- 图片(通用增量库 2a 标准图片,带说明)-->
    <section style="background:#FFF;border-radius:12px;padding:6px;border:1px solid #E5E7EB;box-shadow:0 4px 12px -2px rgba(0,0,0,0.08);margin-bottom:8px;">
      <section style="margin:0;border-radius:8px;overflow:hidden;">
        <span leaf=""><img src="images/before-after.png" style="max-width:100%;"></span>
      </section>
    </section>
    <p style="font-size:12px;color:#9CA3AF;text-align:center;margin:0 0 24px;">
      <span leaf="">— 排版前后对比</span>
    </p>

    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">还有一段操作流程的动图演示:</span>
    </p>

    <!-- GIF(通用增量库 2b GIF 动图,加"GIF 动图"角标)-->
    <section style="background:#FFF;border-radius:12px;padding:6px;border:1px solid #E5E7EB;box-shadow:0 4px 12px -2px rgba(0,0,0,0.08);margin-bottom:8px;">
      <section style="margin:0;border-radius:8px;overflow:hidden;">
        <span leaf=""><img src="demo.gif" style="max-width:100%;"></span>
      </section>
    </section>
    <p style="text-align:center;margin:0 0 24px;">
      <span style="display:inline-block;background:#FEE2E2;color:#991B1B;font-size:11px;font-weight:700;padding:1px 8px;border-radius:4px;margin-right:6px;"><span leaf="">GIF 动图</span></span>
      <span style="font-size:12px;color:#9CA3AF;"><span leaf="">操作流程演示</span></span>
    </p>

  </section>

  <!-- 6. 章节分割线(组件4)-->
  <section style="padding:0 10px;">
    <section style="height:1px;background:linear-gradient(to right, transparent, #FCA5A5, #DC2626, #FCA5A5, transparent);margin:0;">
      <span leaf=""><br></span>
    </section>
  </section>

  <!-- 7. 第二章:核心方法(组件5,编号02)-->
  <section style="margin-top: 48px;margin-bottom: 28px;padding: 0 10px;">
    <section style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:14px;border-bottom:3px solid #DC2626;">
      <section style="display:flex;align-items:center;">
        <span style="display:inline-block;background:#DC2626;color:#FFFFFF;font-size:18px;font-weight:900;padding:4px 14px;border-radius:6px;margin-right:14px;line-height:1.3;"><span leaf="">02</span></span>
        <section>
          <p style="font-size:10px;color:#DC2626;font-weight:700;letter-spacing:3px;margin:0 0 2px;text-transform:uppercase;">
            <span leaf="">CORE METHOD</span>
          </p>
          <h3 style="font-size:18px;font-weight:800;color:#1C1917;margin:0;letter-spacing:0.5px;">
            <span leaf="">核心方法</span>
          </h3>
        </section>
      </section>
    </section>

    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">把专家经验沉淀成组件库。</span>
      <span style="background:#FEE2E2;color:#991B1B;padding:2px 6px;border-radius:3px;font-weight:700;"><span leaf="">组件库</span></span>
      <span leaf="">才是真正的</span>
      <span style="border-bottom:2px solid #FECACA;font-weight:600;"><span leaf="">资产,不是提示词</span></span>
      <span leaf="">。</span>
    </p>

    <!-- 非开头引用(8a 粉底左竖条块金句引用)-->
    <section style="background:#FEF2F2;border-radius:0 10px 10px 0;border-left:4px solid #DC2626;padding:18px 22px;margin-bottom:24px;">
      <p style="font-size:16px;font-weight:800;color:#991B1B;margin:0;line-height:1.8;">
        <span leaf="">「好 Skill 不是一次写完,而是像代码质量一样持续维护。」</span>
      </p>
    </section>

    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">行内用</span>
      <span style="background:#F1F5F9;color:#DC2626;padding:1px 6px;border-radius:4px;font-family:'SF Mono',Consolas,Monaco,monospace;font-size:14px;"><span leaf="">validate_gzh_html.py</span></span>
      <span leaf="">做</span>
      <span style="border-bottom:2px solid #FECACA;font-weight:600;"><span leaf="">合规兜底</span></span>
      <span leaf="">,每次生成后必须跑一遍。</span>
    </p>

  </section>

  <!-- 8. 章节分割线(组件4)-->
  <section style="padding:0 10px;">
    <section style="height:1px;background:linear-gradient(to right, transparent, #FCA5A5, #DC2626, #FCA5A5, transparent);margin:0;">
      <span leaf=""><br></span>
    </section>
  </section>

  <!-- 9. 结语章节(组件5,∞ 变体)-->
  <section style="margin-top: 48px;margin-bottom: 28px;padding: 0 10px;">
    <section style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:14px;border-bottom:3px solid #DC2626;">
      <section style="display:flex;align-items:center;">
        <span style="display:inline-block;background:#DC2626;color:#FFFFFF;font-size:18px;font-weight:900;padding:4px 14px;border-radius:6px;margin-right:14px;line-height:1.3;"><span leaf="">∞</span></span>
        <section>
          <p style="font-size:10px;color:#DC2626;font-weight:700;letter-spacing:3px;margin:0 0 2px;text-transform:uppercase;">
            <span leaf="">FINAL THOUGHTS</span>
          </p>
          <h3 style="font-size:18px;font-weight:800;color:#1C1917;margin:0;letter-spacing:0.5px;">
            <span leaf="">写在最后</span>
          </h3>
        </section>
      </section>
    </section>

    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">每一次真实任务,都是在</span>
      <span style="border-bottom:2px solid #FECACA;font-weight:600;"><span leaf="">积累下一次能调用的能力资产</span></span>
      <span leaf="">。</span>
    </p>

  </section>

  <!-- 10. END 分割线(组件14)-->
  <section style="padding: 0 10px;">
    <section style="text-align:center;margin:0 0 32px;">
      <section style="display:flex;align-items:center;justify-content:center;">
        <span style="height:2px;width:60px;background:linear-gradient(to right,transparent,#DC2626);margin-right:12px;"></span>
        <span style="font-size:11px;color:#DC2626;letter-spacing:3px;font-weight:700;"><span leaf="">END</span></span>
        <span style="height:2px;width:60px;background:linear-gradient(to left,transparent,#DC2626);margin-left:12px;"></span>
      </section>
    </section>
  </section>

  <!-- 11. 尾部作者签名区(组件15,固定文案,全文唯一,原文末尾签名段已并入此处)-->
  <section style="padding: 0 10px;">
    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">我是甲木,热衷于分享一些 AI 观察,AI 干货内容</span>
    </p>
    <p style="margin-bottom: 20px;font-size: 15px;line-height: 1.8;text-align: justify;">
      <span leaf="">如果你觉得今天这篇有收获,欢迎</span>
      <strong style="color:#DC2626;"><span leaf="">点赞、在看、转发</span></strong>
      <span leaf="">三连,我们下篇见</span>
    </p>
  </section>

</section>
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall