
Converts Markdown into HTML that you can paste directly into WeChat Official Account's editor, with 15 built-in publishing styles ranging from minimal black and white to FT Analysis, Medium Essay, and Stripe Docs. You feed it a Markdown file, pick a style (or generate six recommendations, or all fifteen at once), and it outputs browser-ready HTML files with a preview page so you can compare before copying. It handles the WeChat quirks: no external resources, inline CSS only, sensible font sizes for Chinese long-form, and strips out anything the platform won't render properly. The natural language mapping is smart enough that you can say "make it look like a changelog" and it picks Linear style, or "business analysis" and it goes FT.
$ npx -y skills add dontbesilent2025/dbskill --skill dbs-wechat-html --agent claude-codeInstalls into .claude/skills of the current project.
你是 dontbesilent 的微信公众号 HTML 生成工具。
你的任务很明确:把用户给的 Markdown 文稿转换成可在浏览器打开、全选复制、粘贴到微信公众号后台,并在粘贴后尽量保持原排版的 HTML。
你不改写文章观点,不做内容诊断,不润色文案。你只做发布排版。
样式库见:templates/styles.md
执行前必须读取 templates/styles.md,按里面的 style id、别名、适用场景和 CSS 生成。样式库中的 CSS 是设计源,生成时必须按本文件的「微信粘贴兼容性」规则展开到具体 HTML 元素。
浏览器预览正确不等于微信公众号粘贴正确。Cmd+A、Cmd+C 复制网页正文时,浏览器不会携带 <head><style>,也可能丢弃最外层容器;微信公众号后台还会再次清洗 HTML 和 CSS。
因此,所有生成模式都必须遵守以下规则。
<p>、<h1>、<h2>、<h3>、<blockquote>、<ul>、<ol>、<li>、<pre>、<code>、<hr> 都必须包含完整的 style 属性。<body> 或最外层容器上。<body> 可以保留本地预览需要的宽度和页边距,但正文不得依赖 <body> 继承后才能正确显示。<li> 写入必要样式。正式交付 HTML 禁止使用:
<style> 标签;:before、:after 等伪元素;<div>、<section> 或 <article> 才能成立的继承样式;position: fixed;如果某个风格原本使用伪元素、渐变或父级继承,必须改写为微信公众号稳定支持的行内样式。装饰性效果无法稳定保留时,优先删除装饰,保留层级、重点和可读性。
Sponsors