Skip to content

zach22-1999/generic-skills / skills/zach-md-html

zach-md-html

Verified

已降级的 Markdown→HTML 兼容转换器。仅当用户明确要求“使用 zach-md-html”、或明确说“不要重组内容,只把现成 Markdown 机械转换成 HTML/套用旧主题”时使用。不要因为用户只说“输出成 HTML”“生成 HTML 报告”“把日常报告做成 HTML”“数据报告/交付报告”而触发;这些任务应由模型从原始资料直接组织并生成自包含 HTML。此 Skill 不负责数据可视化、工作面、自由设计、万物转 md、html 转 md 或 md 转 docx。

examples/output/report.html

View on GitHub
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>Markdown 与 HTML 的文档流水线</title>
  <style>

span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}

ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
  <style type="text/css">
:root {
--font-sans-zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
--font-sans-en: "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
--font-serif-zh: "Source Han Serif SC", "Noto Serif CJK SC", serif;
--font-mono: "JetBrains Mono", "SF Mono", "IBM Plex Mono", Menlo, monospace;

--color-ink: #14181f;
--color-ink-soft: #3c4451;
--color-ink-mute: #6c7686;
--color-rule: #dde2ea;
--color-rule-strong: #b9c1cf;
--color-paper: #ffffff;
--color-paper-soft: #f6f8fb;
--color-accent: #1f4ea8;
--color-link: #1a3f8c;
--color-link-hover: #0d2a66;
--color-quote-bar: #1f4ea8;
--color-code-bg: #f1f4f9;
--color-code-ink: #16213a;
--color-table-row-alt: #fafbfd;
--color-positive: #1c6e3d;
--color-negative: #a32a2a;
--max-prose: 820px;
--max-figure: 1100px;
--gutter: clamp(24px, 4vw, 80px);
--rhythm: 1em;
}
@media (prefers-color-scheme: dark) {
:root {
--color-ink: #e6ecf5;
--color-ink-soft: #b6becd;
--color-ink-mute: #7d8696;
--color-rule: #2a3140;
--color-rule-strong: #3a4254;
--color-paper: #15181f;
--color-paper-soft: #1c2029;
--color-accent: #6da0ff;
--color-link: #8eb2ff;
--color-link-hover: #b8cdff;
--color-quote-bar: #6da0ff;
--color-code-bg: #1c2029;
--color-code-ink: #d8dde7;
--color-table-row-alt: #181c25;
--color-positive: #5cb583;
--color-negative: #e36868;
}
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
@media (min-width: 1200px) { html { font-size: 17px; } }
body {
margin: 0;
padding: clamp(32px, 5vw, 80px) var(--gutter) 6rem;
font-family: var(--font-sans-en), var(--font-sans-zh);
font-feature-settings: "kern", "liga", "calt";
line-height: 1.7;
color: var(--color-ink);
background: var(--color-paper);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-wrap: pretty;
}
header.title-block, main, article, body > section {
max-width: var(--max-prose);
margin-left: auto;
margin-right: auto;
}

header.title-block {
margin-bottom: 2.6em;
padding-bottom: 1.4em;
border-bottom: 2px solid var(--color-ink);
}
header.title-block .title, body > h1:first-of-type {
font-weight: 700;
font-size: clamp(1.7rem, 3.2vw, 2.3rem);
line-height: 1.22;
letter-spacing: -0.014em;
margin: 0 0 0.4em;
}
header.title-block .subtitle {
font-weight: 400;
font-size: 1.05rem;
color: var(--color-ink-soft);
margin: 0 0 1em;
}
header.title-block .author, header.title-block .date {
font-size: 0.85rem;
letter-spacing: 0.05em;
text-transform: uppercase;
color: var(--color-ink-mute);
margin: 0.2em 0;
}

h1, h2, h3, h4, h5, h6 {
font-family: var(--font-sans-en), var(--font-sans-zh);
font-weight: 700;
line-height: 1.3;
color: var(--color-ink);
margin: 2em 0 0.6em;
letter-spacing: -0.006em;
}
h1 { font-size: 1.8rem; margin-top: 0; }
h2 {
font-size: 1.4rem;
padding-top: 0.4em;
border-top: 1px solid var(--color-rule);
display: flex;
align-items: baseline;
gap: 0.6em;
}
h2:first-child { border-top: none; padding-top: 0; }
h2.numbered::before {
content: counter(section-num);
counter-increment: section-num;
color: var(--color-accent);
font-variant-numeric: tabular-nums;
font-weight: 700;
font-size: 0.78em;
letter-spacing: 0;
}
h3 { font-size: 1.15rem; }
h4 { font-size: 1.02rem; }
h5 {
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--color-ink-soft);
}
h6 { font-size: 0.78rem; color: var(--color-ink-mute); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
article { counter-reset: section-num; }

p { margin: 0 0 var(--rhythm); }
strong, b { font-weight: 600; }
em, i { font-style: italic; }
a {
color: var(--color-link);
text-decoration: underline;
text-decoration-thickness: 0.06em;
text-underline-offset: 0.16em;
text-decoration-color: color-mix(in oklab, var(--color-link), transparent 60%);
}
a:hover { color: var(--color-link-hover); text-decoration-color: var(--color-link-hover); }

blockquote {
margin: 1.4em 0;
padding: 0.8em 1.2em;
border-left: 3px solid var(--color-quote-bar);
background: var(--color-paper-soft);
color: var(--color-ink-soft);
}
blockquote p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4em; margin: 0 0 var(--rhythm); }
ul li::marker { color: var(--color-accent); }
ol li::marker { color: var(--color-accent); font-weight: 600; font-variant-numeric: tabular-nums; }
li { margin: 0.25em 0; }
dl { margin: 0 0 var(--rhythm); }
dt { font-weight: 600; color: var(--color-ink); margin-top: 0.6em; }
dd { margin: 0.2em 0 0.4em 1.4em; color: var(--color-ink-soft); }

