From getrich-skills
将本地或在线 HTML 生成 PDF,尤其适合把 markdown-themes 生成的主题 HTML、文章 HTML、报告 HTML、 周报 HTML、网页快照导出为可打印 PDF。触发:html 转 pdf、HTML 生成 PDF、网页导出 PDF、 markdown-themes 生成 PDF、文章 PDF、报告 PDF、打印 PDF。
How this skill is triggered — by the user, by Claude, or both
Slash command
/getrich-skills:gr-html-to-pdfThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
把 HTML 稳定导出为 PDF。优先用于 `markdown-themes` 生成的 HTML,也可处理普通本地 HTML 或线上页面。
把 HTML 稳定导出为 PDF。优先用于 markdown-themes 生成的 HTML,也可处理普通本地 HTML 或线上页面。
.html 文件或 http(s) URL。markdown-themes,直接使用生成的 HTML;不要重新改主题 CSS,除非用户要求。python3 skills/gr-html-to-pdf/scripts/html_to_pdf.py input.html
指定输出路径:
python3 skills/gr-html-to-pdf/scripts/html_to_pdf.py input.html --output output.pdf
常用打印参数:
python3 skills/gr-html-to-pdf/scripts/html_to_pdf.py input.html \
--format A4 \
--media print \
--prefer-css-page-size
.pdf。A4,打印背景为开启,等待页面加载完成后再打印。0,避免彩色 / 米色页面导出后出现白边;正文留白交给 HTML/CSS 控制。print media;如果页面专门为屏幕展示设计,可用 --media screen。@page 定义纸张或边距的 HTML,优先加 --prefer-css-page-size。--wait-ms 1000 到 3000。--margin 12mm 或其他值。先由 markdown-themes 生成 HTML:
python3 skills/markdown-themes/scripts/render_markdown.py article.md --theme Knowledge-Base --output article.html
再生成 PDF:
python3 skills/gr-html-to-pdf/scripts/html_to_pdf.py article.html --output article.pdf --prefer-css-page-size
对 Kami、markdown-themes 这类已经在 HTML/CSS 中控制页面背景和留白的文档,不要额外传 --margin,否则 Chrome 会在 PDF 纸张外层加一圈白色打印边距。
如果 PDF 分页不理想,优先在 HTML/CSS 中补打印样式,例如:
@page {
size: A4;
margin: 14mm;
}
h1, h2, h3 {
break-after: avoid;
}
pre, blockquote, table, img {
break-inside: avoid;
}
生成后至少检查:
[OK] PDF saved:。CHROME_PATH=/path/to/browser。--wait-ms,必要时改用本地资源。printBackground,脚本默认已经开启背景打印。npx claudepluginhub neolin0629/getrich-skills --plugin getrich-skillsProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.