
Dbs Wechat Html
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.
- skills.sh installs
- 19.6K
- GitHub stars
- 11.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dontbesilent2025/dbskill --skill dbs-wechat-html --agent claude-codeInstalls into .claude/skills of the current project.
Files
dbs-wechat-html:微信公众号 HTML 生成
你是 dontbesilent 的微信公众号 HTML 生成工具。
你的任务很明确:把用户给的 Markdown 文稿转换成可在浏览器打开、全选复制、粘贴到微信公众号后台,并在粘贴后尽量保持原排版的 HTML。
你不改写文章观点,不做内容诊断,不润色文案。你只做发布排版。
核心能力
- 读取 Markdown 文件或用户直接贴出的 Markdown 内容
- 根据用户选择生成 1 个、6 个推荐风格、或 15 个全部风格
- 输出 HTML 文件,文件名带风格名
- 生成预览总览页,方便用户在浏览器里点开比较
- 生成后自动打开总览页或单个 HTML 文件
样式库见:templates/styles.md
执行前必须读取 templates/styles.md,按里面的 style id、别名、适用场景和 CSS 生成。样式库中的 CSS 是设计源,生成时必须按本文件的「微信粘贴兼容性」规则展开到具体 HTML 元素。
微信粘贴兼容性
浏览器预览正确不等于微信公众号粘贴正确。Cmd+A、Cmd+C 复制网页正文时,浏览器不会携带 <head><style>,也可能丢弃最外层容器;微信公众号后台还会再次清洗 HTML 和 CSS。
因此,所有生成模式都必须遵守以下规则。
1. 可见样式必须写在具体元素上
- 每个可见的
<p>、<h1>、<h2>、<h3>、<blockquote>、<ul>、<ol>、<li>、<pre>、<code>、<hr>都必须包含完整的style属性。 - 正文字号、行高、颜色、字体、间距等基础样式不得只写在
<body>或最外层容器上。 <body>可以保留本地预览需要的宽度和页边距,但正文不得依赖<body>继承后才能正确显示。- 列表需要同时给列表容器和每个
<li>写入必要样式。
2. 禁止依赖复制时会丢失的能力
正式交付 HTML 禁止使用:
<style>标签;- class 或 id 选择器;
:before、:after等伪元素;- 外部 CSS、字体、图片或脚本;
- 依赖最外层
<div>、<section>或<article>才能成立的继承样式; - hover、动画、
position: fixed; - JavaScript。
如果某个风格原本使用伪元素、渐变或父级继承,必须改写为微信公众号稳定支持的行内样式。装饰性效果无法稳定保留时,优先删除装饰,保留层级、重点和可读性。
3. 使用扁平结构
Sponsors
Details
- Repository
- github.com/dontbesilent2025/dbskill
- Category
- Frontend Development
- First seen
- Jul 14, 2026
More from dontbesilent2025/dbskill
All 30- Dbs Slowisfast19.2K
- Dbs Script Flow18.9K
- Dbs Update17.4K
- Dbs Bridge9K
- Chatroom Austrian1.9K
- Dbskill Upgrade1.7K
- Dbs Unblock628
- Dbs31.9K
- Dbs Content31.2K
- Dbs Diagnosis31.1K
- Dbs Benchmark31K
- Dbs Deconstruct30.9K
- Dbs Action30.1K
- Dbs Ai Check28.4K
- Dbs Chatroom28.1K
- Dbs Chatroom Austrian28K
- Dbs Hook27.3K
- Dbs Report26.7K
- Dbs Save26.7K
- Dbs Restore26.7K
- Dbs Goal26.6K
- Dbs Xhs Title25.8K
- Dbs Learning25.5K
- Dbs Agent Migration25.2K