code, kbd, samp {
font-family: var(--font-mono);
font-size: 0.88em;
}
:not(pre) > code {
background: var(--color-code-bg);
color: var(--color-code-ink);
padding: 0.1em 0.36em;
border-radius: 3px;
}
pre {
margin: 1.4em 0;
padding: 1em 1.2em;
background: var(--color-code-bg);
border-left: 3px solid var(--color-rule-strong);
border-radius: 4px;
overflow-x: auto;
line-height: 1.55;
font-size: 0.88rem;
}
pre code { background: transparent; padding: 0; color: var(--color-code-ink); }

table {
width: 100%;
margin: 1.6em 0;
border-collapse: collapse;
font-size: 0.93em;
font-variant-numeric: tabular-nums;
}
caption {
caption-side: top;
text-align: left;
margin-bottom: 0.5em;
font-weight: 600;
color: var(--color-ink-soft);
font-size: 0.92em;
}
thead {
background: var(--color-paper-soft);
border-top: 2px solid var(--color-ink);
border-bottom: 1px solid var(--color-rule-strong);
}
tbody tr { border-bottom: 1px solid var(--color-rule); }
tbody tr:nth-child(even) { background: var(--color-table-row-alt); }
tbody tr:last-child { border-bottom: 2px solid var(--color-ink); }
th, td {
text-align: left;
padding: 0.5em 0.8em;
vertical-align: top;
}
th {
font-weight: 600;
font-size: 0.85em;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--color-ink);
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }

figure {
margin: 1.6em auto;
max-width: var(--max-figure);
}
figure img, p > img {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
border: 1px solid var(--color-rule);
border-radius: 4px;
}
figcaption {
margin-top: 0.6em;
font-size: 0.85em;
color: var(--color-ink-mute);
text-align: center;
}

hr {
border: none;
height: 1px;
background: var(--color-rule);
margin: 2em 0;
}

#TOC, nav#TOC {
margin: 2em 0 2.5em;
padding: 1.2em 1.4em;
background: var(--color-paper-soft);
border: 1px solid var(--color-rule);
border-radius: 4px;
font-size: 0.92em;
}
#TOC > ul, nav#TOC > ul { list-style: none; padding-left: 0; margin: 0; columns: 2; column-gap: 2em; }
@media (max-width: 700px) { #TOC > ul, nav#TOC > ul { columns: 1; } }
#TOC ul ul, nav#TOC ul ul { list-style: none; padding-left: 1em; columns: 1; }
#TOC a, nav#TOC a {
color: var(--color-ink-soft);
text-decoration: none;
display: inline-block;
padding: 0.15em 0;
}
#TOC a:hover, nav#TOC a:hover { color: var(--color-accent); }

