Wechat Formatter logo

Wechat Formatter

Community
YiShu5
wechat-formatter

把 Markdown 文稿转换成微信公众号可用的内联样式 HTML。**触发场景**:用户说 "把 markdown 转成公众号能用的 HTML" / "排版一下这篇文章" / "套个主题" / "微信编辑器不识别我的样式" / 任何提到「公众号排版 / 微信 HTML / md 转 html / doocs 主题」的请求。微信编辑器不识别 `<style>` 标签,必须把所有 CSS 内联到每个 HTML 元素的 style 属性里——本 skill 用 doocs/md 主题完成这件事。本 skill 只负责格式转换;写作交给 wechat-writer,发布交给 wechat-publisher。

Overview

PublisherYiShu5
Repositoryclaude-skills
Skill namewechat-formatter
Stars
131
Forks
0
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by YiShu5 on GitHub. Read the source before you install it.

Installation

Install the Wechat Formatter AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/YiShu5/claude-skills/tree/master/skills/wechat-formatter
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/YiShu5/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/skills/wechat-formatter .claude/skills/wechat-formatter
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wechat Formatter in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Wechat Formatter on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Wechat Formatter is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

wechat-formatter · Markdown → 微信 HTML

只解决一件事:把 Markdown 转成微信编辑器粘贴后样式不丢的 HTML。

核心问题

微信公众号编辑器不识别 <style> 标签和 CSS class。所以普通的 markdown → html 转换器输出的 HTML 粘到微信里会变成裸文本,所有样式全丢。

唯一可靠方案:所有 CSS 都内联到元素的 style="..." 属性里。doocs/md 是这件事的开源标准,本 skill 直接调用它。

使用方法

bash
python3 scripts/markdown_to_wechat_doocs.py \
  --input drafts/article.md \
  --output drafts/article.html \
  --theme <主题名>

输出的 HTML 可以直接复制粘贴到微信公众号编辑器,样式全部保留。

主题选择

8 个主题,按文章内容氛围选(不只看标题关键词):

文章基调推荐主题适用
温暖、励志、有人情味orange个人成长 / 励志 / 鸡汤 / 故事
专业、理性、技术感blue技术评测 / 工具教程 / 商业分析
清新、自然、放松green健康养生 / 户外 / 环保
文艺、清爽、小清新cyan文艺随笔 / 旅行 / 生活美学
优雅、高端、品牌purple品牌故事 / 艺术文化 / 设计
简约、高级、极简black摄影 / 极简主题 / 严肃话题
热情、节日、醒目red节日 / 重要通知 / 活动
甜美、浪漫、少女pink情感 / 美妆 / 少女向

选择原则:读完 Markdown 后,问自己"这篇要给读者什么情绪",再选主题。不要靠标题关键词匹配(比如标题里没"励志"也可能是励志文)。

如果用户已在 .env 设了 MARKDOWN_THEME:除非用户明确说"换个主题",否则用 .env 里的。

输出验收

转出来的 HTML 必须:

  • 不包含 <style> 标签(所有样式必须内联)
  • 不包含 CSS class(微信不解析)
  • 图片如果是本地路径 → 必须先用 wechat-publisher 的 upload_material.py 换成微信 URL,否则发布后图片裂掉

不做的事

  • 不发布到草稿箱 → 用 wechat-publisher
  • 不写文章 / 不改稿 → 用 wechat-writer
  • 不生成封面图 → 用 wechat-publisher 的 generate_cover.py
  • 不上传本地图片到微信 CDN → 用 wechat-publisher 的 upload_material.py(如果 Markdown 里有 ![](./local/img.png),先告诉用户调用 publisher 上传换链接,再回来排版)

配置

.env 文件支持的变量:

bash
MARKDOWN_THEME=        # orange / blue / green / purple / red / cyan / black / pink
                       # 留空则让 agent 按内容判断

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Wechat Formatter AI skill do?

把 Markdown 文稿转换成微信公众号可用的内联样式 HTML。**触发场景**:用户说 "把 markdown 转成公众号能用的 HTML" / "排版一下这篇文章" / "套个主题" / "微信编辑器不识别我的样式" / 任何提到「公众号排版 / 微信 HTML / md 转 html / doocs 主题」的请求。微信编辑器不识别 `<style>` 标签,必须把所有 CSS 内联到每个 HTML 元素的 style 属性里——本 skill 用 doocs/md 主题完成这件事。本 skill 只负责格式转换;写作交给 wechat-writer,发布交给 wechat-publisher。

Why use Wechat Formatter on TypingMind?

Because you install it once and use it with any model. Wechat Formatter is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Wechat Formatter in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/YiShu5/claude-skills/tree/master/skills/wechat-formatter. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Wechat Formatter?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Wechat Formatter?

As many as you like. As long as a model supports skills, you can use Wechat Formatter with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Wechat Formatter AI skill free?

Yes. It is published on GitHub by YiShu5 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