.kpi-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 1px;
background: var(--color-rule);
border: 1px solid var(--color-rule);
margin: 1.4em 0;
}
.kpi-grid .kpi {
background: var(--color-paper);
padding: 1em 1.2em;
}
.kpi .kpi-label {
font-size: 0.78em;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--color-ink-mute);
}
.kpi .kpi-value {
font-size: 1.6em;
font-weight: 700;
font-variant-numeric: tabular-nums;
color: var(--color-ink);
margin-top: 0.2em;
}
.kpi .kpi-delta.positive { color: var(--color-positive); }
.kpi .kpi-delta.negative { color: var(--color-negative); }

.footnotes {
margin-top: 3em;
padding-top: 1em;
border-top: 1px solid var(--color-rule);
font-size: 0.88em;
color: var(--color-ink-soft);
}

@media print {
body { background: white; color: black; padding: 0; }
pre, code, blockquote { background: #f4f4f4 !important; color: #222 !important; }
pre, blockquote, table, figure { break-inside: avoid; }
thead { display: table-header-group; }
a { color: black; text-decoration: none; }
}
::selection {
background: color-mix(in oklab, var(--color-accent), transparent 78%);
color: var(--color-ink);
}
</style>
</head>
<body>
<header id="title-block-header">
<h1 class="title">Markdown 与 HTML 的文档流水线</h1>
</header>
<p>很多团队会把写作、评审、发布混在一个格式里:有人在 Word
里写,有人在网页编辑器里改,有人最后再把内容复制到别的平台。格式一多,版本就乱,AI
也很难稳定接手。</p>
<p><code>zach-md-html</code> 的做法是把角色分开:</p>
<ul>
<li><code>markdown</code> 负责生产:轻、可 diff、适合 AI 读写</li>
<li><code>HTML</code>
负责阅读和展示:可排版、可交互、浏览器直接打开</li>
<li><code>DOCX</code> 负责审校和交付:适合编辑、客户、投稿系统</li>
</ul>
<h2 id="为什么先写-markdown">为什么先写 Markdown</h2>
<p>Markdown 的优势不是好看,而是稳定。</p>
<table>
<thead>
<tr>
<th>维度</th>
<th>Markdown</th>
<th>HTML</th>
<th>DOCX</th>
</tr>
</thead>
<tbody>
<tr>
<td>AI 读取</td>
<td>很轻</td>
<td>token 成本高</td>
<td>需要解析</td>
</tr>
<tr>
<td>版本管理</td>
<td>适合 diff</td>
<td>标签噪声多</td>
<td>不适合纯文本 diff</td>
</tr>
<tr>
<td>最终展示</td>
<td>需要转换</td>
<td>浏览器直接打开</td>
<td>Office 生态友好</td>
</tr>
</tbody>
</table>
<p>所以更稳的流程是:先用 Markdown 写清楚,再按交付场景生成 HTML 或
DOCX。</p>
<h2 id="一个实用工作流">一个实用工作流</h2>
<ol type="1">
<li>收到 PDF / DOCX / 网页资料,先转成 Markdown。</li>
<li>在 Markdown 里做修改、补充、审校。</li>
<li>对外展示时转成 HTML。</li>
<li>需要编辑审校或投稿时转成 DOCX。</li>
</ol>
<p>这个流程的好处是:所有中间修改都留在同一个源文件里,产物可以重复生成。</p>
<h2 id="什么时候用工作面-html">什么时候用工作面 HTML</h2>
<p>不是所有内容都适合线性文章。下面这些场景更适合做成工作面:</p>
<ul>
<li>三个方案横向对比</li>
<li>项目计划和里程碑</li>
<li>事故复盘时间线</li>
<li>PR / 文档评审批注</li>
<li>周报和状态看板</li>
</ul>
<p>这类内容如果只做成长文,读者需要来回跳转;做成 HTML
工作面后,可以在一个页面里比较、展开、复制和定位。</p>
<h2 id="结论">结论</h2>
<p>把 Markdown 当源,把 HTML / DOCX
当产物,文档工作会更像软件工程:源文件稳定、产物可再生、AI
也更容易协作。</p>
</body>
</html>
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